Guest User

Untitled

a guest
Sep 21st, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.93 KB | None | 0 0
  1. [
  2. { "keys": ["ctrl+q"], "command": "exit" },
  3.  
  4. { "keys": ["ctrl+shift+n"], "command": "new_window" },
  5. { "keys": ["ctrl+shift+w"], "command": "close_window" },
  6. { "keys": ["ctrl+o"], "command": "prompt_open_file" },
  7. { "keys": ["ctrl+shift+t"], "command": "reopen_last_file" },
  8. { "keys": ["alt+o"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "h", "ipp", "inl", "m", "mm"]} },
  9. { "keys": ["ctrl+n"], "command": "new_file" },
  10. { "keys": ["ctrl+s"], "command": "save" },
  11. { "keys": ["ctrl+shift+s"], "command": "prompt_save_as" },
  12. { "keys": ["ctrl+f4"], "command": "close_file" },
  13. { "keys": ["ctrl+w"], "command": "close" },
  14.  
  15. { "keys": ["ctrl+k", "ctrl+b"], "command": "toggle_side_bar" },
  16. { "keys": ["f11"], "command": "toggle_full_screen" },
  17. { "keys": ["shift+f11"], "command": "toggle_distraction_free" },
  18.  
  19. { "keys": ["backspace"], "command": "left_delete" },
  20. { "keys": ["shift+backspace"], "command": "left_delete" },
  21. { "keys": ["ctrl+shift+backspace"], "command": "left_delete" },
  22. { "keys": ["delete"], "command": "right_delete" },
  23. { "keys": ["enter"], "command": "insert", "args": {"characters": "\n"} },
  24. { "keys": ["shift+enter"], "command": "insert", "args": {"characters": "\n"} },
  25. { "keys": ["keypad_enter"], "command": "insert", "args": {"characters": "\n"} },
  26. { "keys": ["shift+keypad_enter"], "command": "insert", "args": {"characters": "\n"} },
  27.  
  28. { "keys": ["ctrl+z"], "command": "undo" },
  29. { "keys": ["ctrl+shift+z"], "command": "redo" },
  30. { "keys": ["ctrl+y"], "command": "redo_or_repeat" },
  31. { "keys": ["ctrl+u"], "command": "soft_undo" },
  32. { "keys": ["ctrl+shift+u"], "command": "soft_redo" },
  33.  
  34. { "keys": ["shift+delete"], "command": "cut" },
  35. { "keys": ["ctrl+insert"], "command": "copy" },
  36. { "keys": ["shift+insert"], "command": "paste" },
  37.  
  38. // These two key bindings should replace the above three if you'd prefer
  39. // the traditional X11 behavior of shift+insert pasting from the primary
  40. // selection. The above CUA keys are the default, to match most GTK
  41. // applications.
  42. //{ "keys": ["shift+insert"], "command": "paste", "args": {"clipboard": "selection"} },
  43. //{ "keys": ["shift+delete"], "command": "right_delete" },
  44.  
  45. { "keys": ["ctrl+x"], "command": "cut" },
  46. { "keys": ["ctrl+c"], "command": "copy" },
  47. { "keys": ["ctrl+v"], "command": "paste" },
  48. { "keys": ["ctrl+shift+v"], "command": "paste_and_indent" },
  49.  
  50. { "keys": ["left"], "command": "move", "args": {"by": "characters", "forward": false} },
  51. { "keys": ["right"], "command": "move", "args": {"by": "characters", "forward": true} },
  52. { "keys": ["up"], "command": "move", "args": {"by": "lines", "forward": false} },
  53. { "keys": ["down"], "command": "move", "args": {"by": "lines", "forward": true} },
  54. { "keys": ["shift+left"], "command": "move", "args": {"by": "characters", "forward": false, "extend": true} },
  55. { "keys": ["shift+right"], "command": "move", "args": {"by": "characters", "forward": true, "extend": true} },
  56. { "keys": ["shift+up"], "command": "move", "args": {"by": "lines", "forward": false, "extend": true} },
  57. { "keys": ["shift+down"], "command": "move", "args": {"by": "lines", "forward": true, "extend": true} },
  58.  
  59. { "keys": ["ctrl+left"], "command": "move", "args": {"by": "words", "forward": false} },
  60. { "keys": ["ctrl+right"], "command": "move", "args": {"by": "word_ends", "forward": true} },
  61. { "keys": ["ctrl+shift+left"], "command": "move", "args": {"by": "words", "forward": false, "extend": true} },
  62. { "keys": ["ctrl+shift+right"], "command": "move", "args": {"by": "word_ends", "forward": true, "extend": true} },
  63.  
  64. { "keys": ["alt+left"], "command": "move", "args": {"by": "subwords", "forward": false} },
  65. { "keys": ["alt+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },
  66. { "keys": ["alt+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} },
  67. { "keys": ["alt+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} },
  68.  
  69. { "keys": ["alt+shift+up"], "command": "select_lines", "args": {"forward": false} },
  70. { "keys": ["alt+shift+down"], "command": "select_lines", "args": {"forward": true} },
  71.  
  72. { "keys": ["pageup"], "command": "move", "args": {"by": "pages", "forward": false} },
  73. { "keys": ["pagedown"], "command": "move", "args": {"by": "pages", "forward": true} },
  74. { "keys": ["shift+pageup"], "command": "move", "args": {"by": "pages", "forward": false, "extend": true} },
  75. { "keys": ["shift+pagedown"], "command": "move", "args": {"by": "pages", "forward": true, "extend": true} },
  76.  
  77. { "keys": ["home"], "command": "move_to", "args": {"to": "bol", "extend": false} },
  78. { "keys": ["end"], "command": "move_to", "args": {"to": "eol", "extend": false} },
  79. { "keys": ["shift+home"], "command": "move_to", "args": {"to": "bol", "extend": true} },
  80. { "keys": ["shift+end"], "command": "move_to", "args": {"to": "eol", "extend": true} },
  81. { "keys": ["ctrl+home"], "command": "move_to", "args": {"to": "bof", "extend": false} },
  82. { "keys": ["ctrl+end"], "command": "move_to", "args": {"to": "eof", "extend": false} },
  83. { "keys": ["ctrl+shift+home"], "command": "move_to", "args": {"to": "bof", "extend": true} },
  84. { "keys": ["ctrl+shift+end"], "command": "move_to", "args": {"to": "eof", "extend": true} },
  85.  
  86. { "keys": ["ctrl+up"], "command": "scroll_lines", "args": {"amount": 1.0 } },
  87. { "keys": ["ctrl+down"], "command": "scroll_lines", "args": {"amount": -1.0 } },
  88.  
  89. { "keys": ["ctrl+pagedown"], "command": "next_view" },
  90. { "keys": ["ctrl+pageup"], "command": "prev_view" },
  91.  
  92. { "keys": ["ctrl+tab"], "command": "next_view_in_stack" },
  93. { "keys": ["ctrl+shift+tab"], "command": "prev_view_in_stack" },
  94.  
  95. { "keys": ["ctrl+a"], "command": "select_all" },
  96. { "keys": ["ctrl+shift+l"], "command": "split_selection_into_lines" },
  97. { "keys": ["escape"], "command": "single_selection", "context":
  98. [
  99. { "key": "num_selections", "operator": "not_equal", "operand": 1 }
  100. ]
  101. },
  102. { "keys": ["escape"], "command": "clear_fields", "context":
  103. [
  104. { "key": "has_next_field", "operator": "equal", "operand": true }
  105. ]
  106. },
  107. { "keys": ["escape"], "command": "clear_fields", "context":
  108. [
  109. { "key": "has_prev_field", "operator": "equal", "operand": true }
  110. ]
  111. },
  112. { "keys": ["escape"], "command": "hide_panel", "args": {"cancel": true},
  113. "context":
  114. [
  115. { "key": "panel_visible", "operator": "equal", "operand": true }
  116. ]
  117. },
  118. { "keys": ["escape"], "command": "hide_overlay", "context":
  119. [
  120. { "key": "overlay_visible", "operator": "equal", "operand": true }
  121. ]
  122. },
  123. { "keys": ["escape"], "command": "hide_auto_complete", "context":
  124. [
  125. { "key": "auto_complete_visible", "operator": "equal", "operand": true }
  126. ]
  127. },
  128.  
  129. { "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": true} },
  130. { "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": false},
  131. "context":
  132. [
  133. { "key": "setting.tab_completion", "operator": "equal", "operand": true }
  134. ]
  135. },
  136. { "keys": ["tab"], "command": "replace_completion_with_next_completion", "context":
  137. [
  138. { "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
  139. { "key": "setting.tab_completion", "operator": "equal", "operand": true }
  140. ]
  141. },
  142. { "keys": ["tab"], "command": "reindent", "context":
  143. [
  144. { "key": "setting.auto_indent", "operator": "equal", "operand": true },
  145. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  146. { "key": "preceding_text", "operator": "regex_match", "operand": "^$", "match_all": true },
  147. { "key": "following_text", "operator": "regex_match", "operand": "^$", "match_all": true }
  148. ]
  149. },
  150. { "keys": ["tab"], "command": "indent", "context":
  151. [
  152. { "key": "text", "operator": "regex_contains", "operand": "\n" }
  153. ]
  154. },
  155. { "keys": ["tab"], "command": "next_field", "context":
  156. [
  157. { "key": "has_next_field", "operator": "equal", "operand": true }
  158. ]
  159. },
  160. { "keys": ["tab"], "command": "commit_completion", "context":
  161. [
  162. { "key": "auto_complete_visible" },
  163. { "key": "setting.auto_complete_commit_on_tab" }
  164. ]
  165. },
  166.  
  167. { "keys": ["shift+tab"], "command": "insert", "args": {"characters": "\t"} },
  168. { "keys": ["shift+tab"], "command": "unindent", "context":
  169. [
  170. { "key": "setting.shift_tab_unindent", "operator": "equal", "operand": true }
  171. ]
  172. },
  173. { "keys": ["shift+tab"], "command": "unindent", "context":
  174. [
  175. { "key": "preceding_text", "operator": "regex_match", "operand": "^[\t ]*" }
  176. ]
  177. },
  178. { "keys": ["shift+tab"], "command": "unindent", "context":
  179. [
  180. { "key": "text", "operator": "regex_contains", "operand": "\n" }
  181. ]
  182. },
  183. { "keys": ["shift+tab"], "command": "prev_field", "context":
  184. [
  185. { "key": "has_prev_field", "operator": "equal", "operand": true }
  186. ]
  187. },
  188.  
  189. { "keys": ["ctrl+]"], "command": "indent" },
  190. { "keys": ["ctrl+["], "command": "unindent" },
  191.  
  192. { "keys": ["insert"], "command": "toggle_overwrite" },
  193.  
  194. { "keys": ["ctrl+l"], "command": "expand_selection", "args": {"to": "line"} },
  195. { "keys": ["ctrl+d"], "command": "find_under_expand" },
  196. { "keys": ["ctrl+k", "ctrl+d"], "command": "find_under_expand_skip" },
  197. { "keys": ["ctrl+shift+space"], "command": "expand_selection", "args": {"to": "scope"} },
  198. { "keys": ["ctrl+shift+m"], "command": "expand_selection", "args": {"to": "brackets"} },
  199. { "keys": ["ctrl+m"], "command": "move_to", "args": {"to": "brackets"} },
  200. { "keys": ["ctrl+shift+j"], "command": "expand_selection", "args": {"to": "indentation"} },
  201. { "keys": ["ctrl+shift+a"], "command": "expand_selection", "args": {"to": "tag"} },
  202.  
  203. { "keys": ["alt+."], "command": "close_tag" },
  204.  
  205. { "keys": ["ctrl+alt+q"], "command": "toggle_record_macro" },
  206. { "keys": ["ctrl+alt+shift+q"], "command": "run_macro" },
  207.  
  208. { "keys": ["ctrl+enter"], "command": "run_macro_file", "args": {"file": "Packages/Default/Add Line.sublime-macro"} },
  209. { "keys": ["ctrl+shift+enter"], "command": "run_macro_file", "args": {"file": "Packages/Default/Add Line Before.sublime-macro"} },
  210. { "keys": ["enter"], "command": "commit_completion", "context":
  211. [
  212. { "key": "auto_complete_visible" },
  213. { "key": "setting.auto_complete_commit_on_tab", "operand": false }
  214. ]
  215. },
  216.  
  217. { "keys": ["ctrl+p"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
  218. { "keys": ["ctrl+shift+p"], "command": "show_overlay", "args": {"overlay": "command_palette"} },
  219. { "keys": ["ctrl+alt+p"], "command": "prompt_select_project" },
  220. { "keys": ["ctrl+r"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
  221. { "keys": ["ctrl+g"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
  222. { "keys": ["ctrl+;"], "command": "show_overlay", "args": {"overlay": "goto", "text": "#"} },
  223.  
  224. { "keys": ["ctrl+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse":false} },
  225. { "keys": ["ctrl+shift+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse":true} },
  226. { "keys": ["ctrl+f"], "command": "show_panel", "args": {"panel": "find"} },
  227. { "keys": ["ctrl+h"], "command": "show_panel", "args": {"panel": "replace"} },
  228. { "keys": ["ctrl+shift+h"], "command": "replace_next" },
  229. { "keys": ["f3"], "command": "find_next" },
  230. { "keys": ["shift+f3"], "command": "find_prev" },
  231. { "keys": ["ctrl+f3"], "command": "find_under" },
  232. { "keys": ["ctrl+shift+f3"], "command": "find_under_prev" },
  233. { "keys": ["alt+f3"], "command": "find_all_under" },
  234. { "keys": ["ctrl+e"], "command": "slurp_find_string" },
  235. { "keys": ["ctrl+shift+e"], "command": "slurp_replace_string" },
  236. { "keys": ["ctrl+shift+f"], "command": "show_panel", "args": {"panel": "find_in_files"} },
  237. { "keys": ["f4"], "command": "next_result" },
  238. { "keys": ["shift+f4"], "command": "prev_result" },
  239.  
  240. { "keys": ["f6"], "command": "toggle_setting", "args": {"setting": "spell_check"} },
  241. { "keys": ["ctrl+f6"], "command": "next_misspelling" },
  242. { "keys": ["ctrl+shift+f6"], "command": "prev_misspelling" },
  243.  
  244. { "keys": ["ctrl+shift+up"], "command": "swap_line_up" },
  245. { "keys": ["ctrl+shift+down"], "command": "swap_line_down" },
  246.  
  247. { "keys": ["ctrl+backspace"], "command": "delete_word", "args": { "forward": false } },
  248. { "keys": ["ctrl+shift+backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete to Hard BOL.sublime-macro"} },
  249.  
  250. { "keys": ["ctrl+delete"], "command": "delete_word", "args": { "forward": true } },
  251. { "keys": ["ctrl+shift+delete"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete to Hard EOL.sublime-macro"} },
  252.  
  253. { "keys": ["ctrl+/"], "command": "toggle_comment", "args": { "block": false } },
  254. { "keys": ["ctrl+shift+/"], "command": "toggle_comment", "args": { "block": true } },
  255.  
  256. { "keys": ["ctrl+j"], "command": "join_lines" },
  257. { "keys": ["ctrl+shift+d"], "command": "duplicate_line" },
  258.  
  259. { "keys": ["ctrl+`"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
  260.  
  261. { "keys": ["alt+/"], "command": "auto_complete" },
  262. { "keys": ["alt+/"], "command": "replace_completion_with_auto_complete", "context":
  263. [
  264. { "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
  265. { "key": "auto_complete_visible", "operator": "equal", "operand": false },
  266. { "key": "setting.tab_completion", "operator": "equal", "operand": true }
  267. ]
  268. },
  269.  
  270. { "keys": ["ctrl+alt+shift+p"], "command": "show_scope_name" },
  271.  
  272. { "keys": ["f7"], "command": "build" },
  273. { "keys": ["ctrl+b"], "command": "build" },
  274. { "keys": ["ctrl+shift+b"], "command": "build", "args": {"variant": "Run"} },
  275. { "keys": ["ctrl+break"], "command": "exec", "args": {"kill": true} },
  276.  
  277. { "keys": ["ctrl+t"], "command": "transpose" },
  278.  
  279. { "keys": ["f9"], "command": "sort_lines", "args": {"case_sensitive": false} },
  280. { "keys": ["ctrl+f9"], "command": "sort_lines", "args": {"case_sensitive": true} },
  281.  
  282. // Auto-pair quotes
  283. { "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"$0\""}, "context":
  284. [
  285. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  286. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  287. { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
  288. { "key": "preceding_text", "operator": "not_regex_contains", "operand": "[\"a-zA-Z0-9_]$", "match_all": true },
  289. { "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double", "match_all": true }
  290. ]
  291. },
  292. { "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"${0:$SELECTION}\""}, "context":
  293. [
  294. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  295. { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
  296. ]
  297. },
  298. { "keys": ["\""], "command": "move", "args": {"by": "characters", "forward": true}, "context":
  299. [
  300. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  301. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  302. { "key": "following_text", "operator": "regex_contains", "operand": "^\"", "match_all": true }
  303. ]
  304. },
  305. { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
  306. [
  307. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  308. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  309. { "key": "preceding_text", "operator": "regex_contains", "operand": "\"$", "match_all": true },
  310. { "key": "following_text", "operator": "regex_contains", "operand": "^\"", "match_all": true }
  311. ]
  312. },
  313.  
  314. // Auto-pair single quotes
  315. { "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'$0'"}, "context":
  316. [
  317. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  318. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  319. { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
  320. { "key": "preceding_text", "operator": "not_regex_contains", "operand": "['a-zA-Z0-9_]$", "match_all": true },
  321. { "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single", "match_all": true }
  322. ]
  323. },
  324. { "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'${0:$SELECTION}'"}, "context":
  325. [
  326. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  327. { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
  328. ]
  329. },
  330. { "keys": ["'"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
  331. [
  332. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  333. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  334. { "key": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true }
  335. ]
  336. },
  337. { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
  338. [
  339. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  340. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  341. { "key": "preceding_text", "operator": "regex_contains", "operand": "'$", "match_all": true },
  342. { "key": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true }
  343. ]
  344. },
  345.  
  346. // Auto-pair brackets
  347. { "keys": ["("], "command": "insert_snippet", "args": {"contents": "($0)"}, "context":
  348. [
  349. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  350. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  351. { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true }
  352. ]
  353. },
  354. { "keys": ["("], "command": "insert_snippet", "args": {"contents": "(${0:$SELECTION})"}, "context":
  355. [
  356. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  357. { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
  358. ]
  359. },
  360. { "keys": [")"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
  361. [
  362. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  363. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  364. { "key": "following_text", "operator": "regex_contains", "operand": "^\\)", "match_all": true }
  365. ]
  366. },
  367. { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
  368. [
  369. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  370. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  371. { "key": "preceding_text", "operator": "regex_contains", "operand": "\\($", "match_all": true },
  372. { "key": "following_text", "operator": "regex_contains", "operand": "^\\)", "match_all": true }
  373. ]
  374. },
  375.  
  376. // Auto-pair square brackets
  377. { "keys": ["["], "command": "insert_snippet", "args": {"contents": "[$0]"}, "context":
  378. [
  379. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  380. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  381. { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true }
  382. ]
  383. },
  384. { "keys": ["["], "command": "insert_snippet", "args": {"contents": "[${0:$SELECTION}]"}, "context":
  385. [
  386. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  387. { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
  388. ]
  389. },
  390. { "keys": ["]"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
  391. [
  392. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  393. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  394. { "key": "following_text", "operator": "regex_contains", "operand": "^\\]", "match_all": true }
  395. ]
  396. },
  397. { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
  398. [
  399. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  400. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  401. { "key": "preceding_text", "operator": "regex_contains", "operand": "\\[$", "match_all": true },
  402. { "key": "following_text", "operator": "regex_contains", "operand": "^\\]", "match_all": true }
  403. ]
  404. },
  405.  
  406. // Auto-pair curly brackets
  407. { "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{$0}"}, "context":
  408. [
  409. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  410. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  411. { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|$)", "match_all": true }
  412. ]
  413. },
  414. { "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{${0:$SELECTION}}"}, "context":
  415. [
  416. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  417. { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
  418. ]
  419. },
  420. { "keys": ["}"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
  421. [
  422. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  423. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  424. { "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
  425. ]
  426. },
  427. { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
  428. [
  429. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  430. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  431. { "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
  432. { "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
  433. ]
  434. },
  435.  
  436. { "keys": ["enter"], "command": "run_macro_file", "args": {"file": "Packages/Default/Add Line in Braces.sublime-macro"}, "context":
  437. [
  438. { "key": "setting.auto_indent", "operator": "equal", "operand": true },
  439. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  440. { "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
  441. { "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
  442. ]
  443. },
  444. { "keys": ["shift+enter"], "command": "run_macro_file", "args": {"file": "Packages/Default/Add Line in Braces.sublime-macro"}, "context":
  445. [
  446. { "key": "setting.auto_indent", "operator": "equal", "operand": true },
  447. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  448. { "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
  449. { "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
  450. ]
  451. },
  452.  
  453. {
  454. "keys": ["alt+shift+1"],
  455. "command": "set_layout",
  456. "args":
  457. {
  458. "cols": [0.0, 1.0],
  459. "rows": [0.0, 1.0],
  460. "cells": [[0, 0, 1, 1]]
  461. }
  462. },
  463. {
  464. "keys": ["alt+shift+2"],
  465. "command": "set_layout",
  466. "args":
  467. {
  468. "cols": [0.0, 0.5, 1.0],
  469. "rows": [0.0, 1.0],
  470. "cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
  471. }
  472. },
  473. {
  474. "keys": ["alt+shift+3"],
  475. "command": "set_layout",
  476. "args":
  477. {
  478. "cols": [0.0, 0.33, 0.66, 1.0],
  479. "rows": [0.0, 1.0],
  480. "cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1]]
  481. }
  482. },
  483. {
  484. "keys": ["alt+shift+4"],
  485. "command": "set_layout",
  486. "args":
  487. {
  488. "cols": [0.0, 0.25, 0.5, 0.75, 1.0],
  489. "rows": [0.0, 1.0],
  490. "cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1], [3, 0, 4, 1]]
  491. }
  492. },
  493. {
  494. "keys": ["alt+shift+8"],
  495. "command": "set_layout",
  496. "args":
  497. {
  498. "cols": [0.0, 1.0],
  499. "rows": [0.0, 0.5, 1.0],
  500. "cells": [[0, 0, 1, 1], [0, 1, 1, 2]]
  501. }
  502. },
  503. {
  504. "keys": ["alt+shift+9"],
  505. "command": "set_layout",
  506. "args":
  507. {
  508. "cols": [0.0, 1.0],
  509. "rows": [0.0, 0.33, 0.66, 1.0],
  510. "cells": [[0, 0, 1, 1], [0, 1, 1, 2], [0, 2, 1, 3]]
  511. }
  512. },
  513. {
  514. "keys": ["alt+shift+5"],
  515. "command": "set_layout",
  516. "args":
  517. {
  518. "cols": [0.0, 0.5, 1.0],
  519. "rows": [0.0, 0.5, 1.0],
  520. "cells":
  521. [
  522. [0, 0, 1, 1], [1, 0, 2, 1],
  523. [0, 1, 1, 2], [1, 1, 2, 2]
  524. ]
  525. }
  526. },
  527. { "keys": ["ctrl+1"], "command": "focus_group", "args": { "group": 0 } },
  528. { "keys": ["ctrl+2"], "command": "focus_group", "args": { "group": 1 } },
  529. { "keys": ["ctrl+3"], "command": "focus_group", "args": { "group": 2 } },
  530. { "keys": ["ctrl+4"], "command": "focus_group", "args": { "group": 3 } },
  531. { "keys": ["ctrl+shift+1"], "command": "move_to_group", "args": { "group": 0 } },
  532. { "keys": ["ctrl+shift+2"], "command": "move_to_group", "args": { "group": 1 } },
  533. { "keys": ["ctrl+shift+3"], "command": "move_to_group", "args": { "group": 2 } },
  534. { "keys": ["ctrl+shift+4"], "command": "move_to_group", "args": { "group": 3 } },
  535. { "keys": ["ctrl+0"], "command": "focus_side_bar" },
  536.  
  537. { "keys": ["alt+1"], "command": "select_by_index", "args": { "index": 0 } },
  538. { "keys": ["alt+2"], "command": "select_by_index", "args": { "index": 1 } },
  539. { "keys": ["alt+3"], "command": "select_by_index", "args": { "index": 2 } },
  540. { "keys": ["alt+4"], "command": "select_by_index", "args": { "index": 3 } },
  541. { "keys": ["alt+5"], "command": "select_by_index", "args": { "index": 4 } },
  542. { "keys": ["alt+6"], "command": "select_by_index", "args": { "index": 5 } },
  543. { "keys": ["alt+7"], "command": "select_by_index", "args": { "index": 6 } },
  544. { "keys": ["alt+8"], "command": "select_by_index", "args": { "index": 7 } },
  545. { "keys": ["alt+9"], "command": "select_by_index", "args": { "index": 8 } },
  546. { "keys": ["alt+0"], "command": "select_by_index", "args": { "index": 9 } },
  547.  
  548. { "keys": ["f2"], "command": "next_bookmark" },
  549. { "keys": ["shift+f2"], "command": "prev_bookmark" },
  550. { "keys": ["ctrl+f2"], "command": "toggle_bookmark" },
  551. { "keys": ["ctrl+shift+f2"], "command": "clear_bookmarks" },
  552. { "keys": ["alt+f2"], "command": "select_all_bookmarks" },
  553.  
  554. { "keys": ["ctrl+shift+k"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} },
  555.  
  556. { "keys": ["alt+q"], "command": "wrap_lines" },
  557.  
  558. { "keys": ["ctrl+k", "ctrl+u"], "command": "upper_case" },
  559. { "keys": ["ctrl+k", "ctrl+l"], "command": "lower_case" },
  560.  
  561. { "keys": ["ctrl+k", "ctrl+space"], "command": "set_mark" },
  562. { "keys": ["ctrl+k", "ctrl+a"], "command": "select_to_mark" },
  563. { "keys": ["ctrl+k", "ctrl+w"], "command": "delete_to_mark" },
  564. { "keys": ["ctrl+k", "ctrl+x"], "command": "swap_with_mark" },
  565. { "keys": ["ctrl+k", "ctrl+y"], "command": "yank" },
  566. { "keys": ["ctrl+k", "ctrl+k"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete to Hard EOL.sublime-macro"} },
  567. { "keys": ["ctrl+k", "ctrl+backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete to Hard BOL.sublime-macro"} },
  568. { "keys": ["ctrl+k", "ctrl+g"], "command": "clear_bookmarks", "args": {"name": "mark"} },
  569. { "keys": ["ctrl+k", "ctrl+c"], "command": "show_at_center" },
  570.  
  571. { "keys": ["ctrl++"], "command": "increase_font_size" },
  572. { "keys": ["ctrl+="], "command": "increase_font_size" },
  573. { "keys": ["ctrl+-"], "command": "decrease_font_size" },
  574.  
  575. { "keys": ["alt+shift+w"], "command": "insert_snippet", "args": { "name": "Packages/XML/long-tag.sublime-snippet" } },
  576.  
  577. { "keys": ["ctrl+shift+["], "command": "fold" },
  578. { "keys": ["ctrl+shift+]"], "command": "unfold" },
  579. { "keys": ["ctrl+k", "ctrl+1"], "command": "fold_by_level", "args": {"level": 1} },
  580. { "keys": ["ctrl+k", "ctrl+2"], "command": "fold_by_level", "args": {"level": 2} },
  581. { "keys": ["ctrl+k", "ctrl+3"], "command": "fold_by_level", "args": {"level": 3} },
  582. { "keys": ["ctrl+k", "ctrl+4"], "command": "fold_by_level", "args": {"level": 4} },
  583. { "keys": ["ctrl+k", "ctrl+5"], "command": "fold_by_level", "args": {"level": 5} },
  584. { "keys": ["ctrl+k", "ctrl+6"], "command": "fold_by_level", "args": {"level": 6} },
  585. { "keys": ["ctrl+k", "ctrl+7"], "command": "fold_by_level", "args": {"level": 7} },
  586. { "keys": ["ctrl+k", "ctrl+8"], "command": "fold_by_level", "args": {"level": 8} },
  587. { "keys": ["ctrl+k", "ctrl+9"], "command": "fold_by_level", "args": {"level": 9} },
  588. { "keys": ["ctrl+k", "ctrl+0"], "command": "unfold_all" },
  589. { "keys": ["ctrl+k", "ctrl+j"], "command": "unfold_all" },
  590. { "keys": ["ctrl+k", "ctrl+t"], "command": "fold_tag_attributes" },
  591.  
  592. { "keys": ["context_menu"], "command": "context_menu" },
  593.  
  594. { "keys": ["alt+c"], "command": "toggle_case_sensitive", "context":
  595. [
  596. { "key": "setting.is_widget", "operator": "equal", "operand": true }
  597. ]
  598. },
  599. { "keys": ["alt+r"], "command": "toggle_regex", "context":
  600. [
  601. { "key": "setting.is_widget", "operator": "equal", "operand": true }
  602. ]
  603. },
  604. { "keys": ["alt+w"], "command": "toggle_whole_word", "context":
  605. [
  606. { "key": "setting.is_widget", "operator": "equal", "operand": true }
  607. ]
  608. },
  609. { "keys": ["alt+a"], "command": "toggle_preserve_case", "context":
  610. [
  611. { "key": "setting.is_widget", "operator": "equal", "operand": true }
  612. ]
  613. },
  614.  
  615. // Find panel key bindings
  616. { "keys": ["enter"], "command": "find_next", "context":
  617. [{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
  618. },
  619. { "keys": ["shift+enter"], "command": "find_prev", "context":
  620. [{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
  621. },
  622. { "keys": ["alt+enter"], "command": "find_all", "args": {"close_panel": true},
  623. "context": [{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
  624. },
  625.  
  626. // Replace panel key bindings
  627. { "keys": ["enter"], "command": "find_next", "context":
  628. [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
  629. },
  630. { "keys": ["shift+enter"], "command": "find_prev", "context":
  631. [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
  632. },
  633. { "keys": ["alt+enter"], "command": "find_all", "args": {"close_panel": true},
  634. "context": [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
  635. },
  636. { "keys": ["ctrl+alt+enter"], "command": "replace_all", "args": {"close_panel": true},
  637. "context": [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
  638. },
  639.  
  640. // Incremental find panel key bindings
  641. { "keys": ["enter"], "command": "hide_panel", "context":
  642. [{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
  643. },
  644. { "keys": ["shift+enter"], "command": "find_prev", "context":
  645. [{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
  646. },
  647. { "keys": ["alt+enter"], "command": "find_all", "args": {"close_panel": true},
  648. "context": [{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
  649. }
  650. ]
Add Comment
Please, Sign In to add comment