其實(shí)sublime自身就有格式化命令,就不再安裝插件,位置在[Edit]->[Line]->[Reindent]
但這個(gè)默認(rèn)的命令沒(méi)有快捷鍵,就重新定義了一下,想用習(xí)慣了的eclipse快捷鍵:Ctrl+Shift+F但是和“在文件中查找”沖突了。改用Alt+Shift+F吧,和netbeans保持一致。
[Preferences]->[Key Bindings]->[User]中,添加如下:
{ "keys": ["alt+shift+f"], "command": "reindent" }
image