Advertisement
Guest User

Untitled

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