使用 sublime text

本文介绍了一系列Sublime Text编辑器的实用插件,包括BracketHighlighter、DocBlockr、Emmet等,以及一些提高开发效率的快捷键和用户设置。这些插件覆盖了代码高亮、格式化、自动补全等多种功能。

常用插件

以下是我当前正在使用的 sublime text 插件

插件截图

  1. Bracket Highlighter -> 高亮匹配标签及符号
  2. DocBlockr -> 自动注释, 按 /** + tab
  3. Emmet -> 就是 zencoding
  4. JsFormat -> JS 代码格式化插件,ctrl+alt+f
  5. Side Bar -> 侧边栏增强
  6. Anaconda -> Python 自动补全和语法提示插件
  7. ConvertToUTF8
  8. Package Control
  9. SublimeREPL -> 允许 sublime 运行各种语言的解释器, 如 Python、Lua
  10. Tag -> Html 格式化插件,Edit->Tag->Auto-Format Tags on Ducument, ctrl+alt+f
  11. 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":".*"
        }
     },
]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值