Archive

Posts Tagged ‘vim’

What is vimrc

March 18, 2010 Leave a comment

I always feel hard to use “vi” in Linux.  Therefore I have the following cheat sheet with me at handy.

i insert text
r replace character under cursor
dd delete one line
p paste contents of buffer to text starting at the line following the cursor line.
D delete from cursor position to end of line.
/string find next occurrence of string
^F go forward a page
^B go backward a page
u undo the last change
U undo all changes on a line
:wq save and quit
:w name write to the file name
:q! quit without saving changes

If you find that some of the above commands do not quite work on your machine,  I really suggest to use a customized .vimrc file instead. This will make your life much easier.

I am using the following one recently and it works quite well.  http://www.hermann-uwe.de/files/vimrc

What I do is to create a new file .vimrc and place it at ~/.vimrc

Categories: daily notes Tags:
Follow

Get every new post delivered to your Inbox.