一、sublime中已经自建了格式化按钮:Edit -> Line -> Reindent (要选中需要格式化的代码段)
设置快捷键:
- Preference -> Key Bindings -user
- 出现一个文件,只有一个空的中括号。在中括号中添加 { "keys": ["ctrl+alt+f"], "command": "reindent" },文件形如:
PS: shift+ctrl+F会与搜狗输入法快捷键冲突,需要去搜狗热键里设置改掉。
二、Tag插件
详见: http://www.tuicool.com/articles/7jEfea