2016-05-24 42 views
0

我ST3更新到最新版本,3114後發現一個惱人的問題後不再自動插入與縮進一個空行:自動填充標記對與tab的時候,我曾經是然後能夠按return在兩個標籤之間插入一個新的空白行,並讓光標坐在正確的縮進處等待。現在只需按照標準文本編輯器插入換行符。崇高的文本3打標籤對之間的回報

任何人都可以建議我怎麼才能讓老行爲再次工作?

謝謝。

+0

嗨Keith,謝謝你的評論。控制檯日誌只要按照你的建議輸出'command:insert {「characters」:「\ n」}'。據我所知,「進入」和「返回」是一回事......我在鍵盤的右側擊中了大鑰匙! :) – Inigo

+0

不,'shift + return'沒有什麼區別。 'view.settings()。get('auto_indent')'outputs'True' – Inigo

+0

hmm,執行'view.run_command('auto_indent_tag')'做任何事,而光標位於標籤對之間? –

回答

0

聽起來好像默認的按鍵綁定或者不存在或不工作的一些原因。

應該可以通過創建自己的「用戶」鍵聯結爲它修復。 要做到這一點,進入Preferences菜單 - >Keybindings - User,並粘貼以下:

{ "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 }, 
    ] 
}, 

注意:如果您的鍵綁定文件先前是閒置的,您將需要包裝在方括號中全文([])。

保存該文件,您應該發現在標籤對之間按下按鈕輸入按預期工作。