how to unindent in vim without leaving edit mode?
VimVim Problem Overview
I'm writing a lot of python code recently, and i used the tab-to-space mode in vim. I was just wondering how would i unindent in vim without leaving edit mode for example after i finished if...: block. Normally I can just type << to unindent, but it takes too many keystorkes, anyone have a better idea?
Vim Solutions
Solution 1 - Vim
Type Ctrl-D on your keyboard, removes one tabstop at a time, works for space-replaced tabs.
Solution 2 - Vim
In Vim in Linux you can unindent multiple lines by using V
to select your first line. Press the down arrow to select multiple lines. Then type <
to unindent all of the lines.
If you want to indent, type >
instead
Solution 3 - Vim
Backspace will remove one level of indent at a time.