Vous êtes sur la page 1sur 2

VIM

basic movement
h,j,k,l - (left,down,top,right)
word movement
w,e,b - (beginning of next word, end of current word, beginning of current
word)

basic movement
h,j,k,l - (left,down,top,right)
word movement
w,e,b - (beginning of next word, end of current word, beginning of current
word)
number powered movement
3w - (same as w,w,w: similarly other 6e,100b,5h etc)
insert text repeatedly
3iYesESC - (same as typing YesYesYes (3 times))
Go to matching parentheses
%
Start/End of line
0 and $
Find the next and previous occurrence of word
* and #
beginning of file
gg
end of file
G
to line number
Format: nG
100G - to go to line number 100
Search
/text
(n, N) for next and previous occurrences

Insert new line


o or O - with capital `O` set editor to insert mode
removing character
x and X
replace letter under cursor
r
deleting a line
dd - this can combined with w, e, b - like dw, de, db, d2e, d5w. (It also
copies the text)
for pasting use `p`.
to repeat the previous operation
. (full stop)
to use the visual mode
v
:w - save
:q - quit
:q! - quit without saving
u - undo
ctrl + R - redo
:help - for help