Quantcast
Channel: Visual Studio Code - Indent single line with tabulator-key - Stack Overflow
Viewing all articles
Browse latest Browse all 4

Answer by Mark for Visual Studio Code - Indent single line with tabulator-key

$
0
0
You could use this default keybinding:

{
  "key": "ctrl+]",
  "command": "editor.action.indentLines",
  "when": "editorTextFocus && !editorReadonly"
}

to tab single or multilines. If you want that bound to tab you could modify it to:

{
  "key": "tab",
  "command": "editor.action.indentLines",
  "when": "editorHasSelection && editorTextFocus && !editorReadonly"
}

I added the editorHasSelection clause so it operates only when something is selected on your line, but then you would lose the normal simple tab behavior (that you don't like).


Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>