VSCode insert tab character manually

When using VSCode, most of my files are indented using spaces. However, sometimes I want to insert a literal tab. When I used vim, I would use <Ctrl> + v <Tab> but this does not work with VSCode.

I searched and searched and found nothing. Please, help!

+15
source share
4 answers

I'm not sure if there is a universal solution, but you can configure key bindings for this:

{
    "key": "ctrl+v tab",
    "command": "type",
    "args": { "text": "\t" },
    "when": "editorTextFocus"
}

This keychain will insert a tab character, even if the current mode is spaces.

+16
source

: , -.

, , , .

bash ( ):

echo -e [\\t]

...

    There is a tab character between these brackets: [	]

- , .

+27

<Alt> <Numpad: 0 0 9>

!

+2

VSCode, Visual Studio Enterprise 2017 :

Edit->Advanced->Tabify Selected Lines.

, .

0

All Articles