Most file level operations start with a :
| :efilename | Edit another file - :e! forces discard of current edits, :e! with no name reloads current file | ||||||||||
| :n | Edit the next file (vi file1 file2 file3 etc) | ||||||||||
| :p | Edit the previous file (vi file1 file2 file3 etc) | ||||||||||
| :w | Write the current file (can give a name for save as) | ||||||||||
| :q | Quit - :q! to quit with unsaved data | ||||||||||
| :r | Insert a file at the current cursor position | ||||||||||
| :!Shell command | Just start a shell command, when it exits return to vi. | ||||||||||
| :set | Set options - More in a few slides time | ||||||||||
| :addresss/regexp/replace term/options | Very powerful search facility. Address is area to search over - e.g.
|
||||||||||
| :address operator | Most vi operators can be used in colon mode; e.g. :'a,'b> to indent an area | ||||||||||
| :addressg/search pattern/colon command | Execute a colon command for every matching line |
Copyright Dr. David Alan Gilbert 2001. vitalk @ treblig.org - Hacked together with dsh