常用插件
以下是我当前正在使用的 sublime text 插件
- Bracket Highlighter -> 高亮匹配标签及符号
- DocBlockr -> 自动注释, 按 /** + tab
- Emmet -> 就是 zencoding
- JsFormat -> JS 代码格式化插件,ctrl+alt+f
- Side Bar -> 侧边栏增强
- Anaconda -> Python 自动补全和语法提示插件
- ConvertToUTF8
- Package Control
- SublimeREPL -> 允许 sublime 运行各种语言的解释器, 如 Python、Lua
- Tag -> Html 格式化插件,Edit->Tag->Auto-Format Tags on Ducument, ctrl+alt+f
- jQuery -> jQuery 自动补全和语法提示插件
Sublime Text快捷键:
- Ctrl+Shift+P:打开命令面板
- Ctrl+G:跳转到第几行
- Ctrl+W:关闭当前打开文件
- Ctrl+Shift+W:关闭所有打开文件
- Ctrl+Shift+V:粘贴并格式化
- Ctrl+D:选择单词,重复可增加选择下一个相同的单词
- Ctrl+L:选择行,重复可依次增加选择下一行
- Ctrl+Shift+L:选择多行
- Ctrl+Shift+Enter:在当前行前插入新行
- Ctrl+M:跳转到对应括号
- Ctrl+U:软撤销,撤销光标位置
- Ctrl+J:选择标签内容
- Ctrl+F:查找内容
- Ctrl+Shift+F:查找并替换
- Ctrl+H:替换
- Ctrl+R:前往 method
- Ctrl+N:新建窗口
- Ctrl+K+B:开关侧栏
- Ctrl+Shift+M:选中当前括号内容,重复可选着括号本身
- Ctrl+F2:设置/删除标记
- Ctrl+/:注释当前行
- Ctrl+Shift+/:当前位置插入注释
- Ctrl+Alt+/:块注释,并Focus到首行,写注释说明用的
- F11:全屏
- Shift+F11:全屏免打扰模式,只编辑当前文件
- Alt+F3:选择所有相同的词
- Alt+Shift+数字:分屏显示
- Alt+数字:切换打开第N个文件
- Ctrl+Tab:切换tab
- Ctrl+Shift+上下键,可替换行
用户设置
{
"always_show_minimap_viewport": true,
"auto_complete_commit_on_tab": false,
"auto_find_in_selection": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Monokai Extended/Monokai Extended.tmTheme",
"default_line_ending": "unix",
"detect_indentation": false,
"detect_slow_plugins": false,
"dpi_scale": 1.0,
"drag_text": false,
"draw_white_space": "selection",
"ensure_newline_at_eof_on_save": true,
"fallback_encoding": "UTF-8",
"font_face": "M+ 1mn regular",
"font_size": 14,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage",
"Vintageous"
],
"indent_guide_options":
[
"draw_active",
"draw_normal"
],
"indent_to_bracket": true,
"line_padding_bottom": 1,
"line_padding_top": 1,
"preview_on_click": false,
"rulers":
[
135
],
"scroll_past_end": true,
"shift_tab_unindent": true,
"show_encoding": true,
"tab_size": 4,
"theme": "Soda Dark.sublime-theme",
"translate_tabs_to_spaces": true,
"trim_automatic_white_space": true,
"trim_trailing_white_space_on_save": true,
"update_check": false,
"word_wrap": true,
"wrap_width": 135
}
快捷键设置
[
// Runs currently open file in repl
{
"keys": ["f5"],
"command": "project_venv_repl"
},
// Runs repl without any file
{
"keys": ["f6"],
"command": "project_venv_repl",
"args": {
"open_file": null
}
},
// Runs a specific file in repl, change main.py to desired file
{
"keys": ["f7"],
"command": "project_venv_repl",
"args": {
"open_file": "/home/user/example/main.py"
}
},
{
"keys": ["ctrl+k", "ctrl+c"],
"command": "js_format",
"context": [{
"key": "selector",
"operator": "equal",
"operand": "source.js,source.json"
}]
},
{
"keys": ["ctrl+k", "ctrl+c"],
"command": "tag_indent_document",
"context": [{
"key": "selector",
"operator": "equal",
"operand": "text.html,text.htm,text.xml,text.xsl"
}]
},
// chrome
{
"keys": ["f2"],
"command": "side_bar_files_open_with",
"args": {
"paths": [],
"application": "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe",
"extensions":".*"
}
},
]