Vim Editor – A quick reference guide

I decided to make a research about operators in vim, because now I’m using so much this editor, instead of mc (midnight commander) that isn’t the default editor in many Linux distributions. Vim have some operators types as described bellow.

Navigation operators:

e | end of current word
b | beginning of word
$ | go to end of line
0 | go to beginning of line
( | go to beginning of section (denoted by nn)
) | go to end of section (denoted by nn)

Search operators:

/ (or ?) | start a search
/c (or ?c) | start a case insensitive search
n | next
shift+n | previous

Destructive functions/clipboard operators:

u | undo
ctrl+r | redo
v | allow highlighting for copy, cut, etc at cursor
y | copy/yank
d | cut
p | paste
x or del | delete character at cursor
X or backspace | delete character before cursor (in INSERT mode)

“Big” operations:
V | highlight whole line
gg | go to top of file (first line)
G | go to bottom of file (last line)
control+b | page up
control+f | page down
yy | copy/yank line
dd | cut the current line (not delete, but cut to clipboard)

This entry was posted in Linux, Text Editor, vim and tagged , , . Bookmark the permalink.