-
Notifications
You must be signed in to change notification settings - Fork 112
Commands
t9md edited this page Oct 9, 2016
·
35 revisions
In this document, following abbreviations are used for shortness.
Abbrev | Selector | Description |
---|---|---|
!i |
:not(.insert-mode) |
except insert-mode |
i |
.insert-mode |
|
o |
.operator-pending-mode |
|
n |
.normal-mode |
|
v |
.visual-mode |
|
vB |
.visual-mode.blockwise |
|
vL |
.visual-mode.linewise |
|
vC |
.visual-mode.characterwise |
|
iR |
.insert-mode.replace |
|
# |
.with-count |
when count is specified |
% |
.has-persistent-selection |
when persistent-selection is exists |
Keymap | Command | Description |
---|---|---|
select-latest-change |
Select latest yanked or changed range | |
n gv
|
select-previous-selection |
|
%!i ⌃⌘g
|
select-persistent-selection |
Select persistent-selection and clear all persistent-selection, it's like convert to real-selection |
!i g⌘d v.is-narrowed ⌘d
|
select-occurrence |
Add selection onto each matching word within target range |
select-occurrence-in-a-function-or-inner-paragraph |
Add selection onto each matching word within target range | |
v ⏎
|
create-persistent-selection |
|
toggle-persistent-selection |
||
!i go
|
toggle-preset-occurrence |
|
!i d v x
|
delete |
|
n x
|
delete-right |
|
n X
|
delete-left |
|
!i D vB D
|
delete-to-last-character-of-line |
|
v D
|
delete-line |
|
delete-occurrence-in-a-function-or-inner-paragraph |
||
!i y
|
yank |
|
!i Y
|
yank-line |
|
yank-to-last-character-of-line |
||
!i ⌃a
|
increase |
|
!i ⌃x
|
decrease |
|
!i g⌃a
|
increment-number |
|
!i g⌃x
|
decrement-number |
|
!i P
|
put-before |
|
!i p
|
put-after |
|
put-before-and-select |
Paste before then select | |
put-after-and-select |
Paste after then select | |
n i
|
activate-insert-mode |
|
n R
|
activate-replace-mode |
|
n a
|
insert-after |
|
n A
|
insert-after-end-of-line |
|
!i I
|
insert-at-beginning-of-line |
|
n gi
|
insert-at-last-insert |
|
n O
|
insert-above-with-newline |
|
n o
|
insert-below-with-newline |
|
n.has-occurrence I v I
|
insert-at-start-of-target |
|
n.has-occurrence A v A
|
insert-at-end-of-target |
|
insert-at-start-of-inner-smart-word |
||
insert-at-end-of-inner-smart-word |
||
insert-at-head-of-target |
||
insert-at-tail-of-target |
||
insert-at-previous-fold-start |
Move to previous fold start then enter insert-mode | |
insert-at-next-fold-start |
Move to next fold start then enter insert-mode | |
insert-at-start-of-search-current-line |
||
insert-at-end-of-search-current-line |
||
!i c v s
|
change |
|
v.is-narrowed ⌃⌘c
|
change-occurrence |
Change all matching word within target range |
change-occurrence-in-a-function-or-inner-paragraph |
Change all matching word within target range | |
change-occurrence-in-a-persistent-selection |
Change all matching word within target range | |
n s
|
substitute |
|
!i S
|
substitute-line |
|
!i C
|
change-to-last-character-of-line |
|
!i g~ o,v ~
|
toggle-case |
Hello World -> hELLO wORLD
|
!i ~
|
toggle-case-and-move-right |
Hello World -> hELLO wORLD
|
!i gU o,v U
|
upper-case |
Hello World -> HELLO WORLD
|
!i gu o,v u
|
lower-case |
Hello World -> hello world
|
!i r
|
replace |
|
n r
|
replace-and-move-right |
|
split-by-character |
||
!i gc
|
camel-case |
hello-world -> helloWorld
|
snake-case |
HelloWorld -> hello_world
|
|
!i gC
|
pascal-case |
hello_world -> HelloWorld
|
!i g-
|
dash-case |
HelloWorld -> hello-world |
title-case |
HelloWorld -> Hello World
|
|
encode-uri-component |
Hello World -> Hello%20World
|
|
decode-uri-component |
Hello%20World -> Hello World
|
|
!i g|
|
trim-string |
hello -> hello
|
!i gSPC
|
compact-spaces |
a b c -> a b c
|
transform-string-by-select-list |
Interactively choose string transformation operator from select-list | |
transform-word-by-select-list |
Interactively choose string transformation operator from select-list | |
transform-smart-word-by-select-list |
Transform InnerSmartWord by transform-string-by-select-list
|
|
replace-with-register |
Replace target with specified register value | |
swap-with-register |
Swap register value with target | |
!i >
|
indent |
|
!i <
|
outdent |
|
!i =
|
auto-indent |
|
!i g/
|
toggle-line-comments |
|
surround |
Surround target by specified character like ( , [ , "
|
|
surround-word |
Surround word | |
surround-smart-word |
Surround smart-word | |
map-surround |
Surround each word(/w+/ ) within target |
|
delete-surround |
Delete specified surround character like ( , [ , "
|
|
delete-surround-any-pair |
Delete surround character by auto-detect paired char from cursor enclosed pair | |
delete-surround-any-pair-allow-forwarding |
Delete surround character by auto-detect paired char from cursor enclosed pair and forwarding pair within same line | |
change-surround |
Change surround character, specify both from and to pair char | |
change-surround-any-pair |
Change surround character, from char is auto-detected | |
change-surround-any-pair-allow-forwarding |
Change surround character, from char is auto-detected from enclosed and forwarding area | |
!i J
|
join |
|
!i gJ
|
join-with-keeping-space |
|
join-by-input |
Transform multi-line to single-line by with specified separator character | |
join-by-input-with-keeping-space |
Join lines without padding space between each line | |
split-string |
Split single-line into multi-line by splitting specified separator chars | |
reverse |
Reverse lines(e.g reverse selected three line) | |
sort |
Sort lines alphabetically |
Keymap | Command | Description |
---|---|---|
!i h !i ←
|
move-left |
|
!i l !i SPC !i →
|
move-right |
|
!i k !i ↑
|
move-up |
|
!i j !i ↓
|
move-down |
|
!i gk
|
move-up-screen |
|
!i gj
|
move-down-screen |
|
!i [
|
move-up-to-edge |
Move cursor up to edge char at same-column |
!i ]
|
move-down-to-edge |
Move cursor down to edge char at same-column |
!i w
|
move-to-next-word |
|
!i b
|
move-to-previous-word |
|
!i e
|
move-to-end-of-word |
|
!i W
|
move-to-next-whole-word |
|
!i B
|
move-to-previous-whole-word |
|
!i E
|
move-to-end-of-whole-word |
|
move-to-next-alphanumeric-word |
Move to next alphanumeric(/w+/ ) word |
|
move-to-previous-alphanumeric-word |
Move to previous alphanumeric(/w+/ ) word |
|
move-to-end-of-alphanumeric-word |
Move to end of alphanumeric(/w+/ ) word |
|
move-to-next-smart-word |
Move to next smart word (/[w-]+/ ) word |
|
move-to-previous-smart-word |
Move to previous smart word (/[w-]+/ ) word |
|
move-to-end-of-smart-word |
Move to end of smart word (/[w-]+/ ) word |
|
!i }
|
move-to-next-paragraph |
|
!i {
|
move-to-previous-paragraph |
|
!i 0 !i home
|
move-to-beginning-of-line |
|
!i |
|
move-to-column |
|
!i $ !i end
|
move-to-last-character-of-line |
|
!i g_
|
move-to-last-nonblank-character-of-line-and-down |
|
!i ^
|
move-to-first-character-of-line |
|
!i -
|
move-to-first-character-of-line-up |
|
!i + !i ⏎
|
move-to-first-character-of-line-down |
|
!i _
|
move-to-first-character-of-line-and-down |
|
!i gg
|
move-to-first-line |
|
!i G
|
move-to-last-line |
|
#!i %
|
move-to-line-by-percent |
|
!i H
|
move-to-top-of-screen |
|
!i M
|
move-to-middle-of-screen |
|
!i L
|
move-to-bottom-of-screen |
|
!i ⌃f
|
scroll-full-screen-down |
|
!i ⌃b
|
scroll-full-screen-up |
|
!i ⌃d
|
scroll-half-screen-down |
|
!i ⌃u
|
scroll-half-screen-up |
|
!i f
|
find |
|
!i F
|
find-backwards |
|
!i t
|
till |
|
!i T
|
till-backwards |
|
move-to-mark |
||
move-to-mark-line |
||
!i /
|
search |
|
!i ?
|
search-backwards |
|
search-current-line |
||
search-current-line-backwards |
||
!i *
|
search-current-word |
|
!i #
|
search-current-word-backwards |
|
!i n
|
repeat-search |
|
!i N
|
repeat-search-reverse |
|
move-to-previous-fold-start |
Move to previous fold start | |
move-to-next-fold-start |
Move to next fold start | |
move-to-previous-fold-start-with-same-indent |
Move to previous same-indented fold start | |
move-to-next-fold-start-with-same-indent |
Move to next same-indented fold start | |
move-to-previous-fold-end |
Move to previous fold end | |
move-to-next-fold-end |
Move to next fold end | |
move-to-previous-function |
Move to previous function | |
move-to-next-function |
Move to next function | |
move-to-previous-string |
Move to previous string(searched by string.begin scope) |
|
move-to-next-string |
Move to next string(searched by string.begin scope) |
|
move-to-previous-number |
Move to previous number(searched by constant.numeric scope) |
|
move-to-next-number |
Move to next number(searched by constant.numeric scope) |
|
!i %
|
move-to-pair |
Keymap | Command | Description |
---|---|---|
o,v aw
|
a-word |
|
o,v iw
|
inner-word |
|
o,v aW
|
a-whole-word |
|
o,v iW
|
inner-whole-word |
|
a-smart-word |
A word that consists of alphanumeric chars(/[A-Za-z0-9_]/ ) and hyphen -
|
|
inner-smart-word |
Currently No diff from a-smart-word
|
|
o,v as
|
a-any-pair |
|
o,v is
|
inner-any-pair |
|
a-any-pair-allow-forwarding |
Range surrounded by auto-detected paired chars from enclosed and forwarding area | |
inner-any-pair-allow-forwarding |
Range surrounded by auto-detected paired chars from enclosed and forwarding area | |
o,v aq
|
a-any-quote |
|
o,v iq
|
inner-any-quote |
|
o,v a"
|
a-double-quote |
|
o,v i"
|
inner-double-quote |
|
o,v a'
|
a-single-quote |
|
o,v i'
|
inner-single-quote |
|
o,v a`
|
a-back-tick |
|
o,v i`
|
inner-back-tick |
|
o,v a{ o,v a} o,v aB
|
a-curly-bracket |
|
o,v i{ o,v i} o,v iB
|
inner-curly-bracket |
|
a-curly-bracket-allow-forwarding |
||
inner-curly-bracket-allow-forwarding |
||
o,v a[ o,v a]
|
a-square-bracket |
|
o,v i[ o,v i]
|
inner-square-bracket |
|
a-square-bracket-allow-forwarding |
||
inner-square-bracket-allow-forwarding |
||
o,v a( o,v a) o,v ab
|
a-parenthesis |
|
o,v i( o,v i) o,v ib
|
inner-parenthesis |
|
a-parenthesis-allow-forwarding |
||
inner-parenthesis-allow-forwarding |
||
o,v a< o,v a>
|
a-angle-bracket |
|
o,v i< o,v i>
|
inner-angle-bracket |
|
a-angle-bracket-allow-forwarding |
||
inner-angle-bracket-allow-forwarding |
||
o,v at
|
a-tag |
|
o,v it
|
inner-tag |
|
o,v ap
|
a-paragraph |
|
o.has-occurrence p o,v ip
|
inner-paragraph |
|
o,v ai
|
a-indentation |
|
o,v ii
|
inner-indentation |
|
o,v a/
|
a-comment |
|
o,v i/
|
inner-comment |
|
o.has-occurrence z o,v az
|
a-fold |
|
o,v iz
|
inner-fold |
|
o.has-occurrence f o,v af
|
a-function |
|
o,v if
|
inner-function |
|
o,v al
|
a-current-line |
|
o.has-occurrence l o,v il
|
inner-current-line |
|
o,v ae
|
a-entire |
|
o,v ie
|
inner-entire |
|
o,v ac
|
a-latest-change |
|
o,v ic
|
inner-latest-change |
|
!i gn
|
search-match-forward |
|
!i gN
|
search-match-backward |
|
o,v gv
|
previous-selection |
|
o.has-occurrence r o,v ar
|
a-persistent-selection |
|
o,v ir
|
inner-persistent-selection |
|
o,v av
|
a-visible-area |
|
o.has-occurrence v o,v iv
|
inner-visible-area |
|
a-edge |
||
inner-edge |
||
a-function-or-inner-paragraph |
||
a-current-selection-and-a-persistent-selection |
Keymap | Command | Description |
---|---|---|
i ⌃r
|
insert-register |
|
insert-last-inserted |
Insert text inserted in latest insert-mode. Equivalent to i_CTRL-A of pure Vim |
|
i ⌃y
|
copy-from-line-above |
Insert character of same-column of above line. Equivalent to i_CTRL-Y of pure Vim |
copy-from-line-below |
Insert character of same-column of above line. Equivalent to i_CTRL-E of pure Vim |
Keymap | Command | Description |
---|---|---|
v o vB O
|
reverse-selections |
|
vB o
|
blockwise-other-end |
|
n u
|
undo |
|
n ⌃r
|
redo |
|
!i):not(o za
|
toggle-fold |
|
iR ⌃h iR BS
|
replace-mode-backspace |
|
!i ⌃e
|
scroll-down |
|
!i ⌃y
|
scroll-up |
|
!i):not(o z⏎
|
scroll-cursor-to-top |
|
!i):not(o zt
|
scroll-cursor-to-top-leave |
|
!i):not(o z-
|
scroll-cursor-to-bottom |
|
!i):not(o zb
|
scroll-cursor-to-bottom-leave |
|
!i):not(o z.
|
scroll-cursor-to-middle |
|
!i):not(o zz
|
scroll-cursor-to-middle-leave |
|
!i):not(o zs
|
scroll-cursor-to-left |
|
!i):not(o ze
|
scroll-cursor-to-right |
|
i ⌃o
|
activate-normal-mode-once |