Saturday, November 21, 2009

vi Basics - How to edit a file

To edit using vi, type vi along with file name
say:
vi abc.c
vi works like a console app. Now to start editing press i

To use any command like save or quit etc. press " : " (colon without quotes)
From edit mode, press ESC to go to normal mode and press :

Enter w to save/write the changes to file.
Enter q to quit vi

No comments:

Post a Comment

Developer Instincts