美文网首页
sublime自动补全

sublime自动补全

作者: 前端来入坑 | 来源:发表于2019-12-08 13:42 被阅读0次
    • 安装emmet: Preferences -> Package Control -> Install Package -> emmet

    • 配置emmet: Preferences -> Package Settings -> Emmet -> Key Bindings - User

    黏贴以下代码:重新打开

    [{
        "keys": ["tab"],
        "command": "expand_abbreviation_by_tab",
    
        // put comma-separated syntax selectors for which 
        // you want to expandEmmet abbreviations into "operand" key 
        // instead of SCOPE_SELECTOR.
        // Examples: source.js, text.html - source
        "context": [{
                "operand": "source.js",
                "operator": "equal",
                "match_all": true,
                "key": "selector"
            },
    
            // run only if there's no selected text
            {
                "match_all": true,
                "key": "selection_empty"
            },
    
            // don't work if there are active tabstops
            {
                "operator": "equal",
                "operand": false,
                "match_all": true,
                "key": "has_next_field"
            },
    
            // don't work if completion popup is visible and you
            // want to insert completion with Tab. If you want to
            // expand Emmet with Tab even if popup is visible -- 
            // remove this section
            {
                "operand": false,
                "operator": "equal",
                "match_all": true,
                "key": "auto_complete_visible"
            }, {
                "match_all": true,
                "key": "is_abbreviation"
            }
        ]
    }]
    

    相关文章

      网友评论

          本文标题:sublime自动补全

          本文链接:https://www.haomeiwen.com/subject/evhegctx.html