b | move left one word |
e | move word right end |
f | find char |
h | move left |
j | move down |
k | move up |
l | move right |
n | repeat the most recent search, in the same direction |
t | find char, no selection |
w | move right one word |
B | left one word (same as b) |
E | word right end (same as e) |
F | find char backwards |
G | goto end or line number if prefixed |
H | goto first line of the screen |
L | goto last line of the screen |
M | goto middle line of the screen |
N | repeat the most recent search, in the same direction |
T | find char backwards, no selection |
W | right one word (same as w) |
/ | find next word |
? | find previous word |
'? | goto marker ? |
, | repeat last find char in the reverse direction |
space | right one character |
0 | begin of line |
[ | move to previous "{...}" section |
] | move to next "{...}" section |
( | paragraph up, in visual mode adds to selection (same as {) |
) | paragraph down, in visual mode adds to selection (same as }) |
{ | paragraph up, in visual mode adds to selection |
} | paragraph down, in visual mode adds to selection |
^ | begin of line |
+ | move to first character on the next line |
| | goto column number specified by prefix |
- | move to first character on the previous line |
$ | end of line |
% | matching brace, in visual mode selects with matching brace |
_ | next line |
; | repeat last find char |
ctrl b | page up |
ctrl f | page down |
ctrl p | scroll up |
ctrl q | scroll down |
|
m? | mark current line (one letter marker) |
p | put after cursor |
q | stop macro recording |
qx | record macro x |
qX | record macro x (appends to x) |
r? | replace current character only |
u | undo |
x | delete |
D | delete line right |
J | join lines |
N | repeat the most recent search, in the opposite direction from original search |
P | put before cursor |
Q | find tag under cursor and open page |
S | go back to page active before Q |
X | delete backwards |
Y | yank current line |
dd | delete line or selection |
dgg | delete from start of the file until current line |
gg | goto begin |
yy | yank line or selection |
zc | fold close |
zf | fold enable |
zo | fold open |
zE | fold disable |
zM | close all folds |
zR | open all folds |
ZZ | save and quit |
. | repeat last action |
~ | toggle case |
* | next occurrence of word under cursor |
# | previous occurrence of word under cursor |
> | increase indent for current line, selection or visual area |
< | decrease indent for current line, selection or visual area |
tab | indents selection (if on pos 0) |
TAB | dedents selection |
@x | execute buffer: plays back macro x (register) |
@@ | execute last buffer: plays back last macro |
@Xx@ | plays back macro Xx (several characters, starting uppercase) |
"x | prepares register x for receiving clipboard for next command instead of unnamed register |
"X | see previous, now appends contents of clipboard to register x |
|
a | insert after cursor |
i | insert before cursor |
o | insert after line |
v | enter visual mode |
A | insert after end of line |
C | change to end of line |
I | insert at begin |
K | enter visual rectangular mode |
O | insert before line |
R | replace many chars, enters overtype mode |
V | enter visual line mode |
ESC | escape goes back to normal mode |
ctrl e | increment word under cursor |
ctrl g | shows filename and state |
ctrl j | decrement word under cursor |
ctrl r? | inserts contents of register ? |
ctrl r% | inserts contents of % register, or copies contents to
clipboard if not in insert mode |
ctrl r= | enters register calculation mode |
ctrl t | jumps back |
ctrl ] | jumps to the tag underneath the cursor |
|
abbreviate |
:ab [lhs rhs] |
Abbreviate lhs for rhs |
adjust window |
:[1addr]z[type][count][flags] |
Print the specified line with context. If count is not specified, it
default is 2. Type can be:
- : The specified line shall be decremented by the following value:
(((number of "-" characters) x count) -1)
+ : The specified line shall be incremented by the following value:
(((number of "+" characters) -1) x count) +
^ : The specified line shall be decremented by the following value:
(((number of "^" characters) +1) x count) -1
= : Embed context into lines of 40 - characters, with
(count -1) / 2 around match
. : show context with (count -1) / 2 around match
|
append |
:[1addr]a |
Enter ex text input mode; the input text is placed after the specified line. |
arguments |
:ar |
Shows command line arguments, if provided |
change |
:[2addr]c |
The input text replaces the specified lines |
close |
:close |
Closes current document |
copy |
:[2addr]t 1addr |
Copy the specified lines after the specified destination line |
de |
:de debug |
Performs debug action, as available in debug menu from menus.xml |
delete |
:[2addr]d[buffer] |
Delete the specified lines into a buffer (defaulting to the unnamed buffer) |
edit |
:e [file] |
If no file is specified shows select file dialog, otherwise edits file |
escape |
:!command
:[2addr]!command
|
If no lines are specified executes command and shows output.
If lines are specified, they are passed to the program as standard input,
and the standard output and standard error of the program replaces those
lines in the edit buffer.
|
global |
:[2addr]g/pattern/[commands]
:[2addr]v/pattern/[commands]
|
If pattern and commands are empty: remove all markers
otherwise if commands are empty: mark lines containing pattern
otherwise executes all commands for each line matching pattern,
commands separated by |, or (for v) executes all commands for
each line not matching pattern
|
goto |
:[1addr] |
Goto specified address |
grep |
:grep [match][extension][folder][options] |
If nothing specified shows find in files dialog,
otherwise greps for match in folder matching file extension using options:
/r: recursive
|
help |
:help |
Shows help |
indent |
:[2addr][>|<] |
Increase, decrease indent for range |
insert |
:[1addr]i |
Enter ex text input mode; the input text is placed
before the specified line. |
join |
:[2addr]j |
Joins lines |
mark |
:[1addr]kcharacter |
Marks address with character |
move |
:[2addr]m 1addr |
Move the specified lines after the specified destination line x |
new |
:new |
New document (dialog) |
print |
:[2addr]p[flags]
:print [file]
|
Write the addressed lines
If the # flag is specified, each line is preceded by line number.
The second synopsis shows print dialog if file is not spcified,
otherwise prints file.
|
put |
:[1addr]pu[buffer] |
Append text from the specified buffer (by default, the unnamed buffer)
to the specified line |
quit |
:q [!] |
Quit unless modified, quit forced |
read |
:[1addr]r [!][file] |
If ! not specified insert contents of file below cursor,
otherwise inserts output or running file command below cursor |
register |
:reg |
Shows registers (buffers) and variables from calculation mode |
sed |
:sed [match replace][extension][folder][options] |
If nothing specified shows replace in files dialog,
otherwise replaces match by replace in folder matching file extension using options:
/r: recursive
|
set |
:set [options] |
If options not specified shows options dialog, otherwise sets specified options |
sort |
:[2addr]S[options] |
Sorts range by lines using options:
r: reverse
u: unique
x,y: use columns
|
source |
:so file |
Executes all commands from file |
substitute |
:[2addr]s/pattern/repl/[options]
:[2addr]&[options]
:[2addr]~[options]
|
Replace the first instance of the pattern pattern by the string repl on each
specified line. If both pattern and repl are not specified or are empty
(for example, "//" ), the last s command is repeated. If only pattern is
not specified or is empty, the last regular expression used in the editor is
used as the pattern.
Supported options:
i: ignore case
c: ask for confirmation
g: global, otherwise only first match on line
When substituting you can use & or \0 to represent the target,
and \U to convert to uppercase and \L to convert to lowercase.
You can use a $ to match a line end, e.g. %s/$/EOL appends the string EOL
at the end of each line. Merging is not yet possible using a \n target,
you can create a macro for that.
You can use ~ to match against a previous replacement string.
|
syntax |
:syntax options |
Use syntax highlighting, options are on or off |
tab |
:n
:prev
|
Next or previous |
tag |
:ta tag |
Jumps to tag |
unabbreviate |
:una lhs |
Unabbreviate lhs |
version |
:ve |
Shows version |
write |
:[2addr]w [>>][file] |
If no lines are specified, the entire file is used.
If the >> argument is specified, and the file already exists, the lines are
appended to the file instead of replacing its contents. |
write and exit |
:x |
Save and quit |
write line |
:[1addr]= |
Shows line number |
yank |
:[2addr]y[buffer] |
Copy the specified lines to the specified buffer (by default, the unnamed buffer) |
|