通知短信+运营短信,5秒速达,支持群发助手一键发送🚀高效触达和通知客户 广告
[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 控制台呼出插件 ![](https://box.kancloud.cn/f9d767a271d88627133f6f381cf1523d_519x210.png) 用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 增强右键菜单 ![](https://box.kancloud.cn/9837cecae158614958313eb778a773e0_348x785.png) #### 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