May 31, 2013
Vi editor commands for Linux.
When you open Vi ,it starts in command mode; you have to pres 'ESC' key to goto insertion mode.
e.g: Open VI From linux shell
>> vi yourfilename
>> {press ESC then : i} Now you can edit (no spaces between : and i)
>>
Following are the basic commands you need to work with the editor. Assuming that you are in the editor,
>> {press ESC then : x} exit saving changes
>> {press ESC then : q} exit if there are no changes
>> {press ESC then : q!} exit without saving the changes you made
>> {press ESC then : 20}move the curser to the 20 th line.
>> {press ESC then : d} delete the current line
There were some additional commands that might come in handy here
Subscribe to:
Posts (Atom)