Il VI è l’editor *nix per eccellenza, comprende un set di comandi sterminato.
http://www.lagmonster.org/docs/vi2.html
Nella pagina di lagmonster c’è una guida completa e di facile lettura per avere una facile panoramica delle sue potenzialità.
I comandi che spesso si usano all’interno dell’editor li riassumo:
ZZ or :wq |
Saves and exits VI |
:q! |
Quits VI and without saving |
o |
Open a new line after current line |
^ |
Moves to the first non-blank character in the current line |
$ |
Move to the end of the line |
1G |
Move to the first line of the file |
G |
Move to the last line of the file |
:n |
Move to nth line of the file |
x |
Delete character to the right of cursor |
dd or :d |
Delete current line |
p |
Put after the position or after the line |
/string |
Search forward for string |
?string |
Search back for string |
u |
Undo last change (Note: u in combination with . can allow multiple levels of undo in some versions) |