Never been to CodeSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

About this user

1 total

On This Page:

  1. 1 VIM Tips

VIM Tips

Quick Tips

* To quickly get out of command-line, press ctrl+c, it's faster than hitting ESC multiple times.
* ~ changes case of current letter.
* zb, zt, and zz scrolls the screen to make the current line at the top, bottom, or middle.
*
* to auto-indent a piece of code, highlight it in visual mode, and press =, to auto-indent the current line, press ==.
* Use gq to wrap the highlighted peice of text.
* Use :set wrap and :set wrap! to toggle long line wrapping.
* To visually check the difference between two files, use vimdiff file1 file2, it provides a nice color-highlighted view with code folding, much better than plain diff.
*
* Type :help to access Vim's help, and :help cmd for information on the command cmd.
* vimtutor is Vim newcomer's friend, it provides a course on Vim usage.


// insert code here..
1 total

On This Page:

  1. 1 VIM Tips