Search code examples
vim

How to 'tab backwards' (remove a tab or tab spaces) in Vim?


Is there a fast way to tab backward without pressing backspace (however many number of spaces for which I've set my tab space)?


Solution

  • If you're in insert mode:

    • Ctrl+d - shift left
    • Ctrl+t - shift right

    If you're in normal mode:

    • Shift+<< - shift current line left
    • Shift+>> - shift current line right

    If you're in visual mode and have 1 or more lines selected:

    • < - shift selection left
    • > - shift selection right

    If you mean just to move backwards a word in normal mode, you can use b to go backwards a word.