強烈推薦下面標紅的快捷鍵,誰用誰知道,編碼的時候不再用依賴方向鍵和鼠標了。 [ //=======================個人快捷鍵=======================// // 刪除當前行 { "keys": ["ctrl+d"], "command":"run_macro_file", "args": {"file":"Packages/Default/Delete Line.sublime-macro"} }, // 複製選中行到行後 { "keys": ["ctrl+alt+down"], "command":"duplicate_line" }, // 選詞(按住-繼續選擇下個相同的字符串) { "keys": ["ctrl+g"], "command":"find_under_expand" }, // gb一次選中全部的 { "keys": ["ctrl+g", "ctrl+b"],"command": "find_all_under" }, // 自動提示、補全 { "keys": ["alt+/"], "command":"auto_complete" }, { "keys": ["alt+/"], "command":"replace_completion_with_auto_complete", "context": [ { "key": "last_command", "operator":"equal", "operand": "insert_best_completion" }, { "key": "auto_complete_visible", "operator":"equal", "operand": false }, { "key": "setting.tab_completion", "operator":"equal", "operand": true } ] }, // 與上行互換 { "keys": ["alt+up"], "command":"swap_line_up" }, // 與下行互換 { "keys": ["alt+down"], "command":"swap_line_down" }, { "keys": ["alt+/","alt+/"], "command":"insert_best_completion" }, //與tab鍵衝突,秒之 { "keys": ["shift+tab"], "command":"insert_best_completion", "args": {"default":"\t", "exact": true} }, { "keys": ["shift+tab"], "command":"insert_best_completion", "args": {"default":"\t", "exact": false}, "context": [ { "key": "setting.tab_completion", "operator":"equal", "operand": true } ] }, { "keys": ["shift+tab"], "command":"replace_completion_with_next_completion", "context": [ { "key": "last_command", "operator":"equal", "operand": "insert_best_completion" }, { "key": "setting.tab_completion", "operator":"equal", "operand": true } ] }, { "keys": ["shift+tab"], "command":"reindent", "context": [ { "key": "setting.auto_indent", "operator":"equal", "operand": true }, { "key": "selection_empty", "operator":"equal", "operand": true, "match_all": true }, { "key": "preceding_text", "operator":"regex_match", "operand": "^$","match_all": true }, { "key": "following_text", "operator":"regex_match", "operand": "^$","match_all": true } ] }, { "keys": ["shift+tab"], "command":"indent", "context": [ { "key": "text", "operator":"regex_contains", "operand": "\n" } ] }, { "keys": ["shift+tab"], "command":"next_field", "context": [ { "key": "has_next_field", "operator":"equal", "operand": true } ] }, { "keys": ["shift+tab"], "command":"commit_completion", "context": [ { "key": "auto_complete_visible" }, { "key": "setting.auto_complete_commit_on_tab" } ] }, //移動光標 { "keys": ["alt+l"], "command": "move","args": {"by": "characters", "forward":false} }, { "keys": ["alt+r"], "command": "move","args": {"by": "characters", "forward":true} }, { "keys": ["alt+u"], "command": "move","args": {"by": "lines", "forward":false} }, { "keys": ["alt+d"], "command": "move","args": {"by": "lines", "forward":true} }, { "keys": ["shift+alt+l" ], "command":"move", "args": {"by": "characters","forward": false, "extend": true} }, { "keys": ["shift+alt+r"], "command":"move", "args": {"by": "characters","forward": true, "extend": true} }, { "keys": ["shift+alt+u" ], "command":"move", "args": {"by": "lines","forward": false, "extend": true} }, { "keys": ["shift+alt+d" ], "command":"move", "args": {"by": "lines","forward": true, "extend": true} }, //移動光標到行首或行末 { "keys": ["alt+b"], "command":"move_to", "args": {"to": "bol","extend": false} }, { "keys": ["alt+e"], "command":"move_to", "args": {"to": "eol","extend": false} }, { "keys": ["shift+alt+b"], "command":"move_to", "args": {"to": "bol","extend": true} }, { "keys": ["shift+alt+e"], "command":"move_to", "args": {"to": "eol","extend": true} }, //滾屏 { "keys": ["alt+g"], "command":"scroll_lines", "args": {"amount": 1.0 } }, { "keys": ["alt+h"], "command":"scroll_lines", "args": {"amount": -1.0 } }, //縮進 { "keys": ["shift+tab"], "command":"unindent" }, ] //=======================系統自帶快捷鍵=======================// //=============選擇=============// // Ctrl+L // 選擇整行(按住-繼續選擇下行) //Ctrl+Shift+L //鼠標選中多行,按下 同時編輯這些行 //鼠標中鍵 //拖動,選擇多行 //Ctrl+左鍵點擊 //同時選中多個節點進行編輯 //Ctrl+M // 光標移動至括號內開始或結束的位置 // Ctrl+Shift+M // 選擇括號內的內容(按住-繼續選擇父括號) //=============窗口=============// // SHIFT+ALT+數字 // 分割窗口 //=============行處理=============// // CTRL+J // 合併行JOIN // Ctrl+KU // 改成大寫 // Ctrl+KL // 改成小寫 // Ctrl+KK // 從光標處刪除至行尾 // Ctrl+Shift+D // 複製光標所在整行,插入在該行以前 // Ctrl+J // 合併行(已選擇須要合併的多行時) // Ctrl+/ // 註釋整行(如已選擇內容,同「Ctrl+Shift+/」效果) // Ctrl+Shift+/ // 註釋已選擇內容 // Ctrl+Shift+V // 粘貼並自動縮進(其它兄弟寫的,實測win系統自動縮進無效) // Ctrl+M // 光標跳至對應的括號 // Alt+. // 閉合當前標籤 // Ctrl+Shift+A // 選擇光標位置父標籤對兒 // Ctrl+Shift+[ // 摺疊代碼 // Ctrl+Shift+] // 展開代碼 // Ctrl+KT // 摺疊屬性 // Ctrl+K0 // 展開全部 // Ctrl+U // 軟撤銷 // Ctrl+T // 詞互換 // Ctrl+Enter // 插入行後 // Ctrl+Shift Enter // 插入行前 // Ctrl+K Backspace // 從光標處刪除至行首 // Shift+Tab // 去除縮進 // Tab // 縮進 // F9 // 行排序(按a-z)