key |
action |
single char commands |
a | insert after cursor |
b | left one word |
e | word right end |
g | start of document |
h | left one character |
i | insert before cursor |
j | down one line |
k | up one line |
l | right one character |
n | repeat the most recent search, in the same direction |
o | insert after line |
p | put after cursor |
q | stop macro recording |
u | undo |
v | enter visual mode |
w | right one word |
x | delete |
space | right one character |
A | insert after end of line |
B | left one word (same as b) |
C | change to end of line |
D | delete line right |
E | word right end (same as e) |
G | goto end or line number if prefixed |
H | goto first line of the screen |
I | insert at begin |
J | join lines |
L | goto last line of the screen |
M | goto middle line of the screen |
N | repeat the most recent search, in the opposite direction |
O | insert before line |
P | put before cursor |
R | replace many chars, enters overtype mode |
V | enter visual line mode |
W | right one word (same as w) |
X | delete backwards |
/ | next occurrence |
? | previous occurrence |
. | repeat last action |
; | repeat last find char |
~ | toggle case |
$ | end of line |
0,^ | begin of line |
{ | paragraph up, in visual mode adds to selection |
} | paragraph down, in visual mode adds to selection |
( | paragraph up, in visual mode adds to selection (same as {) |
) | paragraph down, in visual mode adds to selection (same as }) |
% | matching brace, in visual mode selects with matching brace |
# | previous occurrence of word under cursor |
* | next occurrence of word under cursor |
+ | down one line, goto home |
- | up one line, goto home |
tab | indents selection |
TAB | dedents selection |
ESC | escape deselects, goes back to normal mode |
|
key |
action |
control char commands |
ctrl b | page up |
ctrl e | increment word under cursor |
ctrl f | page down |
ctrl g | shows filename and state |
ctrl j | decrement word under cursor |
ctrl p | scroll up |
ctrl q | scroll down |
ctrl r? | inserts contents of register if in insert mode |
ctrl r% | inserts contents of % register, or copies contents to
clipboard if not in insert mode |
ctrl r= | enters register calculation mode |
double or more char commands |
cc | change line |
cw | change word |
dd | delete line or selection |
de | delete word (to end of word) |
d0 | delete line left |
d$ | delete line right |
dw | delete word |
f? | find next character |
F? | find previous character |
m? | mark current line (one letter marker) |
qx | record macro x |
qX | record macro x (appends to x) |
@x | plays back macro x (one char) |
@xx@ | plays back macro xx (several characters) |
@@ | plays back last macro |
r? | replace current character only |
t? | find next character, caret before pos |
T? | find previous character, caret before pos |
yw | yank word |
yy | yank line or selection |
ZZ | save and quit |
zc | fold close |
zo | fold open |
zE | fold disable |
zf | fold enable |
'? | goto marker |
"? | prepares register to receive contents of yy, yw, de, dd, dw, d0, d$ |
>> | increase indent for current line, selection or visual area |
<< | decrease indent for current line, selection or visual area |
|
key |
action |
colon commands |
:.= | current line |
:$ | goto end of document |
:close | closes current document |
:d | delete current line |
:e | edit (show select file dialog) |
:e * | edit file * (with tab expansion) |
:n | next |
:prev | previous |
:q | quit unless modified |
:q! | quit forced |
:r * | insert contents of file * below cursor |
:r !command | executes command and inserts output below cursor |
:[range]> | increase indent for range |
:[range]< | decrease indent for range |
:[range]d | delete range |
:[range]mx | move range to destination address x |
:[range]s/p/r/[flags] | substitutes in range p by r using flags |
:[range]!command | filters range, range is used as input for command, output replaces range |
:reg | shows registers |
:set ic | sets ignore case |
:set ic! | sets match case |
:set list | shows whitespace |
:set list! | hides whitespace |
:set nu | shows line numbers |
:set nu! | hides line numbers |
:set ts=no | sets tabstop at every no |
:set tabstop=no | sets tabstop at every no |
:w | save |
:w * | save to file * |
:x | save and quit |
:y | yank current line |
:!command | executes command and shows output |
global commands |
:g// | remove all markers |
:g/pattern/d | delete lines containing pattern |
:g/pattern/ | mark lines containing pattern |
:g/pattern/p | print lines containing pattern, the lines are put on
a new tab pane called Print |
:g/pattern/s/replacement | substitute pattern by replacement |
|