Edit: Tabify Region

edit.tabify

Convert runs of leading spaces back to tabs over the selection (or the whole buffer).

How to run it

Open the command palette (M-x in the Emacs keymap) and search for Edit: Tabify Region, then press Enter. It has no default keybinding, but you can bind one in Settings → Keymaps.

See also