Sublime 3: How to make TAB reindent current line or the selected region (if present)?

خرید بک لینک

TAB key by default just puts a tab, and only indents depending on several contexts, which I don’t understand quite well.

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

I wanted to make tab reindent by default, but stripping the context

{ "keys": ["tab"], "command": "reindent", "args": {"single_line": false} },

made sublime reindent the whole file at once. And I don’t want that, since I want to keep custom indentation for shell heredocs.

- - , .
.

Recent Questions...

ما را در سایت Recent Questions دنبال می‌کنید

برچسب: نویسنده: استخدام کار بازدید: 262 تاريخ: دوشنبه 21 تير 1395 ساعت: 6:33

صفحه بندی