Pages

Monday, March 24, 2008

vi/vim Editor Commands

When First time dealt with Linux OS, it was Red hat 6.0 something I guess. After struggling to install Red Hat on hardware 32 MB RAM and 4 GB of hard disk. First Programming instruction started writing a HELLO foot print using vi. Vi is a text editor, it can be used to edit all kinds of plain text. It is especially useful for editing programs. You might thinking why am I writing this details in this posting...just because still I prefer vi and know beginners problems dealing with vi. here we go to make it simple.

General Startup
To use vi: vi filename
To exit vi and save changes: ZZ or :wq
To exit vi without saving changes: :q!
To enter vi command mode: [esc]
To Replace string [esc] : %s!root!root@localhost!cg

Other

http://www.cs.colostate.edu/helpdocs/vi.html

No comments: