You are on page 1of 2

VIM Commands with Precious Iriaevho

• Watch VIM Commands Tutorial Video: Watch Here

Type vim in any terminal to open it initially or vim filename to create a


new file or open an existing file.

MANIPULATING FILES
:w : Save the current file
:wq : Save the current file & close it; exits vim if no open files remain
:q : Quit a file (Must Save)
:q! : Close a file without saving
:x : Write any changes to the file and close the file

MODES
i : Enter insert mode
: : Enter command mode
ESC : Return to normal mode from insert or replace mode
ESC + ESC : Return to normal mode from command or visual mode

EDITING
o : Insert a line below the current line, then enter insert mode
O : Insert a line above the current line, then enter insert mode
R : Enter replace mode
dd : Delete Line
v : Enter visual mode (highlighting)
V : Enter visual line mode (highlighting lines)
y : Yank
p : Paste
x : Delete Character
/word : Search for word
n : Next word on search
U : Undo
Ctrl+R : Redo
VIM Commands with Precious Iriaevho

NAVIGATION
h, j, k & l : Moving or arrow keys
Arrows : Moving or arrow keys
10j : Move down 10 lines
H : Top line on screen
M : Middle line on screen
L : Bottom line on screen
gg : First line of the file
G : Last line of the file
w : Beginning of next word
e : The end of the current word
b : Beginning of current word
:20 : Line 20 of the file
0 : Beginning of current line
$ : End of current line

Watch VIM Commands Tutorial Video: Watch Here

Precious Iriaevho
YouTube: Clickate Academy
Email: clickater@gmail.com

You might also like