q |
quit Vi, provided you have not changed your file at all since
you last saved it (if you have altered the file, Vi will warn you
and will not terminate) |
q! |
quit Vi, and any changes you have made to the file will be
discarded and the file left in its original state |
w |
writes all the changes to the file, but remain in Vi |
wq |
equivalent to performing command w followed by
command q ; same as command-mode ZZ |
0 |
moves the cursor to the beginning of the file |
$ |
moves the cursor to the end of the file |
number |
moves the cursor to the start of line number |