You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.
|VimStyle class|key|function|
|---|---|---|---|
|RightMotion|Nh|left (also: CTRL-H, <BS>, or <Left> key)|
|RightMotion|Nl|right (also: <Space> or <Right> key)|
|FirstCharacterInLineMotion|0|to first character in the line (also: <Home> key)|
|FirstCharactorMotion|^|to first non-blank character in the line|
|LastCharacterInLineMotion(partial)|N$|to the last character in the line (N-1 lines lower) (also: <End> key)|
||g0|to first character in screen line (differs from "0" when lines wrap)|
||g^|to first non-blank character in screen line (differs from "^" when lines wrap)|
||Ng$|to last character in screen line (differs from "$" when lines wrap)|
||gm|to middle of the screen line|
||N||to column N (default: 1)|
|FindCharacterMotion|Nf{char}|to the Nth occurrence of {char} to the right|
|FindCharacterMotion|NF{char}|to the Nth occurrence of {char} to the left|
|FindCharacterMotion|Nt{char}|till before the Nth occurrence of {char} to the right|
|FindCharacterMotion|NT{char}|till before the Nth occurrence of {char} to the left|
|FindCharacterMotion|N;|repeat the last "f", "F", "t", or "T" N times|
|FindCharacterMotion|N,|repeat the last "f", "F", "t", or "T" N times in opposite direction|
Up-down motions
|VimStyle class|key|function|
|---|---|---|---|
|DownMotion|Nk|up N lines (also: CTRL-P and <Up>)|
|DownMotion|Nj|down N lines (also: CTRL-J, CTRL-N, <NL>, and <Down>)|
||N-|up N lines, on the first non-blank character|
||N+|down N lines, on the first non-blank character (also: CTRL-M and <CR>)|
||N_|down N-1 lines, on the first non-blank character|
|FirstCharacterMotion|NG|goto line N (default: last line), on the first non-blank character|
|FirstCharacterMotion|Ngg|goto line N (default: first line), on the first non-blank character|
||N%|goto line N percentage down in the file; N must be given, otherwise it is the |%| command|
||Ngk|up N screen lines (differs from "k" when line wraps)|
||Ngj|down N screen lines (differs from "j" when line wraps)|
Text object motions
VimStyle class
key
function
WordMotion
Nw
N words forward
WordMotion
NW
N blank-separated
WordMotion
Ne
forward to the end of the Nth word
WordMotion
NE
forward to the end of the Nth blank-separated
WordMotion
Nb
N words backward
WordMotion
NB
N blank-separated
Nge
backward to the end of the Nth word
NgE
backward to the end of the Nth blank-separated
N)
N sentences forward
N(
N sentences backward
ParagraphMotion
N}
N paragraphs forward
ParagraphMotion
N{
N paragraphs backward
N]]
N sections forward, at start of section
N[[
N sections backward, at start of section
N][
N sections forward, at end of section
N[]
N sections backward, at end of section
BrancketMotion
N[(
N times back to unclosed '('
BrancketMotion
N[{
N times back to unclosed '{'
N[m
N times back to start of method (for Java)
N[M
N times back to end of method (for Java)
BrancketMotion
N])
N times forward to unclosed ')'
BrancketMotion
N]}
N times forward to unclosed '}'
N]m
N times forward to start of method (for Java)
N]M
N times forward to end of method (for Java)
N[#
N times back to unclosed "#if" or "#else"
N]#
N times forward to unclosed "#else" or "#endif"
N[*
N times back to start of comment "/*"
N]*
N times forward to end of comment "*/"
Pattern searches
VimStyle class
key
function
N/{pattern}[/[offset]]<CR>
search forward for the Nth occurrence of {pattern}
N?{pattern}[?[offset]]<CR>
search backward for the Nth occurrence of {pattern}
N/<CR>
repeat last search, in the forward direction
N?<CR>
repeat last search, in the backward direction
VSCode next match find
Nn
repeat last search
VSCode prefious match find
NN
repeat last search, in opposite direction
N*
search forward for the identifier under the cursor
N#
search backward for the identifier under the cursor
Ng*
like "*", but also find partial matches
Ng#
like "#", but also find partial matches
gd
goto local declaration of identifier under the cursor
gD
goto global declaration of identifier under the cursor
Marks and motions
VimStyle class
key
function
m{a-zA-Z}
mark current position with mark {a-zA-Z}
``{a-z}`
go to mark {a-z} within current file
``{A-Z}`
go to mark {A-Z} in any file
``{0-9}`
go to the position where Vim was previously exited
``
go to the position before the last jump
`"
go to the position when last editing this file
`[
go to the start of the previously operated or put text
`]
go to the end of the previously operated or put text
`<
go to the start of the (previous) Visual area
`>
go to the end of the (previous) Visual area
`.
go to the position of the last change in this file
'{a-zA-Z0-9[]'"<>.}
same as `,but on the first non-blank in the line
NCTRL-O
go to Nth older position in jump list
NCTRL-I
go to Nth newer position in jump list
Various motions
VimStyle class
key
function
%
find the next brace, bracket, comment, or "#if"/ "#else"/"#endif" in this line and go to its match
NH
go to the Nth line in the window, on the first non-blank
M
go to the middle line in the window, on the first non-blank
NL
go to the Nth line from the bottom, on the first non-blank
Ngo
go to Nth byte in the buffer
Scrolling
VimStyle class
key
function
NCTRL-E
window N lines downwards (default: 1)
NCTRL-D
window N lines Downwards (default: 1/2 window)
NCTRL-F
window N pages Forwards (downwards)
NCTRL-Y
window N lines upwards (default: 1)
NCTRL-U
window N lines Upwards (default: 1/2 window)
NCTRL-B
window N pages Backwards (upwards)
z<CR>orzt
redraw, current line at top of window
z.
or zzredraw, current line at center of window
z-
or zbredraw, current line at bottom of window
Nzh
These only work when 'wrap' is off: scroll screen N characters to the right
Nzl
These only work when 'wrap' is off: scroll screen N characters to the left
NzH
These only work when 'wrap' is off: scroll screen half a screenwidth to the right
NzL
These only work when 'wrap' is off: scroll screen half a screenwidth to the left
Inserting text
VimStyle class
key
function
InsertTextAction(except N)
Na
append text after the cursor (N times)
InsertTextAction(except N)
NA
append text at the end of the line (N times)
InsertTextAction(except N)
Ni
insert text before the cursor (N times) (also: <Insert>)
InsertTextAction(except N)
NI
insert text before the first non-blank in the line (N times)
NgI
insert text in column 1 (N times)
OpenNewLineAndAppendTextAction(except N)
No
open a new line below the current line, append text (N times)
OpenNewLineAndAppendTextAction(except N)
NO
open a new line above the current line, append text (N times)
in Visual block mode: I
insert the same text in front of all the selected lines