SANOJ/ blog / 2018-02-11-getting-started-with-vim
Getting started with VIM
An easy-to-learn cheatsheet for getting started with vim and for reference.
An easy-to-learn cheatsheet for getting started with vim — and a reference for later. Everything starts in Normal mode; press ESC to get back there.
Navigation
h Left j Down k Up l Right
w Beginning of word (forward) b Beginning of word (backward)
e Goto End of Word
gg Goto start of file G Goto end of file
#g Goto line # (Ctrl+G shows the current line number)
% Goto start/end of matching parenthesis: {}, [], ()
Modes
v Visual Mode
i Insert Mode (current position)
a Insert Mode (append)
A Insert Mode (end of line)
o Append a new line and Insert Mode
O Prepend a new line and Insert Mode
General
Append ! to force an action, ignoring errors.
:w Write to file
:r Insert from file
:q Quit
Clipboard
d Cut
y Copy
p Paste
Deleting
dw Delete word
d$ Delete to end of line Originally published at https://snazzysanoj.in/getting-started-with-vim/