Friday, May 22, 2009

vi / vim Shortcuts

by Sandip Ransing 2 comments

Open file
vi filename
As i am newb on linux macine, i dont know vi shortcuts.
so, i am listing down shortcuts which i am getting familier. :)

Insert in file
i

Exit file
q

forced exit
q!

save file
wq

forced save
wq!

Copy no of lines
yy

Paste copied lines
pp

Undo changes
uu

Delete lines
dd

To search and replace string in vi
:%s/search_string/replacement_string/g

To find particular word in file
?string1

If you have any quick list. please, let me know

blog comments powered by Disqus

About The Author

Sandip is a ruby on rails developer based in pune and also a blogger at funonrails. Opensource contributor and working with Josh software Private Limited. for more info read Follow Sandip on Twitter for updates.

Connect With Me...

Github Projects

@sandipransing Twitter