Sublime Tab無(wú)法縮進(jìn)問(wèn)題

與emmet熱鍵沖突導(dǎo)致無(wú)法縮進(jìn)

解決方案

在“首選項(xiàng)->快捷鍵設(shè)置”中,找到將其刪除

[    
    {        
        "keys": [            "tab"       
    ],   
    "args": {            
         "action": "expand_abbreviation"      
         }, 
              "command":"run_emmet_action",     "context": [          
                {                
                "key":"emmet_action_enabled.expand_abbreviation"           
                 }        
           ]    
    }
]

來(lái)源:https://blog.csdn.net/weixin_36769175/article/details/75312387

換行無(wú)法自動(dòng)縮進(jìn)的問(wèn)題

在“首選項(xiàng)->快捷鍵設(shè)置”中,加入

{ "keys": ["enter"], "command": "auto_indent_tag", "context":
        [
            { "key": "setting.auto_indent", "operator": "equal", "operand": true },
            { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
            { "key": "selector", "operator": "equal", "operand": "punctuation.definition.tag.begin", "match_all": true },
            { "key": "preceding_text", "operator": "regex_contains", "operand": ">$", "match_all": true },
            { "key": "following_text", "operator": "regex_contains", "operand": "^</", "match_all": true },
        ]
    }

按一次tab縮進(jìn)足夠的距離

在“首選項(xiàng)->快捷鍵設(shè)置”中,加入[1]

// Press the tab indent a sufficient distance
    { "keys": ["tab"], "command": "reindent", "context":
        [
            { "key": "setting.auto_indent", "operator": "equal", "operand": true },
            { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
            { "key": "preceding_text", "operator": "regex_match", "operand": "^$", "match_all": true },
            { "key": "following_text", "operator": "regex_match", "operand": "^$", "match_all": true }
        ]
    }

來(lái)源:
作者:憶秋暝楓
出處:http://www.cnblogs.com/yqmf
本文版權(quán)歸作者和博客園共有,歡迎轉(zhuǎn)載,但未經(jīng)作者同意必須保留此段聲明,且在文章頁(yè)面明顯位置給出原文連接,否則保留追究法律責(zé)任的權(quán)利。


  1. 兩個(gè)設(shè)置代碼之間,第一個(gè)花括號(hào)后要記得加“,” ?

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容