Indentation Primer
In insert mode, line indentation can be manually adjusted with ⌃T
to indent or ⌃D
to unindent.
In normal mode, line indentation can be manually adjusted with >
to indent or <
to unindent.
Examples:
Indent two shiftwidths over an absolute line range:
:10,90>>
Indentation with one shift width over a relative line range (unindent the previous 10 lines by 1 shift width:
<10k
Unindent an entire buffer:
<gg=G
Indent a text object (an inner paragraph in this case):
>ip
Written by Seth Brown
Related protips
2 Responses
For automatic indentation you can also use =
over 1 year ago
·
I just wonder, is there a case where >ip
works differently than >ap
?
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Related Tags
#vim
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#