sublime text 备份

插件下载

http://www.cnblogs.com/457220157-FTD/p/5546545.html

https://www.jianshu.com/p/3b6aa8e32be5

sublimeLinter 检查代码软件

https://segmentfault.com/a/1190000000389188

themr 自动切换主题插件

可以下载predawn,过一会儿就会显示可以切换主题,ctrl + f5

Boxy

主题查考

https://scotch.io/@Viclotana/the-10-best-sublime-text-3-themes-of-2017#conclusion

user配置

default的翻译

  1. // While you can edit this file, it’s best to put your changes in
  2. // “User/Preferences.sublime-settings”, which overrides the settings in here.
  3. //
  4. // Settings may also be placed in file type specific options files, for
  5. // example, in Packages/Python/Python.sublime-settings for python files.
  6. {
  7. // Sets the colors used within the text area
  8. // 主题文件的路径
  9. color_scheme”: Packages/Color Scheme Default/Monokai.tmTheme”,
  10.  
  11. // Note that the font_face and font_size are overriden in the platform
  12. // specific settings file, for example, “Preferences (Linux).sublime-settings”.
  13. // Because of this, setting them here will have no effect: you must set them
  14. // in your User File Preferences.
  15. // 设置字体和大小,必须在Settings-User里重写,这里设置没有任何效果
  16. font_face”: Consolas”,
  17. font_size”: ,
  18.  
  19. // Valid options are “no_bold”, “no_italic”, “no_antialias”, “gray_antialias”,
  20. // “subpixel_antialias” and “no_round” (OS X only)
  21. // 字体选项:no_bold不显示粗体字,no_italic不显示斜体字,no_antialias和no_antialias关闭反锯齿
  22. // subpixel_antialias和no_round是OS X系统独有的
  23. font_options”: [],
  24.  
  25. // Characters that are considered to separate words
  26. // 在文字上双击会全选当前的内容,如果里面出现以下字符,就会被截断
  27. word_separators”: “./\\()\”‘-:,.;<>~!@#$%^&*|+=[]{}`~?”,
  28.  
  29. // Set to false to prevent line numbers being drawn in the gutter
  30. // 是否显示行号
  31. “line_numbers”: true,
  32.  
  33. // Set to false to hide the gutter altogether
  34. // 是否显示行号边栏
  35. “gutter”: true,
  36.  
  37. // Spacing between the gutter and the text
  38. //行号边栏和文字的间距
  39. “margin”: ,
  40.  
  41. // Fold buttons are the triangles shown in the gutter to fold regions of text
  42. // 是否显示代码折叠按钮
  43. “fold_buttons”: true,
  44.  
  45. // Hides the fold buttons unless the mouse is over the gutter
  46. // 不管鼠标在不在行号边栏,代码折叠按钮一直显示
  47. “fade_fold_buttons”: true,
  48.  
  49. // Columns in which to display vertical rulers
  50. //列显示垂直标尺,在中括号里填入数字,宽度按字符计算
  51. “rulers”: [],
  52.  
  53. // Set to true to turn spell checking on by default
  54. // 是否打开拼写检查
  55. “spell_check”: false,
  56.  
  57. // The number of spaces a tab is considered equal to
  58. // Tab键制表符宽度
  59. “tab_size”: ,
  60.  
  61. // Set to true to insert spaces when tab is pressed
  62. // 设为true时,缩进和遇到Tab键时使用空格替代
  63. “translate_tabs_to_spaces”: false,
  64.  
  65. // If translate_tabs_to_spaces is true, use_tab_stops will make tab and
  66. // backspace insert/delete up to the next tabstop
  67. // translate_tabs_to_spaces设置为true,Tab和Backspace的删除/插入作用于制表符宽度
  68. // 否则作用于单个空格
  69. “use_tab_stops”: true,
  70.  
  71. // Set to false to disable detection of tabs vs. spaces on load
  72. // false时禁止在载入的时候检测制表符和空格
  73. “detect_indentation”: true,
  74.  
  75. // Calculates indentation automatically when pressing enter
  76. // 按回车时,自动与制表位对齐
  77. “auto_indent”: true,
  78.  
  79. // Makes auto indent a little smarter, e.g., by indenting the next line
  80. // after an if statement in C. Requires auto_indent to be enabled.
  81. //针对C语言的
  82. “smart_indent”: false,
  83.  
  84. // Adds whitespace up to the first open bracket when indenting. Requires
  85. // auto_indent to be enabled.
  86. // 需要启用auto_indent,第一次打开括号缩进时插入空格?(没测试出来效果…)
  87. “indent_to_bracket”: true,
  88.  
  89. // Trims white space added by auto_indent when moving the caret off the
  90. // line.
  91. // 显示对齐的白线是否根据回车、tab等操作自动填补
  92. “trim_automatic_white_space”: true,
  93.  
  94. // Disables horizontal scrolling if enabled.
  95. // May be set to true, false, or “auto”, where it will be disabled for
  96. // source code, and otherwise enabled.
  97. // 是否自动换行,如果选auto,需要加双引号
  98. “word_wrap”: false,
  99.  
  100. // Set to a value other than 0 to force wrapping at that column rather than the
  101. // window width
  102. // 设置窗口内文字区域的宽度
  103. “wrap_width”: ,
  104.  
  105. // Set to false to prevent word wrapped lines from being indented to the same
  106. // level
  107. // 防止被缩进到同一级的字换行
  108. “indent_subsequent_lines”: true,
  109.  
  110. // Draws text centered in the window rather than left aligned
  111. // 如果没有定义过,则文件居中显示(比如新建的文件)
  112. “draw_centered”: false,
  113.  
  114. // Controls auto pairing of quotes, brackets etc
  115. // 自动匹配引号,括号等
  116. “auto_match_enabled”: true,
  117.  
  118. // Word list to use for spell checking
  119. // 拼写检查的单词列表路径
  120. “dictionary”: “Packages/Language – English/en_US.dic”,
  121.  
  122. // Set to true to draw a border around the visible rectangle on the minimap.
  123. // The color of the border will be determined by the “minimapBorder” key in
  124. // the color scheme
  125. // 代码地图的可视区域部分是否加上边框,边框的颜色可在配色方案上加入minimapBorder键
  126. “draw_minimap_border”: false,
  127.  
  128. // If enabled, will highlight any line with a caret
  129. // 突出显示当前光标所在的行
  130. “highlight_line”: false,
  131.  
  132. // Valid values are “smooth”, “phase”, “blink”, “wide” and “solid”.
  133. // 设置光标闪动方式
  134. “caret_style”: “smooth”,
  135.  
  136. // Set to false to disable underlining the brackets surrounding the caret
  137. // 是否特殊显示当前光标所在的括号、代码头尾闭合标记
  138. “match_brackets”: true,
  139.  
  140. // Set to false if you’d rather only highlight the brackets when the caret is
  141. // next to one
  142. // 设为false时,只有光标在括号或头尾闭合标记的两端时,match_brackets才生效
  143. “match_brackets_content”: true,
  144.  
  145. // Set to false to not highlight square brackets. This only takes effect if
  146. // match_brackets is true
  147. // 是否突出显示圆括号,match_brackets为true生效
  148. “match_brackets_square”: false,
  149.  
  150. // Set to false to not highlight curly brackets. This only takes effect if
  151. // match_brackets is true
  152. // 是否突出显示大括号,match_brackets为true生效
  153. “match_brackets_braces”: false,
  154.  
  155. // Set to false to not highlight angle brackets. This only takes effect if
  156. // match_brackets is true
  157. // 是否突出显示尖括号,match_brackets为true生效
  158. “match_brackets_angle”: false,
  159.  
  160. // Enable visualization of the matching tag in HTML and XML
  161. // html和xml下突出显示光标所在标签的两端,影响HTML、XML、CSS等
  162. “match_tags”: true,
  163.  
  164. // Highlights other occurrences of the currently selected text
  165. // 全文突出显示和当前选中字符相同的字符
  166. “match_selection”: true,
  167.  
  168. // 设置每一行到顶部,以像素为单位的间距,效果相当于行距
  169. “line_padding_top”: ,
  170.  
  171. // 设置每一行到底部,以像素为单位的间距,效果相当于行距
  172. “line_padding_bottom”: ,
  173.  
  174. // 设置为false时,滚动到文本的最下方时,没有缓冲区
  175. “scroll_past_end”: true,
  176.  
  177. // 控制向上或向下到第一行或最后一行时发生什么(没明白也没试出来)
  178. “move_to_limit_on_up_down”: false,
  179.  
  180. // 按space或tab时,实际会产生白色的点(一个空格一个点)或白色的横线(tab_size设置的制表符的宽度),选中状态下才能看到
  181. // 设置为none时,什么情况下都不显示这些点和线
  182. // 设置为selection时,只显示选中状态下的点和线
  183. // 设置为all时,则一直显示
  184. “draw_white_space”: “selection”,
  185.  
  186. // 制表位的对齐白线是否显示,颜色可在主题文件里设置(guide,activeGuide,stackGuide)
  187. “draw_indent_guides”: true,
  188.  
  189. // 制表位的对齐白线,draw_normal为一直显示,draw_active为只显示当前光标所在的代码控制域
  190. “indent_guide_options”: ["draw_normal"],
  191.  
  192. // 为true时,保存文件时会删除每行结束后多余的空格
  193. “trim_trailing_white_space_on_save”: false,
  194.  
  195. // 为true时,保存文件时光标会在文件的最后向下换一行
  196. “ensure_newline_at_eof_on_save”: false,
  197.  
  198. // 切换到其它文件标签或点击其它非本软件区域,文件自动保存
  199. “save_on_focus_lost”: false,
  200.  
  201. // 编码时不能自动检测编码时,将自动检测ASCII, UTF-8 和 UTF-16
  202. “fallback_encoding”: “Western (Windows )”,
  203.  
  204. // 默认编码格式
  205. “default_encoding”: “UTF-〃,
  206.  
  207. // 包含空字节的文件被打开默认为十六进制
  208. “enable_hexadecimal_encoding”: true,
  209.  
  210. // 每一行结束的时候用什么字符做终止符
  211. “default_line_ending”: “system”,
  212.  
  213. // 设置为enabled时,在一个字符串间按Tab将插入一个制表符
  214. // 设置为true时,按Tab会根据前后环境进行代码自动匹配填补
  215. “tab_completion”: true,
  216.  
  217. // 代码提示
  218. “auto_complete”: true,
  219.  
  220. // 代码提示的大小限制
  221. “auto_complete_size_limit”: ,
  222.  
  223. // 代码提示延迟显示
  224. “auto_complete_delay”: ,
  225.  
  226. // 代码提示的控制范围
  227. “auto_complete_selector”: “source – comment”,
  228.  
  229. // 触发代码提示的其他情况
  230. “auto_complete_triggers”: [ {"selector": "text.html", "characters": "<"} ],
  231.  
  232. // 设为false时,选择提示的代码按回车或点击可以输出出来,但选择true时不会输出而是直接换行
  233. “auto_complete_commit_on_tab”: false,
  234.  
  235. “auto_complete_with_fields”: false,
  236.  
  237. // 设置为false,使用Shift + tab总是插入制表符
  238. “shift_tab_unindent”: true,
  239.  
  240. // 选中的文本按Ctrl + f时,自动复制到查找面板的文本框里
  241. “find_selected_text”: true,
  242.  
  243. // Data\Packages\Theme – Default\Default.sublime-theme控制软件的主题
  244. “theme”: “Default.sublime-theme”,
  245.  
  246. // 滚动的速度
  247. “scroll_speed”: 1.0,
  248.  
  249. // 左边边栏文件夹动画
  250. “tree_animation_enabled”: true,
  251.  
  252. // 标签页的关闭按钮
  253. “show_tab_close_buttons”: true,
  254. // Valid values are “system”, “enabled” and “disabled”
  255.  
  256. // 水平垂直滚动条:system和disabled为默认显示方式,enabled为自动隐藏显示
  257. “overlay_scroll_bars”: “system”,
  258.  
  259. }

现在我用的user配置:

ubuntu 2018-02-15 21:34:32

  1. {
  2.  
  3. //在default那里的,如果你不重写,就默认是用default
  4.  
  5. //这个是设置主题路径
  6. "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
  7.  
  8. //设置字体样式,需要显示的字体名字(请参照自己电脑存在的字体或下载安装需要的字体)
  9. "font_face": "YaHei Consolas Hybrid",
  10. //设置字体大小
  11. "font_size": ,
  12.  
  13. //是否打开拼写检查
  14. "spell_check": false,
  15.  
  16. //tab键大小
  17. "tab_size": ,
  18.  
  19. //设置是否自动匹配括号,引号之类的。
  20. "auto_match_enabled": false,
  21.  
  22. //突出当前光标所在的行,待用
  23. "highlight_line": false,
  24.  
  25. // Valid values are “smooth”, “phase”, “blink”, “wide” and “solid”.
  26. // 设置光标闪动方式
  27. "caret_style": "smooth", //还没测试出效果
  28.  
  29. // 设置为enabled时,在一个字符串间按Tab将插入一个制表符
  30. //设置为true时,按Tab会根据前后环境进行代码自动匹配填补
  31. "tab_completion": "enabled", // 这个弄不了的???,这样的话,tab键编程了写html的
  32.  
  33. //设置自动换行为false,自动换行就是那个,一行显示不完全,就自动跳去下一行。
  34. "word_wrap": false,
  35.  
  36. // Display file encoding in the status bar
  37. "show_encoding":true,
  38.  
  39. // Display line endings in the status bar
  40. "show_line_endings": true,
  41.  
  42. //取消检查更新
  43. "update_check": false,
  44.  
  45. //忽略掉的包,我不用vim这个包
  46. "ignored_packages": ["Vintage"]
  47. }

"font_options": ["no_bold", "no_italic", "no_antialias", "gray_antialias",],
"font_size": 12,
"font_face": "YaHei Consolas Hybrid",

no_italic:不是斜体显示(也叫意大利字体样式显示);

no_antialias:无反图像失真或反锯齿显示;

gray_antialias";反图像灰度值失真显示;

以上参数去掉no_或不写入得相反效果;

font_size:字体的大小;

font_face;需要显示的字体名字(请参照自己电脑存在的字体或下载安装需要的字体)

快捷键配置  

2018-05-29 22:54:36

  1. [
  2. //注释快捷键
  3. { "keys": ["ctrl+shift+c"], "command": "toggle_comment", "args": { "block": false } },
  4.  
  5. //代码提示功能
  6. { "keys": ["ctrl+space"], "command": "auto_complete" },
  7. { "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
  8. [
  9. { "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
  10. { "key": "auto_complete_visible", "operator": "equal", "operand": false },
  11. { "key": "setting.tab_completion", "operator": "equal", "operand": true }
  12. ]
  13. },
  14.  
  15. // 运行文件
  16. { "keys": ["f9"], "command": "build" },
  17.  
  18. //代码格式化
  19. { "keys": ["alt+f8"], "command": "reindent" },
  20.  
  21. //打开跳去指定行的操作
  22. { "keys": ["ctrl+escape"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
  23.  
  24. //
  25. { "keys": ["ctrl+shift+t"], "command": "reopen_last_file" },
  26. { "keys": ["ctrl+w"], "command": "close" },
  27.  
  28. /*Terminal plug*/
  29. { "keys": ["ctrl+shift+o"], "command": "open_terminal_project_folder" },
  30.  
  31. { "command": "add_info", "keys": ["ctrl+shift+."] },
  32.  
  33. { "keys": ["ctrl+j"], "command": "jump_forward"},
  34. { "keys": ["ctrl+k"], "command": "jump_back"},
  35.  
  36. { "keys": ["ctrl+d"], "command": "godef" },
  37.  
  38. { "keys": ["ctrl+alt+i"], "command": "java_import_path" },
  39.  
  40. { "keys": ["ctrl+shift+r"], "command": "reveal_in_side_bar"},
  41.  
  42. { "keys": "tab", "command": "insert", "args": {"characters": "\t"} },
  43.  
  44. { "keys": ["f2"], "command": "rename_file", "args": { "paths": ["$file"] } }
  45. ]
  1. [
  2. //注释快捷键
  3. { "keys": ["ctrl+shift+c"], "command": "toggle_comment", "args": { "block": false } },
  4.  
  5. //代码提示功能
  6. { "keys": ["ctrl+space"], "command": "auto_complete" },
  7. { "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
  8. [
  9. { "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
  10. { "key": "auto_complete_visible", "operator": "equal", "operand": false },
  11. { "key": "setting.tab_completion", "operator": "equal", "operand": true }
  12. ]
  13. },
  14.  
  15. // 运行文件
  16. { "keys": ["f9"], "command": "build" },
  17.  
  18. //代码格式化
  19. { "keys": ["alt+f8"], "command": "reindent" },
  20.  
  21. //打开跳去指定行的操作
  22. { "keys": ["alt+`"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
  23.  
  24. //这个是为了适合chrome,要明确写出来,不然被其他插件的defalut代替了。然后搜索的时候,按一个键就匹配去下一个的话,上面就搜索不了了  //也就是说不一定不存在这个命令,需要你一次性整一个复制进去搜索
  25. { "keys": ["ctrl+shift+t"], "command": "reopen_last_file" },
  26. { "keys": ["ctrl+w"], "command": "close" },
  27.  
  28. /*Terminal plug*/
  29. { "keys": ["ctrl+shift+o"], "command": "open_terminal_project_folder" },
  30.  
  31. //按下整个就生成注释,需要自己写一个插件的
  32. { "command": "add_info", "keys": ["ctrl+shift+."]},
  33.  
  34. { "keys": ["ctrl+j"], "command": "jump_forward"},
  35. { "keys": ["ctrl+k"], "command": "jump_back"},
  36.  
  37. { "keys": ["ctrl+d"], "command": "godef" },
  38.  
  39. /*
  40. On OS X, basic text manipulations (left, right, command+left, etc) make use of the system key bindings,
  41. and don't need to be repeated here. Anything listed here will take precedence, however.
  42. */
  43.  
  44. { "keys": ["ctrl+shift+n"], "command": "new_window" },
  45. { "keys": ["ctrl+shift+w"], "command": "close_window" },
  46. { "keys": ["ctrl+o"], "command": "prompt_open" },
  47. { "keys": ["ctrl+shift+t"], "command": "reopen_last_file" },
  48. { "keys": ["ctrl+alt+up"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "hh", "h", "ipp", "inl", "m", "mm"]} },
  49. { "keys": ["ctrl+n"], "command": "new_file" },
  50. { "keys": ["ctrl+s"], "command": "save" },
  51. { "keys": ["ctrl+shift+s"], "command": "prompt_save_as" },
  52. { "keys": ["ctrl+alt+s"], "command": "save_all" },
  53. { "keys": ["ctrl+w"], "command": "close" },
  54.  
  55. { "keys": ["ctrl+ctrl+f"], "command": "toggle_full_screen" },
  56. { "keys": ["ctrl+ctrl+shift+f"], "command": "toggle_distraction_free" },
  57.  
  58. { "keys": ["ctrl+z"], "command": "undo" },
  59. { "keys": ["ctrl+shift+z"], "command": "redo" },
  60. { "keys": ["ctrl+y"], "command": "redo_or_repeat" },
  61. { "keys": ["ctrl+u"], "command": "soft_undo" },
  62. { "keys": ["ctrl+shift+u"], "command": "soft_redo" },
  63.  
  64. { "keys": ["ctrl+x"], "command": "cut" },
  65. { "keys": ["ctrl+c"], "command": "copy" },
  66. { "keys": ["ctrl+v"], "command": "paste" },
  67. { "keys": ["ctrl+shift+v"], "command": "paste_and_indent" },
  68. { "keys": ["ctrl+option+v"], "command": "paste_from_history" },
  69.  
  70. { "keys": ["ctrl+alt+left"], "command": "move", "args": {"by": "subwords", "forward": false} },
  71. { "keys": ["ctrl+alt+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },
  72. { "keys": ["ctrl+alt+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} },
  73. { "keys": ["ctrl+alt+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} },
  74.  
  75. { "keys": ["ctrl+left"], "command": "move", "args": {"by": "subwords", "forward": false} },
  76. { "keys": ["ctrl+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },
  77. { "keys": ["ctrl+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} },
  78. { "keys": ["ctrl+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} },
  79.  
  80. { "keys": ["ctrl+alt+up"], "command": "scroll_lines", "args": {"amount": 1.0} },
  81. { "keys": ["ctrl+alt+down"], "command": "scroll_lines", "args": {"amount": -1.0} },
  82.  
  83. { "keys": ["ctrl+shift+up"], "command": "select_lines", "args": {"forward": false} },
  84. { "keys": ["ctrl+shift+down"], "command": "select_lines", "args": {"forward": true} },
  85.  
  86. { "keys": ["ctrl+shift+["], "command": "prev_view" },
  87. { "keys": ["ctrl+shift+]"], "command": "next_view" },
  88. { "keys": ["ctrl+alt+left"], "command": "prev_view" },
  89. { "keys": ["ctrl+alt+right"], "command": "next_view" },
  90.  
  91. { "keys": ["ctrl+tab"], "command": "next_view_in_stack" },
  92. { "keys": ["ctrl+shift+tab"], "command": "prev_view_in_stack" },
  93.  
  94. { "keys": ["ctrl+a"], "command": "select_all" },
  95. { "keys": ["ctrl+shift+l"], "command": "split_selection_into_lines" },
  96. { "keys": ["escape"], "command": "single_selection", "context":
  97. [
  98. { "key": "num_selections", "operator": "not_equal", "operand": }
  99. ]
  100. },
  101. { "keys": ["escape"], "command": "clear_fields", "context":
  102. [
  103. { "key": "has_next_field", "operator": "equal", "operand": true }
  104. ]
  105. },
  106. { "keys": ["escape"], "command": "clear_fields", "context":
  107. [
  108. { "key": "has_prev_field", "operator": "equal", "operand": true }
  109. ]
  110. },
  111. { "keys": ["escape"], "command": "hide_panel", "args": {"cancel": true},
  112. "context":
  113. [
  114. { "key": "panel_visible", "operator": "equal", "operand": true }
  115. ]
  116. },
  117. { "keys": ["escape"], "command": "hide_overlay", "context":
  118. [
  119. { "key": "overlay_visible", "operator": "equal", "operand": true }
  120. ]
  121. },
  122. { "keys": ["escape"], "command": "hide_popup", "context":
  123. [
  124. { "key": "popup_visible", "operator": "equal", "operand": true }
  125. ]
  126. },
  127. { "keys": ["escape"], "command": "hide_auto_complete", "context":
  128. [
  129. { "key": "auto_complete_visible", "operator": "equal", "operand": true }
  130. ]
  131. },
  132.  
  133. { "keys": ["ctrl+]"], "command": "indent" },
  134. { "keys": ["ctrl+["], "command": "unindent" },
  135.  
  136. { "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": true} },
  137. { "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": false},
  138. "context":
  139. [
  140. { "key": "setting.tab_completion", "operator": "equal", "operand": true },
  141. { "key": "preceding_text", "operator": "not_regex_match", "operand": ".*\\b[0-9]+$", "match_all": true },
  142. ]
  143. },
  144. { "keys": ["tab"], "command": "replace_completion_with_next_completion", "context":
  145. [
  146. { "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
  147. { "key": "setting.tab_completion", "operator": "equal", "operand": true }
  148. ]
  149. },
  150. { "keys": ["tab"], "command": "reindent", "context":
  151. [
  152. { "key": "setting.auto_indent", "operator": "equal", "operand": true },
  153. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  154. { "key": "preceding_text", "operator": "regex_match", "operand": "^$", "match_all": true },
  155. { "key": "following_text", "operator": "regex_match", "operand": "^$", "match_all": true }
  156. ]
  157. },
  158. { "keys": ["tab"], "command": "indent", "context":
  159. [
  160. { "key": "text", "operator": "regex_contains", "operand": "\n" }
  161. ]
  162. },
  163. { "keys": ["tab"], "command": "next_field", "context":
  164. [
  165. { "key": "has_next_field", "operator": "equal", "operand": true }
  166. ]
  167. },
  168. { "keys": ["tab"], "command": "commit_completion", "context":
  169. [
  170. { "key": "auto_complete_visible" },
  171. { "key": "setting.auto_complete_commit_on_tab" }
  172. ]
  173. },
  174.  
  175. { "keys": ["shift+tab"], "command": "insert", "args": {"characters": "\t"} },
  176. { "keys": ["shift+tab"], "command": "unindent", "context":
  177. [
  178. { "key": "setting.shift_tab_unindent", "operator": "equal", "operand": true }
  179. ]
  180. },
  181. { "keys": ["shift+tab"], "command": "unindent", "context":
  182. [
  183. { "key": "preceding_text", "operator": "regex_match", "operand": "^[\t ]*" }
  184. ]
  185. },
  186. { "keys": ["shift+tab"], "command": "unindent", "context":
  187. [
  188. { "key": "text", "operator": "regex_contains", "operand": "\n" }
  189. ]
  190. },
  191. { "keys": ["shift+tab"], "command": "prev_field", "context":
  192. [
  193. { "key": "has_prev_field", "operator": "equal", "operand": true }
  194. ]
  195. },
  196.  
  197. { "keys": ["ctrl+l"], "command": "expand_selection", "args": {"to": "line"} },
  198.  
  199. { "keys": ["ctrl+shift+space"], "command": "expand_selection", "args": {"to": "scope"} },
  200. { "keys": ["ctrl+shift+m"], "command": "expand_selection", "args": {"to": "brackets"} },
  201. { "keys": ["ctrl+m"], "command": "move_to", "args": {"to": "brackets"} },
  202. { "keys": ["ctrl+shift+j"], "command": "expand_selection", "args": {"to": "indentation"} },
  203. { "keys": ["ctrl+shift+a"], "command": "expand_selection", "args": {"to": "tag"} },
  204.  
  205. { "keys": ["ctrl+alt+."], "command": "close_tag" },
  206.  
  207. { "keys": ["ctrl+q"], "command": "toggle_record_macro" },
  208. { "keys": ["ctrl+shift+q"], "command": "run_macro" },
  209.  
  210. { "keys": ["ctrl+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line.sublime-macro"} },
  211. { "keys": ["ctrl+shift+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line Before.sublime-macro"} },
  212. { "keys": ["enter"], "command": "commit_completion", "context":
  213. [
  214. { "key": "auto_complete_visible" },
  215. { "key": "setting.auto_complete_commit_on_tab", "operand": false }
  216. ]
  217. },
  218.  
  219. { "keys": ["ctrl+t"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
  220. { "keys": ["ctrl+shift+p"], "command": "show_overlay", "args": {"overlay": "command_palette"} },
  221. { "keys": ["ctrl+r"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
  222. { "keys": ["ctrl+g"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
  223. { "keys": ["f12"], "command": "goto_definition" },
  224. { "keys": ["ctrl+alt+down"], "command": "goto_definition" },
  225. { "keys": ["ctrl+shift+r"], "command": "goto_symbol_in_project" },
  226. { "keys": ["ctrl+minus"], "command": "jump_back" },
  227. { "keys": ["ctrl+shift+minus"], "command": "jump_forward" },
  228.  
  229. { "keys": ["ctrl+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse": false} },
  230. { "keys": ["ctrl+shift+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse": true} },
  231. { "keys": ["ctrl+f"], "command": "show_panel", "args": {"panel": "find", "reverse": false} },
  232. { "keys": ["ctrl+alt+f"], "command": "show_panel", "args": {"panel": "replace", "reverse": false} },
  233. { "keys": ["ctrl+alt+e"], "command": "replace_next" },
  234. { "keys": ["ctrl+g"], "command": "find_next" },
  235. { "keys": ["ctrl+shift+g"], "command": "find_prev" },
  236. { "keys": ["ctrl+e"], "command": "slurp_find_string" },
  237. { "keys": ["ctrl+shift+e"], "command": "slurp_replace_string" },
  238.  
  239. { "keys": ["alt+ctrl+g"], "command": "find_under" },
  240. { "keys": ["shift+alt+ctrl+g"], "command": "find_under_prev" },
  241. { "keys": ["ctrl+ctrl+g"], "command": "find_all_under" },
  242.  
  243. { "keys": ["ctrl+shift+f"], "command": "show_panel", "args": {"panel": "find_in_files"} },
  244. { "keys": ["f4"], "command": "next_result" },
  245. { "keys": ["shift+f4"], "command": "prev_result" },
  246.  
  247. { "keys": ["f6"], "command": "toggle_setting", "args": {"setting": "spell_check"} },
  248. { "keys": ["ctrl+f6"], "command": "next_misspelling" },
  249. { "keys": ["ctrl+shift+f6"], "command": "prev_misspelling" },
  250.  
  251. { "keys": ["ctrl+ctrl+up"], "command": "swap_line_up" },
  252. { "keys": ["ctrl+ctrl+down"], "command": "swap_line_down" },
  253.  
  254. { "keys": ["ctrl+backspace"], "command": "delete_word", "args": { "forward": false, "sub_words": true } },
  255. { "keys": ["ctrl+delete"], "command": "delete_word", "args": { "forward": true, "sub_words": true } },
  256.  
  257. { "keys": ["ctrl+forward_slash"], "command": "toggle_comment", "args": { "block": false } },
  258. { "keys": ["ctrl+alt+forward_slash"], "command": "toggle_comment", "args": { "block": true } },
  259.  
  260. { "keys": ["ctrl+shift+d"], "command": "duplicate_line" },
  261.  
  262. { "keys": ["ctrl+backquote"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
  263.  
  264. { "keys": ["ctrl+space"], "command": "auto_complete" },
  265. { "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
  266. [
  267. { "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
  268. { "key": "auto_complete_visible", "operator": "equal", "operand": false },
  269. { "key": "setting.tab_completion", "operator": "equal", "operand": true }
  270. ]
  271. },
  272.  
  273. { "keys": ["ctrl+alt+p"], "command": "show_scope_name" },
  274. { "keys": ["ctrl+shift+p"], "command": "show_scope_name" },
  275.  
  276. { "keys": ["f7"], "command": "build" },
  277. { "keys": ["ctrl+b"], "command": "build" },
  278. { "keys": ["ctrl+shift+b"], "command": "build", "args": {"select": true} },
  279.  
  280. { "keys": ["ctrl+t"], "command": "transpose" },
  281.  
  282. { "keys": ["f5"], "command": "sort_lines", "args": {"case_sensitive": false} },
  283. { "keys": ["ctrl+f5"], "command": "sort_lines", "args": {"case_sensitive": true} },
  284.  
  285. // Auto-pair quotes
  286. { "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"$0\""}, "context":
  287. [
  288. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  289. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  290. { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
  291. { "key": "preceding_text", "operator": "not_regex_contains", "operand": "[\"a-zA-Z0-9_]$", "match_all": true },
  292. { "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true }
  293. ]
  294. },
  295. { "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"${0:$SELECTION}\""}, "context":
  296. [
  297. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  298. { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
  299. ]
  300. },
  301. { "keys": ["\""], "command": "move", "args": {"by": "characters", "forward": true}, "context":
  302. [
  303. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  304. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  305. { "key": "following_text", "operator": "regex_contains", "operand": "^\"", "match_all": true },
  306. { "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
  307. { "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true },
  308. ]
  309. },
  310. { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
  311. [
  312. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  313. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  314. { "key": "preceding_text", "operator": "regex_contains", "operand": "\"$", "match_all": true },
  315. { "key": "following_text", "operator": "regex_contains", "operand": "^\"", "match_all": true },
  316. { "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
  317. { "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true },
  318. ]
  319. },
  320.  
  321. // Auto-pair single quotes
  322. { "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'$0'"}, "context":
  323. [
  324. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  325. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  326. { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
  327. { "key": "preceding_text", "operator": "not_regex_contains", "operand": "['a-zA-Z0-9_]$", "match_all": true },
  328. { "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true }
  329. ]
  330. },
  331. { "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'${0:$SELECTION}'"}, "context":
  332. [
  333. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  334. { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
  335. ]
  336. },
  337. { "keys": ["'"], "command": "move", "args": {"by": "characters", "forward": true}, "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": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true },
  342. { "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
  343. { "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true },
  344. ]
  345. },
  346. { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
  347. [
  348. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  349. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  350. { "key": "preceding_text", "operator": "regex_contains", "operand": "'$", "match_all": true },
  351. { "key": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true },
  352. { "key": "selector", "operator": "not_equal", "operand": "punctuation.definition.string.begin", "match_all": true },
  353. { "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true },
  354. ]
  355. },
  356.  
  357. // Auto-pair brackets
  358. { "keys": ["("], "command": "insert_snippet", "args": {"contents": "($0)"}, "context":
  359. [
  360. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  361. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  362. { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true }
  363. ]
  364. },
  365. { "keys": ["("], "command": "insert_snippet", "args": {"contents": "(${0:$SELECTION})"}, "context":
  366. [
  367. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  368. { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
  369. ]
  370. },
  371. { "keys": [")"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
  372. [
  373. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  374. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  375. { "key": "following_text", "operator": "regex_contains", "operand": "^\\)", "match_all": true }
  376. ]
  377. },
  378. { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
  379. [
  380. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  381. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  382. { "key": "preceding_text", "operator": "regex_contains", "operand": "\\($", "match_all": true },
  383. { "key": "following_text", "operator": "regex_contains", "operand": "^\\)", "match_all": true }
  384. ]
  385. },
  386.  
  387. // Auto-pair square brackets
  388. { "keys": ["["], "command": "insert_snippet", "args": {"contents": "[$0]"}, "context":
  389. [
  390. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  391. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  392. { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true }
  393. ]
  394. },
  395. { "keys": ["["], "command": "insert_snippet", "args": {"contents": "[${0:$SELECTION}]"}, "context":
  396. [
  397. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  398. { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
  399. ]
  400. },
  401. { "keys": ["]"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
  402. [
  403. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  404. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  405. { "key": "following_text", "operator": "regex_contains", "operand": "^\\]", "match_all": true }
  406. ]
  407. },
  408. { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
  409. [
  410. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  411. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  412. { "key": "preceding_text", "operator": "regex_contains", "operand": "\\[$", "match_all": true },
  413. { "key": "following_text", "operator": "regex_contains", "operand": "^\\]", "match_all": true }
  414. ]
  415. },
  416.  
  417. // Auto-pair curly brackets
  418. { "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{$0}"}, "context":
  419. [
  420. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  421. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  422. { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|$)", "match_all": true }
  423. ]
  424. },
  425. { "keys": ["{"], "command": "wrap_block", "args": {"begin": "{", "end": "}"}, "context":
  426. [
  427. { "key": "indented_block", "match_all": true },
  428. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  429. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  430. { "key": "following_text", "operator": "regex_match", "operand": "^$", "match_all": true },
  431. ]
  432. },
  433. { "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{${0:$SELECTION}}"}, "context":
  434. [
  435. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  436. { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
  437. ]
  438. },
  439. { "keys": ["}"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
  440. [
  441. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  442. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  443. { "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
  444. ]
  445. },
  446. { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
  447. [
  448. { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
  449. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  450. { "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
  451. { "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
  452. ]
  453. },
  454.  
  455. { "keys": ["enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}, "context":
  456. [
  457. { "key": "setting.auto_indent", "operator": "equal", "operand": true },
  458. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  459. { "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
  460. { "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
  461. ]
  462. },
  463. { "keys": ["shift+enter"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Add Line in Braces.sublime-macro"}, "context":
  464. [
  465. { "key": "setting.auto_indent", "operator": "equal", "operand": true },
  466. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  467. { "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
  468. { "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
  469. ]
  470. },
  471.  
  472. { "keys": ["enter"], "command": "auto_indent_tag", "context":
  473. [
  474. { "key": "setting.auto_indent", "operator": "equal", "operand": true },
  475. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  476. { "key": "selector", "operator": "equal", "operand": "punctuation.definition.tag.begin", "match_all": true },
  477. { "key": "preceding_text", "operator": "regex_contains", "operand": ">$", "match_all": true },
  478. { "key": "following_text", "operator": "regex_contains", "operand": "^</", "match_all": true },
  479. ]
  480. },
  481. { "keys": ["shift+enter"], "command": "auto_indent_tag", "context":
  482. [
  483. { "key": "setting.auto_indent", "operator": "equal", "operand": true },
  484. { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  485. { "key": "selector", "operator": "equal", "operand": "punctuation.definition.tag.begin", "match_all": true },
  486. { "key": "preceding_text", "operator": "regex_contains", "operand": ">$", "match_all": true },
  487. { "key": "following_text", "operator": "regex_contains", "operand": "^</", "match_all": true },
  488. ]
  489. },
  490.  
  491. {
  492. "keys": ["ctrl+alt+1"],
  493. "command": "set_layout",
  494. "args":
  495. {
  496. "cols": [0.0, 1.0],
  497. "rows": [0.0, 1.0],
  498. "cells": [[, , , ]]
  499. }
  500. },
  501. {
  502. "keys": ["ctrl+alt+2"],
  503. "command": "set_layout",
  504. "args":
  505. {
  506. "cols": [0.0, 0.5, 1.0],
  507. "rows": [0.0, 1.0],
  508. "cells": [[, , , ], [, , , ]]
  509. }
  510. },
  511. {
  512. "keys": ["ctrl+alt+3"],
  513. "command": "set_layout",
  514. "args":
  515. {
  516. "cols": [0.0, 0.33, 0.66, 1.0],
  517. "rows": [0.0, 1.0],
  518. "cells": [[, , , ], [, , , ], [, , , ]]
  519. }
  520. },
  521. {
  522. "keys": ["ctrl+alt+4"],
  523. "command": "set_layout",
  524. "args":
  525. {
  526. "cols": [0.0, 0.25, 0.5, 0.75, 1.0],
  527. "rows": [0.0, 1.0],
  528. "cells": [[, , , ], [, , , ], [, , , ], [, , , ]]
  529. }
  530. },
  531. {
  532. "keys": ["ctrl+alt+shift+2"],
  533. "command": "set_layout",
  534. "args":
  535. {
  536. "cols": [0.0, 1.0],
  537. "rows": [0.0, 0.5, 1.0],
  538. "cells": [[, , , ], [, , , ]]
  539. }
  540. },
  541. {
  542. "keys": ["ctrl+alt+shift+3"],
  543. "command": "set_layout",
  544. "args":
  545. {
  546. "cols": [0.0, 1.0],
  547. "rows": [0.0, 0.33, 0.66, 1.0],
  548. "cells": [[, , , ], [, , , ], [, , , ]]
  549. }
  550. },
  551. {
  552. "keys": ["ctrl+alt+5"],
  553. "command": "set_layout",
  554. "args":
  555. {
  556. "cols": [0.0, 0.5, 1.0],
  557. "rows": [0.0, 0.5, 1.0],
  558. "cells":
  559. [
  560. [, , , ], [, , , ],
  561. [, , , ], [, , , ]
  562. ]
  563. }
  564. },
  565. { "keys": ["ctrl+1"], "command": "focus_group", "args": { "group": } },
  566. { "keys": ["ctrl+2"], "command": "focus_group", "args": { "group": } },
  567. { "keys": ["ctrl+3"], "command": "focus_group", "args": { "group": } },
  568. { "keys": ["ctrl+4"], "command": "focus_group", "args": { "group": } },
  569. { "keys": ["ctrl+5"], "command": "focus_group", "args": { "group": } },
  570. { "keys": ["ctrl+6"], "command": "focus_group", "args": { "group": } },
  571. { "keys": ["ctrl+7"], "command": "focus_group", "args": { "group": } },
  572. { "keys": ["ctrl+8"], "command": "focus_group", "args": { "group": } },
  573. { "keys": ["ctrl+9"], "command": "focus_group", "args": { "group": } },
  574. { "keys": ["ctrl+shift+1"], "command": "move_to_group", "args": { "group": } },
  575. { "keys": ["ctrl+shift+2"], "command": "move_to_group", "args": { "group": } },
  576. { "keys": ["ctrl+shift+3"], "command": "move_to_group", "args": { "group": } },
  577. { "keys": ["ctrl+shift+4"], "command": "move_to_group", "args": { "group": } },
  578. { "keys": ["ctrl+shift+5"], "command": "move_to_group", "args": { "group": } },
  579. { "keys": ["ctrl+shift+6"], "command": "move_to_group", "args": { "group": } },
  580. { "keys": ["ctrl+shift+7"], "command": "move_to_group", "args": { "group": } },
  581. { "keys": ["ctrl+shift+8"], "command": "move_to_group", "args": { "group": } },
  582. { "keys": ["ctrl+shift+9"], "command": "move_to_group", "args": { "group": } },
  583. { "keys": ["ctrl+0"], "command": "focus_side_bar" },
  584.  
  585. { "keys": ["ctrl+1"], "command": "select_by_index", "args": { "index": } },
  586. { "keys": ["ctrl+2"], "command": "select_by_index", "args": { "index": } },
  587. { "keys": ["ctrl+3"], "command": "select_by_index", "args": { "index": } },
  588. { "keys": ["ctrl+4"], "command": "select_by_index", "args": { "index": } },
  589. { "keys": ["ctrl+5"], "command": "select_by_index", "args": { "index": } },
  590. { "keys": ["ctrl+6"], "command": "select_by_index", "args": { "index": } },
  591. { "keys": ["ctrl+7"], "command": "select_by_index", "args": { "index": } },
  592. { "keys": ["ctrl+8"], "command": "select_by_index", "args": { "index": } },
  593. { "keys": ["ctrl+9"], "command": "select_by_index", "args": { "index": } },
  594. { "keys": ["ctrl+0"], "command": "select_by_index", "args": { "index": } },
  595.  
  596. { "keys": ["f2"], "command": "next_bookmark" },
  597. { "keys": ["shift+f2"], "command": "prev_bookmark" },
  598. { "keys": ["ctrl+f2"], "command": "toggle_bookmark" },
  599. { "keys": ["ctrl+shift+f2"], "command": "clear_bookmarks" },
  600. { "keys": ["alt+f2"], "command": "select_all_bookmarks" },
  601.  
  602. { "keys": ["ctrl+r"], "command": "next_bookmark" },
  603. { "keys": ["ctrl+shift+r"], "command": "toggle_bookmark" },
  604.  
  605. { "keys": ["ctrl+equals"], "command": "increase_font_size" },
  606. { "keys": ["ctrl+plus"], "command": "increase_font_size" },
  607. { "keys": ["ctrl+minus"], "command": "decrease_font_size" },
  608.  
  609. { "keys": ["ctrl+shift+w"], "command": "insert_snippet", "args": { "name": "Packages/XML/Snippets/long-tag.sublime-snippet" } },
  610.  
  611. { "keys": ["ctrl+shift+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
  612.  
  613. { "keys": ["ctrl+alt+q"], "command": "wrap_lines" },
  614.  
  615. { "keys": ["ctrl+alt+["], "command": "fold" },
  616. { "keys": ["ctrl+alt+]"], "command": "unfold" },
  617.  
  618. { "keys": ["ctrl+alt+o"], "command": "toggle_overwrite" },
  619.  
  620. { "keys": ["alt+f2"], "command": "context_menu" },
  621.  
  622. { "keys": ["ctrl+alt+c"], "command": "toggle_case_sensitive", "context":
  623. [
  624. { "key": "setting.is_widget", "operator": "equal", "operand": true }
  625. ]
  626. },
  627. { "keys": ["ctrl+alt+r"], "command": "toggle_regex", "context":
  628. [
  629. { "key": "setting.is_widget", "operator": "equal", "operand": true }
  630. ]
  631. },
  632. { "keys": ["ctrl+alt+w"], "command": "toggle_whole_word", "context":
  633. [
  634. { "key": "setting.is_widget", "operator": "equal", "operand": true }
  635. ]
  636. },
  637. { "keys": ["ctrl+alt+a"], "command": "toggle_preserve_case", "context":
  638. [
  639. { "key": "setting.is_widget", "operator": "equal", "operand": true }
  640. ]
  641. },
  642.  
  643. // Find panel key bindings
  644. { "keys": ["enter"], "command": "find_next", "context":
  645. [{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
  646. },
  647. { "keys": ["shift+enter"], "command": "find_prev", "context":
  648. [{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
  649. },
  650. { "keys": ["alt+enter"], "command": "find_all", "args": {"close_panel": true},
  651. "context": [{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
  652. },
  653.  
  654. // Replace panel key bindings
  655. { "keys": ["enter"], "command": "find_next", "context":
  656. [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
  657. },
  658. { "keys": ["shift+enter"], "command": "find_prev", "context":
  659. [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
  660. },
  661. { "keys": ["alt+enter"], "command": "find_all", "args": {"close_panel": true},
  662. "context": [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
  663. },
  664. { "keys": ["ctrl+alt+enter"], "command": "replace_all", "args": {"close_panel": true},
  665. "context": [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
  666. },
  667.  
  668. // Incremental find panel key bindings
  669. { "keys": ["enter"], "command": "hide_panel", "context":
  670. [{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
  671. },
  672. { "keys": ["shift+enter"], "command": "find_prev", "context":
  673. [{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
  674. },
  675. { "keys": ["alt+enter"], "command": "find_all", "args": {"close_panel": true},
  676. "context": [{"key": "panel", "operand": "incremental_find"}, {"key": "panel_has_focus"}]
  677. },
  678.  
  679. // Find in Files panel key bindings
  680. { "keys": ["alt+enter"], "command": "find_all",
  681. "context": [{"key": "panel", "operand": "find_in_files"}, {"key": "panel_has_focus"}]
  682. },
  683. { "keys": ["ctrl+alt+enter"], "command": "replace_all",
  684. "context": [{"key": "panel", "operand": "find_in_files"}, {"key": "panel_has_focus"}]
  685. },
  686.  
  687. { "keys": ["ctrl+,"], "command": "edit_settings", "args":
  688. {
  689. "base_file": "${packages}/Default/Preferences.sublime-settings",
  690. "default": "// Settings in here override those in \"Default/Preferences.sublime-settings\",\n// and are overridden in turn by syntax-specific settings.\n{\n\t$0\n}\n"
  691. }
  692. },
  693.  
  694. // These are OS X built in commands, and don't need to be listed here, but
  695. // doing so lets them show up in the menu
  696. { "keys": ["ctrl+backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard BOL.sublime-macro"} },
  697. // ctrl+delete isn't a built in command, but makes sense anyway
  698. { "keys": ["ctrl+delete"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
  699.  
  700. { "keys": ["ctrl+l"], "command": "show_at_center" },
  701. { "keys": ["ctrl+o"], "command": "insert_snippet", "args": { "contents": "$0\n" } },
  702. // { "keys": ["ctrl+ctrl+d"], "command": "noop" },
  703. { "keys": ["ctrl+ctrl+shift+d"], "command": "noop" },
  704.  
  705. // HTML, XML close tag
  706. { "keys": ["/"], "command": "close_tag", "args": { "insert_slash": true }, "context":
  707. [
  708. { "key": "selector", "operator": "equal", "operand": "(text.html, text.xml) - string - comment", "match_all": true },
  709. { "key": "preceding_text", "operator": "regex_match", "operand": ".*<$", "match_all": true },
  710. { "key": "setting.auto_close_tags" }
  711. ]
  712. }
  713. ]

-------------------------------------------------------------------------------------------------------------------------------------------------------

常用快捷键

1、把窗口变成两个:按alt+shift+2即可,或者利用菜单,view->layout->,选一个即可。

2、输入文件名,然后打开指定文件,ctrl + p

3、替换变量,ctrl + h,然后全部 替换就是ctrl + alt + p

4、跳转到某一行,ctrl + g

5、输入变量,跳转到哪里,ctrl + ;,就是冒号哪里

6、编辑多行, 选中多行,然后ctrl+shift+L

GCC中在cmd中打开,输入数据:https://zhidao.baidu.com/question/1047649305255045859.html

附录:sublime text中配置golang开发环境。

1、安装完golang后,如果不手动配GOPATH, GOBIN,GOROOT之类的东西,可以考虑插件goSublime

gosublime是一个插件

安装好GoSublime之后,如果你的环境变量GOPATH、GOPATH等没有设置好,或者要使用一个不一样的配置,可以打开Preferences -> Package Settings -> GoSublime -> Settings - user,按照下面的格式,填写你的配置内容:

首先,你的项目应该是这样的(建立在你的GOPATH/src),项目名:(src,pkg,bin),代码放在src上。

然后要在GOPATH中设置好路径,改成:

  1. {
  2. "env": {
  3. "GOROOT" : "/usr/lib/go-1.9",
  4. "GOBIN" : "/usr/lib/go-1.9/GOPATH/bin",
  5. "GOPATH" : "/usr/lib/go-1.9/GOPATH",
  6. },
  7.  
  8. "fmt_cmd": ["/usr/lib/go-1.9/GOPATH/bin/goimports"], //这个是go的包自动删除 or 添加的
  9.   
  10.  
  11.   // go get golang.org/x/tools/cmd/goimports
  12. }

中间用冒号【:】分割,这样才能识别你的项目。路径直到项目名就好,系统会帮我们找到src的

注意,mac用冒号分割,windows用分号分割(这个和windows自己设置path的时候是一致的)

{
"env": {
"GOROOT":"H:\\Golang", //go的安装路径
"GOBIN":"H:\\Golang\\bin;H:/Golang/project/liuweiming/bin",
"GOPATH": "H:\\Golang:\\project\\pro;H:/Golang/project/liuweiming", //您go的工作路径
"GOARCH":"amd64", //系统变量里面的 GOHOSTARCH ,386为32位平台,amd64为 64位平台
"GOOS":"windows", //系统里面的GOOS
"PATH":"%GOBIN%;%PATH%"
},
"comp_lint_enabled": true, //打开这个才有下面的 comp_lint_commands标签里面的内容 "comp_lint_commands": [
{"cmd": ["go", "install"]}
], "on_save": [
{"cmd":"gs_comp_lint"} //当按保存时以cmd自动执行的命令
]
}

windows_GoSublime配置

文件夹就是方法包,主项目的方法包名字就是main,然后其他的包随便命名,引用的第一句是package 文件夹  名称

my___sublime Text配置的更多相关文章

  1. Sublime Text配置Python开发利器

    Sublime Text配置Python开发利器 收好了 自动提示 jedi 代码格式化 Python PEP8 autoformat 如果还需要在shell中搞搞研究的话,ipython将是很好的选 ...

  2. Sublime Text 配置

    Sublime Text 配置 1.键盘映射 映射成emacs的键盘方式: Preferences --> Key Bounding - user:然后复制如下配置信息(注意取消前缀“...-- ...

  3. Windows Sublime Text 配置Linux子系统(WSL)下的 gcc/g++ 编译环境

    0. 简介(若已了解背景可以跳过此部分) Windows 10 Build 14316以上版本中加入了"Windows系统的Linux子系统"(Windows Subsystem ...

  4. sublime text配置fcitx输入法

    sublime text配置fcitx输入法 环境:Fedora20 输入法:fcitx sublime text:version 3 安装fcitx输入法 这个看前面教程 编译sublime-imf ...

  5. sublime text配置make工具

    sublime text配置make工具 Linux下许多项目是用makefile来管理的,是用gcc+make等方式来编译和运行. 在只有tty的场合或年代,使用vim或emacs是不二选择:但在L ...

  6. Sublime Text 配置成 C++ IDE

    在Windows中将Sublime Text配置成C++的IDE.首先,为了运行C++需要安装g++编译器,g++可直接在codeblocks中找到.codeblock的官网下载地址是http://w ...

  7. Sublime Text 配置记录

    sublime userSetting sublime theme sublime plug sublime userSetting 对sublime的配置 { "color_scheme& ...

  8. sublime text配置记录

    代码编辑器有一直都有在尝试新的,如brackets/vs code/webstrom,最后还是用回sublime,每次要重新安装的时候都需要上网搜索相关配置资料,特些记录,以备下次使用: 下载地址 下 ...

  9. Mac OSX下Sublime Text配置使用Ctags实现代码跳转

    1. 先用brew工具安装ctags,安装路径在/user/local/bin The default ctags executable in OSX does not support recursi ...

随机推荐

  1. dfs和bfs算法

    1. 存储图的方式一般是有两种的:邻接表和邻接矩阵,一般存储链接矩阵的方式是比较简单的,也便于我们去实现这个临接矩阵,他也就是通俗的二维数组,我们平常用到的那种. 2. 这里我们主要记录和讲一下bfs ...

  2. MediaRecorder录像那些事

    最近在做一个项目需要运用到MediaRecorder的API,之前都没接触过这部分,开始着手弄的时候各种各样的问题,真是让人崩溃呀! 最后通过网上的资料和大神的指点,当然也有自己几天坚持不懈的努力,终 ...

  3. python 趣味强制请吃饭

    # -*- coding: utf-8 -*- import easygui who = easygui.buttonbox("你想请谁吃饭 ?", "luckly qu ...

  4. Docker 三架马车

    1. Docker Compose 我们前面的课程讲到过两个容器之间通过名字进行互联互通的话可以通过link参数来关联,这种做法比较麻烦,更好的方式是使用Docker Compose来定义一个 YAM ...

  5. ubuntu - 14.04,如何让从托盘消失的输入法图标再次显示出来?

    ubuntu14.04,我也不知道怎么搞的,突然输入法图标就从托盘上消失了,这可真太不方便了,不知道自己当前是否正在使用输入法,怎么能让输入法图标再次显示在托盘上? 解决办法:确保你的“系统设置”中有 ...

  6. 洛谷P5206 [WC2019] 数树(生成函数+容斥+矩阵树)

    题面 传送门 前置芝士 矩阵树,基本容斥原理,生成函数,多项式\(\exp\) 题解 我也想哭了--orz rqy,orz shadowice 我们设\(T1,T2\)为两棵树,并定义一个权值函数\( ...

  7. 改变iOS app的icon(iOS10.3)

    原文 改变iOS app的icon官方iOS10.3新增了可以让开发者去更改app的icon,接下来看看怎么更改.官方API给的东西很少,只是介绍了一个实例方法: 1 open func setAlt ...

  8. Jenkins 相关

    手动下载Jenkins plugin 的地址, 下载后的是zip 文件,然后再手动修改为.hpi 文件,然后再手动上传 https://plugins.jenkins.io/

  9. kuangbin专题十六 KMP&&扩展KMP HDU2087 剪花布条

    一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案.对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input输入中含有一些数据,分别是成对出现的花布条和小 ...

  10. 设置linux服务器文件夹权限

    最近搞的网站一上传图片,就报500错误.经排查是服务器文件夹权限设置问题. 使用命令: chmod o+rwx avatar 即可改变文件夹权限设置.