I’d like to bind “tab” to always indent the current line, even if there is no selection.
I tried to do this like so:
{ "keys": ["tab"], "command": "indent", "context": [{ "key": "auto_complete_visible", "operator": "equal", "operand": false }]},
(I use tab to confirm auto-completions as well, whence the above context.)
The only problem is that tab now does nothing when the cursor is at the very start of a blank line. Obviously, I’d just like to inject a normal “tab” in that case, which would be the same as doing “indent” if it weren’t for the fact that “indent” does nothing on blank lines. (Which is as should be I guess.)
So I need to disable the above binding with a context that checks the cursor is not at the start of a line. I’m bad at writing my own contexts, can someone provide a hint?