sublime text 3:
按快捷鍵 ctrl+` 或者點擊 View → Show/Hide Console 調出控制台Console;
import urllib.request,os;pf='Package Control.sublime-package';ipp=sublime.installed_packages_path();urllib.request.install_opener(urllib.request.build_opener(urllib.request.ProxyHandler()));open(os.path.join(ipp,pf),'wb').write(urllib.request.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read())
1.按ctrl + shift + P調出命令面板;
2.輸入 install 調出 Package Control:Install Package 選項,並回車;
SublimeTmpl 改模板 \Sublime Text 3\Data\Packages\SublimeTmpl\templates
快速生成文件模板
ctrl+alt+h html
ctrl+alt+j javascript
ctrl+alt+c css
ctrl+alt+p php
ctrl+alt+r ruby
ctrl+alt+shift+p python
Alignment
等號對齊
Better Completion
BracketHighlighter
高亮顯示匹配的括號、引號和標簽
JsFormat
SideBarEnhancements
側邊欄增強
CTag
ConvertToUTF8
Pretty JSON
格式化json
LESS
less語法高亮
Less2Css ---- 需要python
less保存同時生成css
Less2Css插件依賴lessc這個工具, 下載地址: https://github.com/duncansmart/less.js-windows
然后把目錄地址加入到環境變量PATH的中,如D:\open\less.js-windows
設置好之后,通過快捷鍵 Windows徽標鍵+R鍵 調出運行窗口,輸入cmd,在命令行中輸入lessc,如果有如下提示則表示設置成功
如果的dev環境中不想壓縮,可以通過 Preference —— Package Settings —— Less2Css ——Setting User 增加:
{"minify": false}
Theme - Flatland
修改 Preferences 文件,通過菜單 “Preferences > Settings - User” 可打開用戶配置文件,在其中添加(或修改原來的設置):
{ "theme": "Flatland Dark.sublime-theme", "color_scheme": "Packages/Theme - Flatland/Flatland Dark.tmTheme" }
nodejs
1.運行Sublime,菜單上找到Tools ---> Build System ---> new Build System
2.在文件中復制入
{
"cmd": ["node", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.javascript"
}
3.保存文件為NodeJs.sublime-build
4.菜單上找到Tools ---> Build System --->選擇 NodeJs
5.安裝sublime插件 JavaScript & NodeJs Snippets
6.新建test.js文件,輸入 console.log('Hello Node.js'); 按快捷鍵 Ctrl + B 運行,成功輸出
7.停止運行 菜單上找到Tools ---> 停止編譯
常用快捷鍵:
Ctrl+P 查找當前項目中的文件和快速搜索;輸入 @ 查找文件主標題/函數;或者輸入 : 跳轉到文件某行;
Ctrl+R 快速列出/跳轉到某個函數
Ctrl+D 選中一個單詞 (反復按快捷鍵,即可繼續向下同時選中下一個相同的文本進行同時編輯)
Ctrl+G 跳轉到相應的行
Ctrl+J 合並行(已選擇需要合並的多行時)
Ctrl+L 選擇整行(按住-繼續選擇下行)
Ctrl+M 光標移動至括號內開始或結束的位置
Ctrl + Shift + M 選中括號內所有內容
Ctrl+K+T 折疊屬性
Ctrl+K+U 改為大寫
Ctrl+K+L 改為小寫
Ctrl+K+0 展開所有
DocBlockr
Preferences --> Package Settings --> DocBlockr -> Settings -User:
{ "jsdocs_function_description": false, "jsdocs_return_description": false, "jsdocs_param_description": false, "jsdocs_param_name": true, "jsdocs_align_tags": "shallow", "jsdocs_spacer_between_sections": true }
PHPCs
preferences--package settings---php code sniffer
{ // Path to php on windows installation // This is needed as we cannot run phars on windows, so we run it through php "phpcs_php_prefix_path": "C:\\wamp64\\bin\\php\\php7.0.10\\php.exe", // This is the path to the bat file when we installed PHP_CodeSniffer "phpcs_executable_path": "C:\\wamp64\\bin\\php\\php5.6.25\\phpcs.bat", // PHP-CS-Fixer settings // Don't want to auto fix issue with php-cs-fixer "php_cs_fixer_on_save": false, // Show the quick panel "php_cs_fixer_show_quick_panel": true, // The fixer phar file is stored here: "php_cs_fixer_executable_path": "D:\\seekasia\\src\\papi\\php-cs-fixer.phar", // PHP Linter settings // Yes, lets lint the files "phpcs_linter_run": true, // And execute that on each file when saved (php only as per extensions_to_execute) "phpcs_linter_command_on_save": true, // Path to php "phpcs_php_path": "C:\\wamp64\\bin\\php\\php7.0.10\\php.exe", // This is the regex format of the errors "phpcs_linter_regex": "(?P<message>.*) on line (?P<line>\\d+)", // PHP Mess Detector settings // Not turning on the mess detector here "phpmd_run": false, "phpmd_command_on_save": false, "phpmd_executable_path": "", "phpmd_additional_args": {} }
XDebug
1.project --> save project as...
2.project --> edit project
{ "folders": [ { "path": "D:\\seekasia\\src\\JobSeekers\\myjs" }, { "path": "D:\\seekasia\\src\\papi" } ], //https://github.com/martomo/SublimeTextXdebug "settings": { "tab_size": 4, "xdebug": { "break_on_exception": "Fatal error", //"close_on_stop": true, "path_mapping": { "/var/www/seekasia.com/JobSeekers/myjs": "D:\\seekasia\\src\\JobSeekers\\myjs", "/var/www/seekasia.com/papi": "D:\\seekasia\\src\\papi", }, "port": 9001, "super_globals": true } } }