Sublime Text 3 配置

設置格式化快捷鍵

參考資料

Sublime Text 2 快速格式化
Reindent Text in Sublime

Sublime 自帶格式化(代碼縮進)功能
依次點擊:Edit->Line->Reindent

默認是沒有快捷鍵的,所以需要自己設置
依次點擊:Preferences->Key Bindings - User,打開配置文件
添加如下代碼:

//由於之前使用eclipse比較多,所以使用了ctrl+shift+f,這裏可以隨便改成習慣的鍵
{"keys": ["ctrl+shift+f"], "command": "reindent" , "args": {"single_line": false}}

如圖所示,ctrl+s保存後即可使用:
這裏寫圖片描述

設置刪除一行快捷鍵

參考資料

sublime 的key binding 設置刪除行
sublime Text 3實用功能和常用快捷鍵收集

Sublime Text 3 默認刪除一行的快捷鍵是 ctrl+shift+k
這裏把它修改爲 ctrl+d

依次點擊:Preferences->Key Bindings - User,打開配置文件
添加如下代碼:

//由於之前使用eclipse比較多,所以使用了ctrl+d,這裏可以隨便改成習慣的鍵
{ "keys": ["ctrl+d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} }

如圖所示,ctrl+s保存後即可使用:
這裏寫圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章