Nvim:help
pages,generated fromsource using thetree-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 itis not located in the default place. You can jump to subjects like with tags:UseCTRL-]
to jump to a subject under the cursor, useCTRL-T
to jump back.make install
), just delete its files, typically located in:/usr/local/bin/nvim/usr/local/share/nvim
:echo v:progpath:echo $VIMRUNTIME
apt-get remove neovim
brew uninstall neovim
scoop uninstall 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 inmotion.txt.w
to start of next wordb
to begin of current word4j
four lines down/The<CR>
to next occurrence of "The"{Visual}
A selected text area. It is started with the "v", "V", orCTRL-V
command, then any cursor movement command can be used to change the end of the selected text. This is used before anoperator command to highlight the text that is to be operated upon. SeeVisual-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; thusCTRL-A
andCTRL-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 asCTRL-A
.command
New style command, this distinguishes it from other quoted text and strings.<Nul>
zeroCTRL-@
0 (stored as 10)<Nul><BS>
backspaceCTRL-H
8backspace<Tab>
tabCTRL-I
9tabTablinefeed<NL>
linefeedCTRL-J
10 (used for<Nul>
)<CR>
carriage returnCTRL-M
13carriage-return<Return>
same as<CR>
<Return><Enter>
same as<CR>
<Enter><Esc>
escapeCTRL-[
27escape<Esc><Space>
space 32space<lt>
less-than < 60<lt><Bslash>
backslash \ 92backslash<Bslash><Bar>
vertical bar | 124<Bar><Del>
delete 127<CSI>
command sequence introALT-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-upcursor-upcursor_up<Down>
cursor-downcursor-downcursor_down<Left>
cursor-leftcursor-leftcursor_left<Right>
cursor-rightcursor-rightcursor_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 12function_keyfunction-key<S-F1>
-<S-F12>
shift-function keys 1 to 12<S-F1><Help>
help key<Undo>
undo key<Find>
find key<Select>
select key<Insert>
insert key<Home>
homehome<End>
endend<PageUp>
page-uppage_uppage-up<PageDown>
page-downpage_downpage-down<kUp>
keypad cursor-upkeypad-cursor-up<kDown>
keypad cursor-downkeypad-cursor-down<kLeft>
keypad cursor-leftkeypad-cursor-left<kRight>
keypad cursor-rightkeypad-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 deletekeypad-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 Enterkeypad-enter<k0>
-<k9>
keypad 0 to 9keypad-0keypad-9<S-…>
shift-keyshift<S-<C-…>
control-keycontrolctrl<C-<M-…>
alt-key or meta-keyMETAALT<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>
forCTRL-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 abackslash 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 secondone 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 backto readable text usekeytrans()
.CTRL-\
) is sent to the process running in the currentterminal buffer. IfCTRL-\
is pressed, the next key is sent unless it isCTRL-N
(CTRL-\_CTRL-N) orCTRL-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 (seei_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" orCTRL-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 modethough, use ":visual".You will know you are back in Normal mode when you see the screen flash orhear the bell after you type<Esc>
. However, when pressing<Esc>
after usingCTRL-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 : / ? ! gQVisual *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" (seev_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-HCTRL-\
CTRL-N
or<C-\>
<C-N>
can be used to go toNormal mode from any other mode. This can be used to make sure Vim is inNormal mode, without causing a beep like<Esc>
would. However, this does notwork in Ex mode. When used after a command that takes an argument, such asf orm, the timeout set with'ttimeoutlen' applies.CTRL-\
CTRL-G
works the same asCTRL-\_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-printingcharacters are replaced with "^{char}", where{char}
is the non-printingcharacter with 64 added. Thus character 7 (bell) will be shown as "^G".Characters between 127 and 160 are replaced with "~{char}", where{char}
isthe character with 64 subtracted. These characters occupy more than oneposition 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 severalspaces, but as "^I". A '$' will be placed at the end of the line, so you canfind trailing blanks.status message option default Unix defaultcurrent mode 'showmode' on oncommand characters 'showcmd' on offcursor position 'ruler' off offThe current mode is "-- INSERT --" or "-- REPLACE --", see'showmode'. Thecommand 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. +-- folded2. two 2. +-- folded 2. five 2. five3. three 3. five 3. six 3. six4. four 4. six 4. seven 4. seven5. five 5. seven 5. === status line ===6. six 6. aaa7. seven 7. bbb 8. ccc ccc c1. aaa 1. aaa 1. aaa 9. cc2. bbb 2. bbb 2. bbb 10. ddd3. 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. ~