sublime的一些设置

Sublime的一些设置

一、 Ctags的安装和设置
  1. 在sublime中借助install package自动安装ctags插件
  2. 在网上下载ctags的压缩包(其中有ctags.exe文件),解压到文件夹中
  3. 将ctags.exe的路径添加到ctags的setting-user中:e.g."command": "I:/Programming_tool/SublimeText3/ctags58/ctags"
  4. 在key building-user中绑定自己喜欢的快捷键
二、一些键的绑定,包括自动跳出括号、双引号、单引号
  1. Ctags快捷键:
    /* Ctags 快捷键绑定 */
    {
        "command": "navigate_to_definition",
        "keys": ["ctrl+]"]
    },
    {
        "command": "search_for_definition",
        "keys": ["ctrl+y"]
    },
    {
        "command": "jump_prev",
        "keys": ["ctrl+t"]
    },
    {
        "command": "rebuild_tags",
        "keys": ["ctrl+r"]
    },
    // 显示文件所有函数
    {
        "command": "show_symbols",
        "context": [
            {
                "key": "selector",
                "match_all": true,
                "operand": "source -source.css",
                "operator": "equal"
            }
        ],
        "keys": ["alt+s"]
    },
    // 显示工程所有函数
    {
        "command": "show_symbols",
        "args": {"type": "lang"},
        "context": [
            {
                "key": "selector",
                "match_all": true,
                "operand": "source -source.css",
                "operator": "equal"
            }
        ],
        "keys": ["ctrl+alt+shift+s"]
    },
    // 显示工程所有函数和数据类型
    {
        "command": "show_symbols",
        "args": {"type": "multi"},
        "context": [
            {
                "key": "selector",
                "match_all": true,
                "operand": "source -source.css",
                "operator": "equal"
            }
        ],
        "keys": ["alt+shift+s"]
    }
  1. 自动跳出括号、单引号、双引号:
    /* 自动跳出括号、单引号、双引号绑定 */
    {          
        "keys": ["enter"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
        [
            { "key": "following_text", "operator": "regex_contains", "operand": "^[)\\]\\>\\'\\\"\\ %>\\}\\;\\,]", "match_all": true },
            { "key": "preceding_text", "operator": "not_regex_match", "operand": "^.*\\{$", "match_all": true  },
            { "key": "auto_complete_visible", "operator": "equal", "operand": false }
        ]
    }
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值