The vi/vim editor is arguably one of the most powerful text editors! But working with vi requires the usage of many commands. One of the first things we learnt in school was “A for Apple, B for Ball, C for Cat…”. It is time to relearn that if we have to work on vi! Now what we need to remember is “A for Append, B for Begin, C for Change…”. This is a fun article that helps you relearn A-Z!
Alphabet | Meaning | Description |
---|---|---|
a | Append | Appends a character at the cursor position |
b | Begin | Moves the cursor the beginning of the current/previous word |
c | Change | Changes the current word or part of line |
d | Delete | Deletes the current word or part of line |
e | End | Moves the cursor the end of the current/next word |
f | Forward | Moves the cursor forward to the first occurrence of given character |
g | Goto | Moves the cursor to the specified line |
h* | Cursor Left | Moves the cursor left |
i | Insert | Insert at cursor position |
j* | Cursor Up | Moves the cursor up |
k* | Cursor Down | Moves the cursor down |
l* | Cursor Right | Moves the cursor right |
m | Mark | Place a mark at cursor position |
n | Next | Search next |
o | Open | Open a new line below current line |
p | Put | Put or paste clipboard contents |
q | Macro | Start/stop recording macro |
r | Replace | Replace current character by another |
s | Substitute | Substitute current character by string |
t | Tag | Move cursor before occurrence of specified character |
u | Undo | Undo a change |
v | Visual | Enter visual mode |
w | Word | Moves the cursor to the beginning of the next word |
x | X:Delete | Delete character at cursor |
y | Yank | Copy current word or line or any part of word or line |
z | Scroll screen | Scroll screen making current line the first/last line |
*h, j, k, l are consecutive keys on the keyboard used as replacement for cursor keys
Related Articles
No user responded in this post