[TOC]
插件
~~~
https://packagecontrol.io/
~~~
#### sublime-phpcs 語法提示
https://github.com/benmatselby/sublime-phpcs
#### SublimeCodeIntel 代碼補全
https://www.liudon.org/1337.html
#### SublimeTmpl
通過SublimeTmpl可以新建一個文件的時候自定義模板,安裝好后在file欄目中會有`new file (SublimeTmpl)`這一項,選擇要新建的文件就可以新建自定義模板的文件。
通過配置這個文件可以修改`new file(sublimeTpl)`的子目錄列表:
~~~
Preference>Package Settings> SublimeTmpl>menu default
~~~
你寫的模板文件需要存放在 `/Packages/SublimeTmpl/templates` 這個目錄下,如果你配置的`vue`文件,文件名應該為`vue.tmpl`,文件內容就是新建vue文件的默認模板。
#### DocBlockr
安裝該插件后,可以快速生成各種注釋格式,當需要生成注釋符號時,輸入`/*、/`然后回車系統即幫你自動生成,如果/后面剛好是一個函數的定義,注釋格式會根據函數的參數生成。
sublime的php doc插件 DocBlockr,應該大家已經在用,現在需要修改一下配置,避免到處是[description]而實際上沒有任何有效的description被添加的情況。
~~~
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
}
~~~
示例如下:
~~~
/**
* Send wechat message and notice for purchasing order finished.
*
* @param App\Shop $shop
* @param App\PurchasingOrder $purchasingOrder
*
* @return void
*/
~~~
https://jingyan.baidu.com/article/f0e83a259227fa22e4910177.html
#### Terminal 控制臺呼出插件

用node,Grunt等等要調出控制臺。
Tips:快捷鍵 `ctrl+shift+T` 呼出當前文件路徑的控制臺
#### HTMLPrettify 代碼排版插件
這是一款可以用于HTML,CSS,Javascript的集成排版插件
格式化HTML,CSS,Javascript和Json代碼格式。使用該插件,需要安裝nodejs,而且要在下面的菜單中設置你的 `node` 安裝路徑。
~~~
Packages-Setting→HTML/CSS/JS Prettify→set node path
~~~
使用過程:Tools→Command Palette(或者Ctrl+Shift+P),輸入選擇 htmlprettify 即可完成整個文檔的格式化。也可以設置快捷鍵:Packages-Setting→HTML/CSS/JS Prettify→set keyboard shortcuts,如果你的ctrl+shift+h已經被占用,所以可以改成ctrl+shift+alt+h。
Tips:安裝完快捷鍵`ctrl+shift+h` 一鍵格式化代碼,使用之前需要安裝`node.js`。
#### SideBarEnhancements 增強右鍵菜單

#### Sublime 保存時自動轉換tab成空格
Convert Tabs to Spaces on file save
SUBLIME-TEXT
It's good practice to use spaces instead of tabs when indenting code. Sublime Text 2 allows you to convert tabs to spaces in existing files manually (View -> Indentation -> Convert indentation to spaces).
However, this can be done automatically when saving the file. Paste the code below into a new file called ExpandTabsOnSave.py and save it under $SUBLIME_HOME$\Packages\ExpandTabsOnSave\.
~~~
import sublime, sublime_plugin, os
class ExpandTabsOnSave(sublime_plugin.EventListener):
# Run ST's 'expand_tabs' command when saving a file
def on_pre_save(self, view):
if view.settings().get('expand_tabs_on_save') == 1:
view.window().run_command('expand_tabs')
~~~
You can enable the plugin for a given project by pasting the following into the Project's .sublime-project file:
~~~
"settings": {
"expand_tabs_on_save": true
}
~~~
If instead you wish to enable it globally, use your Settings file (Preferences -> Settings - User):
"expand_tabs_on_save": true
https://coderwall.com/p/zvyg7a/convert-tabs-to-spaces-on-file-save
https://www.oschina.net/translate/20-powerful-sublimetext-plugins
- 目錄
- 教程
- 問答
- 設置
- 快捷鍵
- 插件管理
- 安裝包( PackageControl )
- 插件
- 語法
- SublimeLinter
- SublimeLinter-jshint
- SublimeLinter-php
- SublimeLinter-phplint
- SublimeLinter-phpmd
- SublimeLinter-phpcs
- 注釋
- DocBlockr
- 排版
- HTML-CSS-JS Prettify
- phpfmt
- 模版
- SublimeTmpl
- ExtJS
- 安裝
- 翻譯
- ChineseLocalizations
- 輔助
- SideBarEnhancements
- Bracket Highlighter
- auto-save
- Color Highlighter
- ColorPicker
- 上傳
- sftp
- 提示
- PhpNinJaManual
- 版本
- Git
- TortoiseSVN
- 框架插件
- PHP開發
- 編譯系統
- 注釋插件
- 代碼片段
- Pretty Json
- 系統菜單
- 分屏
- 空格縮進
- 中文版
- brew