Nvim :help
pages, generated
from source
using the tree-sitter-vimdoc parser.
<Help>
or <F1>
key and with the
:help command (just type ":help", without the bars or quotes).
The 'helpfile' option can be set to the name of the help file, in case it
is not located in the default place. You can jump to subjects like with tags:
Use CTRL-]
to jump to a subject under the cursor, use CTRL-T
to jump back.
/usr/local/bin/nvim /usr/local/share/nvim
apt-get remove neovim
brew install neovim
scoop install neovim
CTRL-X
.
<Del>
to erase the last digit (N<Del>).
{char1-char2}
A single character from the range char1 to char2. For
example: {a-z}
is a lowercase letter. Multiple ranges may be
concatenated. For example, {a-zA-Z0-9}
is any alphanumeric
character.
{motion}
A command that moves the cursor. These are explained in
motion.txt.
w
to start of next word
b
to begin of current word
4j
four lines down
/The<CR>
to next occurrence of "The"
{Visual}
A selected text area. It is started with the "v", "V", or
CTRL-V
command, then any cursor movement command can be used
to change the end of the selected text.
This is used before an operator command to highlight the
text that is to be operated upon.
See Visual-mode.
<character>
A special character from the table below, optionally with
modifiers, or a single ASCII character with modifiers.
CTRL-{char}
{char}
typed as a control character; that is, typing {char}
while holding the CTRL key down. The case of {char}
is
ignored; thus CTRL-A
and CTRL-a
are equivalent. But in
some terminals and environments, using the SHIFT key will
produce a distinct code (e.g. CTRL-SHIFT-a
); in these
environments using the SHIFT key will not trigger commands
such as CTRL-A
.
command
New style command, this distinguishes it from other quoted
text and strings.
<Nul>
zero CTRL-@
0 (stored as 10) <Nul>
<BS>
backspace CTRL-H
8 backspace
<Tab>
tab CTRL-I
9 tab Tab
linefeed<NL>
linefeed CTRL-J
10 (used for <Nul>
)
<CR>
carriage return CTRL-M
13 carriage-return
<Return>
same as <CR>
<Return><Enter>
same as <CR>
<Enter><Esc>
escape CTRL-[
27 escape <Esc>
<Space>
space 32 space
<lt>
less-than < 60 <lt>
<Bslash>
backslash \ 92 backslash <Bslash>
<Bar>
vertical bar | 124 <Bar>
<Del>
delete 127
<CSI>
command sequence intro ALT-E
sc 155 <CSI>
<EOL>
end-of-line (can be <CR>
, <NL>
or <CR>
<NL>
,
depends on system and 'fileformat') <EOL>
<Ignore>
cancel wait-for-character <Ignore><NOP>
no-op: do nothing (useful in mappings) <Nop>
<Up>
cursor-up cursor-up cursor_up
<Down>
cursor-down cursor-down cursor_down
<Left>
cursor-left cursor-left cursor_left
<Right>
cursor-right cursor-right cursor_right
<S-Up>
shift-cursor-up
<S-Down>
shift-cursor-down
<S-Left>
shift-cursor-left
<S-Right>
shift-cursor-right
<C-Left>
control-cursor-left
<C-Right>
control-cursor-right
<F1>
- <F12>
function keys 1 to 12 function_key function-key
<S-F1>
- <S-F12>
shift-function keys 1 to 12 <S-F1>
<Help>
help key
<Undo>
undo key
<Insert>
insert key
<Home>
home home<End>
end end<PageUp>
page-up page_up page-up
<PageDown>
page-down page_down page-down
<kUp>
keypad cursor-up keypad-cursor-up<kDown>
keypad cursor-down keypad-cursor-down<kLeft>
keypad cursor-left keypad-cursor-left<kRight>
keypad cursor-right keypad-cursor-right<kHome>
keypad home (upper left) keypad-home
<kEnd>
keypad end (lower left) keypad-end<kOrigin>
keypad origin (middle) keypad-origin<kPageUp>
keypad page-up (upper right) keypad-page-up
<kPageDown>
keypad page-down (lower right) keypad-page-down
<kDel>
keypad delete keypad-delete<kPlus>
keypad + keypad-plus<kMinus>
keypad - keypad-minus<kMultiply>
keypad * keypad-multiply<kDivide>
keypad / keypad-divide<kPoint>
keypad . keypad-point<kComma>
keypad , keypad-comma<kEqual>
keypad = keypad-equal<kEnter>
keypad Enter keypad-enter<k0>
- <k9>
keypad 0 to 9 keypad-0 keypad-9
<S-…>
shift-key shift <S-
<C-…>
control-key control ctrl <C-
<M-…>
alt-key or meta-key META ALT <M-
<A-…>
same as <M-…>
<A-<D-…>
command-key or "super" key <D-
<Help>
, <S-Right>
, …) depends on the UI or host
terminal.
<k0>
,
<k1>
, ..., <k9>
and <kPoint>
will not work.
<M-ä>
. Which
combinations actually work depends on the UI or host terminal.
<Esc>
was pressed before the key.
<M-C-T>
for CTRL-A
LT-T),
but your terminal must encode the input for that to work. tui-input
<Esc>
Escape key
<C-G>
CTRL-G
<Up>
cursor up key
<C-LeftMouse>
Control- left mouse click
<S-F11>
Shifted function key 11
<M-a>
Meta- a ('a' with bit 8 set)
<M-A>
Meta- A ('A' with bit 8 set)
<lt>
to escape the special meaning of key names. Using a
backslash also works, but only when 'cpoptions' does not include the 'B' flag.
CTRL-H
to the six characters "<Home>"::imap <C-H> \<Home>
:imap <C-H> <lt>Home>
The first one only works when the 'B' flag is not in 'cpoptions'. The second
one always works.
To get a literal "<lt>" in a mapping::map <C-L> <lt>lt>
The notation can be used in a double quoted strings, using "\<" at the start,
e.g. "\<C-Space>". This results in a special key code. To convert this back
to readable text use keytrans()
.
CTRL-\
) is sent to
the process running in the current terminal buffer.
If CTRL-\
is pressed, the next key is sent unless it
is CTRL-N
(CTRL-\_CTRL-N) or CTRL-O
(t_CTRL-\_CTRL-O).
If the 'showmode' option is on "-- TERMINAL --" is shown
at the bottom of the window.
{motion}
to specify the text that the operator will work on.
CTRL-O
is typed in Insert mode (see
i_CTRL-O). This is like Normal mode, but after
executing one command Vim returns to Insert mode.
If the 'showmode' option is on "-- (insert) --" is
shown at the bottom of the window.
CTRL-O
and then "v", "V" or
CTRL-V
. When the Visual selection ends, Vim returns
to Insert mode.
If the 'showmode' option is on "-- (insert) VISUAL --"
is shown at the bottom of the window.
<S-Right>
.
When the Select mode ends, Vim returns to Insert mode.
If the 'showmode' option is on "-- (insert) SELECT --"
is shown at the bottom of the window.
<Esc>
twice. This doesn't work for Ex mode
though, use ":visual".
You will know you are back in Normal mode when you see the screen flash or
hear the bell after you type <Esc>
. However, when pressing <Esc>
after using
CTRL-O in Insert mode you get a beep but you are still in Insert mode, type
<Esc>
again.
FROM mode TO mode Normal Visual Select Insert Replace Cmd-line Ex > Normal v V ^V *4 *1 R gR : / ? ! Q Visual *2 ^G c C -- : -- Select *5 ^O ^G *6 -- -- -- Insert <Esc> -- -- <Insert> -- -- Replace <Esc> -- -- <Insert> -- -- Command-line *3 -- -- :start -- -- Ex :vi -- -- -- -- -- -- not possible
<Esc>
"v", "V" or "CTRL-V"
(see v_v), which just stops Visual mode without side effects.
<CR>
or <NL>
, which causes the entered command to be executed.
CTRL-U
) and giving a final <BS>
.
CTRL-C
or <Esc>
, which quits the command-line without executing
the command.
In the last case <Esc>
may be the character defined with the 'wildchar'
option, in which case it will start command-line completion. You can
ignore that and type <Esc>
again.
CTRL-H
" g_CTRL-H
CTRL-\
CTRL-N
or <C-\>
<C-N>
can be used to go to
Normal mode from any other mode. This can be used to make sure Vim is in
Normal mode, without causing a beep like <Esc>
would. However, this does not
work in Ex mode. When used after a command that takes an argument, such as
f or m, the timeout set with 'ttimeoutlen' applies.
CTRL-\
CTRL-G
works the same as CTRL-\_CTRL-N for backward compatibility.
:vi
command (:visual) to exit this mode.
+-----------------------+ |some line | |last line | |~ | |~ | +-----------------------+
+-----------------------+ |first line | |second line | |@ | |@ | +-----------------------+
+-----------------------+ |first line | |second line | |a very long line that d| |oesn't fit in the wi@@@| +-----------------------+
<Tab>
is replaced with the number of spaces that it represents. Other non-printing
characters are replaced with "^{char}", where {char}
is the non-printing
character with 64 added. Thus character 7 (bell) will be shown as "^G".
Characters between 127 and 160 are replaced with "~{char}", where {char}
is
the character with 64 subtracted. These characters occupy more than one
position on the screen. The cursor can only be positioned on the first one.
":set showbreak=\ \ \ \ \ \ \ \ "If you set the 'list' option,
<Tab>
characters will not be shown as several
spaces, but as "^I". A '$' will be placed at the end of the line, so you can
find trailing blanks.
status message option default Unix default current mode 'showmode' on on command characters 'showcmd' on off cursor position 'ruler' off offThe current mode is "-- INSERT --" or "-- REPLACE --", see 'showmode'. The command characters are those that you typed but were not used yet.
:set nosc noru nosmIf there is an error, an error message will be shown for at least one second (in reverse video).
+-------------------------------+ screen | window 1 | window 2 | | | | | | | |= status line =|= status line =| | window 3 | | | | | |==== status line ==============| |command line | +-------------------------------+
buffer lines logical lines window lines screen lines ----------------------------------------------------------------------- 1. one 1. one 1. +-- folded 1. +-- folded 2. two 2. +-- folded 2. five 2. five 3. three 3. five 3. six 3. six 4. four 4. six 4. seven 4. seven 5. five 5. seven 5. === status line === 6. six 6. aaa 7. seven 7. bbb 8. ccc ccc c 1. aaa 1. aaa 1. aaa 9. cc 2. bbb 2. bbb 2. bbb 10. ddd 3. ccc ccc ccc 3. ccc ccc ccc 3. ccc ccc c 11. ~ 4. ddd 4. ddd 4. cc 12. === status line === 5. ddd 13. (command line) 6. ~