Sr. No.CommandDescription
1:qQuit
2:q!Quit without saving
3:wSave
4:wqSave and quit
5:wq!Save and quit without saving
6:eOpen file
7:e!Discard changes
8:e <filename>Open file
9:e! <filename>Discard changes
10:spSplit window horizontally
11:vspSplit window vertically
12:qQuit window
13:tabnewOpen new tab
14:tabnNext tab
15:tabpPrevious tab
16:tabcClose tab
17:taboClose other tabs
18:tabmMove tab
19:tabfirstFirst tab
20:tablastLast tab
21:tabeEdit tab
22:tabfindFind tab
23:tabcloseClose tab
24:tabonlyClose other tabs
25:tabmoveMove tab
26:tabnextNext tab
27:tabpreviousPrevious tab
28:tabeditEdit tab
29:set numberShow line numbers
30:set nonumberHide line numbers
31:set relativenumberShow relative line numbers
32:set norelativenumberHide relative line numbers
33:set listShow whitespace characters
34:set nolistHide whitespace characters
35:set listchars=tab:>-,trail:.Set whitespace characters
36:1Go to line 1, may be changed by adding approprite number
37:$Go to last line
38:!Run shell command, may be used to test program
38.1! gcc -o test test.cCompile C program
38.2! ./testRun C program
39ddDelete line (copy in clipboard)
40yyCopy line
41pPaste line
42uUndo
43Ctrl + rRedo
44Ctrl + wDelete word
45Ctrl + uDelete line
46Ctrl + yScroll up
47Ctrl + eScroll down
48Ctrl + fPage down
49Ctrl + bPage up
50Ctrl + dHalf page down
51Ctrl + uHalf page up
52Ctrl + oGo to previous location
53Ctrl + iGo to next location
54Ctrl + gShow file information
55Ctrl + lRefresh screen
56Ctrl + aIncrement number
57Ctrl + xDecrement number
58Ctrl + vEnter visual block mode
59vEnter visual mode
60VEnter visual line mode
61iEnter insert mode
62aEnter insert mode after cursor
63oEnter insert mode after line
64OEnter insert mode before line
65:Enter command mode
66/Search forward
67?Search backward
68nNext search result
69NPrevious search result
70*Search word under cursor
71escExit mode
72ggGo to first line
73GGo to last line