Created
August 6, 2017 14:19
-
-
Save bora89/d0f662e55efe64f81d29d678649e91c4 to your computer and use it in GitHub Desktop.
vim intedentation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gg=G | |
This indents the entire file! | |
And below are some of the simple and elegant commands used to indent lines quickly in Vim or gVim. | |
To indent the current line | |
== | |
To indent the all the lines below the current line | |
=G | |
To indent n lines below the current line | |
n== | |
For example, to indent 4 lines below the current line | |
4== | |
To indent a block of code, go to one of the braces and use command | |
=% | |
These are the simplest, yet powerful commands to indent multiple lines. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment