Skip to content

Instantly share code, notes, and snippets.

@bora89
Created August 6, 2017 14:19
Show Gist options
  • Save bora89/d0f662e55efe64f81d29d678649e91c4 to your computer and use it in GitHub Desktop.
Save bora89/d0f662e55efe64f81d29d678649e91c4 to your computer and use it in GitHub Desktop.
vim intedentation
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