Visual Studio Code Tab Key does not insert a tab

anon picture anon · Feb 20, 2016 · Viewed 119.9k times · Source

I'm using Visual Studio Code as my code editor. I did a search on google but wasn't able to find anything about my issue.

The issue is simple, pressing ⇥ Tab in the editor does nothing. I'm expecting it to insert 4 spaces.

Anyone know what I can do to get ⇥ Tab working like expected?

Answer

pypmannetjies picture pypmannetjies · Feb 25, 2017

I had accidentally enabled a different mode for the tab key. Fixed it by pressing Ctrl+Shift(for Mac only)+M.

From the Visual Studio Code Keybinding docs:

| Key      | Command                                 | Command id                       |
| Ctrl + M | Toggle Use of Tab Key for Setting Focus | editor.action.toggleTabFocusMode |

The current tab control mode should also show up in the status bar:

enter image description here