VIM c’est bien, mais si on sait pas utiliser ses commandes ça sert à rien. Donc voici quelques commandes utiles :
Général
:q close :w write/saves :wa[!] write/save all windows [force] :wq write/save and close :x save and quit, same as wq :q! force close if file has changed and not save changes v Enter visual mode for selection of LINES C-v Enter visual mode for selection of BLOCKS y Yank/copy selected region yy Yank/copy entire line "y Yank/copy marked region into register (register from a-z) c Cut selection p Paste yanked content "p Paste yanked content in register (from a-z) P Paste yanked content BEFORE u Undo C-r Redo :! Execute shell command C-z send vim to background (fg brings it to front again)
Insert mode
a Append text after the cursor A Append text at the end of the line i Insert text before the cursor I Insert text before the first non-blank in the line o Begin a new line BELOW the cursor and insert text O Begin a new line ABOVE the cursor and insert text s Erase the current letter under the cursor, set insert-mode S Erase the whole line, set insert-mode cc Delete the current line, set insert-mode cw Delete word, set insert-mode dd Delete line under curser
Commandes
:syntax on :set number Affiche les numéros de ligne