Выйти из скобок и скобок с помощью Tab - PullRequest
0 голосов
/ 29 января 2020

Проблема в . Вы должны использовать стрелки или макросы, чтобы выйти из скобок, квадратных скобок, фигурных скобок, одинарных и двойных кавычек.

1 Ответ

0 голосов
/ 29 января 2020

Простое решение, которое я нашел для этой проблемы:

[VSCode] есть расширение под названием TabOut , установите его (сделано) .

[SublimeText3] нам необходимо внести некоторые изменения в Предпочтения привязок клавиш> Связывания клавиш, скопировать и вставить фрагмент ниже в правую панель, сохранить и закрыть это окно. (проверено и работает ✌)

[
    { "keys": ["("], "command": "insert_snippet", "args": {"contents": "($1)$0"}, "context":
    [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true }
    ]
},


{ "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{$1}$0"}, "context":
        [
            { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
            { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
            { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|$)", "match_all": true }
        ]
    },

{ "keys": ["["], "command": "insert_snippet", "args": {"contents": "[$1]$0"}, "context":
    [
        { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
        { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
        { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true }
    ]
},

{ "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"$1\"$0"}, "context":
    [
        { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
        { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
        { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
        { "key": "preceding_text", "operator": "not_regex_contains", "operand": "[\"a-zA-Z0-9_]$", "match_all": true },
        { "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true }
    ]
},

{ "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'$1'$0"}, "context":
    [
        { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
        { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
        { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
        { "key": "preceding_text", "operator": "not_regex_contains", "operand": "['a-zA-Z0-9_]$", "match_all": true },
        { "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single - punctuation.definition.string.end", "match_all": true }
    ]
},
]
...