vim tips

Indent multiple lines quickly

Use >

 

e.g. to indent 5 lines use:

 

5>>

 

To mark a block of 3 lines and indent in vim, use:

 

Vjj>

 

http://stackoverflow.com/questions/235839/how-do-i-indent-multiple-lines-quickly-in-vi

Repeat last change

Use .

e.g. if deleting a word with dw then just hit .to repeat.

http://vim.wikia.com/wiki/Repeat_last_change

 

Split screen and view another file

:vsplit <file>

https://www.cs.oberlin.edu/~kuperman/help/vim/windows.html

 

Leave a Reply

Your email address will not be published. Required fields are marked *