Originally posted by Rower_CPU
I use pico (don't laugh). I haven't spent the time to learn vi and just want to get in and modify the files quickly.
You might want to give it a shot.
I don't laugh at things like that.... People have preferences, and as long as it gets the job done, who cares how you did it.
Some vi commands:
x - deletes one character to the right
X - deletes one character to the left
a - appends after the character you are on
A - appends after the entire line
i - Inserts at the the character you are on
I - inserts at the beginning of the line
dd - deletes entire line
$ - go to end of line
G - go to end of file
<number>command - repeat command that number of times
:<number> - go to line number
0 takes you to the beginning of the file)
:wq! - write file, even if read-only, and quit
:q! - exit without saving changes
There are two modes in vi: command and edit. Edit mode is simply where you have hit one of the append or insert commands. To go back to command mode, hit ESC. Now lets say you want to delete 5 lines, hit 5dd. Delete 5 characters to the right, hit 5x.
Enjoy!