vi | Visual editor, the brand of text editor |
:w | write to file |
:wq | write and quite |
:q! | quite, do not save |
:q | quite |
i | insert |
d | delete |
dw | delete word |
<Esc> | return to command mode |
/(Pattern) | forward search |
?(Pattern) | backward search |
n | jumps to the next occurance of the pattern |
N | jumps to the last occurance of the pattern |
Escape | return to command mode |
|
example | #include <stdio.h> |
| main () |
| { |
| prntf("C and
UNIX are becoming.n"); |
| printf("industry
standards.\n"); |
| } |
|
-r {file name} | insert or append {file name} here |