Delete space-expanded "tab" in Vim with one keystroke?
I edit Python code with Vim.
With the tab key I get four spaces inserted for indentation. How can I delete those spaces with one "Backspace"(?) stroke - instead of four?
There has to be some "set" option for that...
Here is my .vimrc:
set autoindent
set ts=4
set sw=4
set et
Solution 1:
You can use Ctrl+D to back up one tab stop. This actually moves the whole line to the left one tab stop; Ctrl+T does the same thing to the right. Note that these keystrokes only work in Insert mode (use <<
and >>
for the equivalent in Command mode).
Solution 2:
set softtabstop=4