forked from JetBrains/ideavim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.txt
191 lines (164 loc) · 10.1 KB
/
index.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
*index.txt*
IDEAVIM REFERENCE MANUAL based on Vim Reference Manual
*index*
This file contains a list of commands that are covered with tests, for each
mode, with a tag and a short description. The lists are sorted on ASCII value.
Tip: When looking for certain functionality, use a search command. E.g.,
to look for deleting something, use: "/delete".
1. Insert mode |insert-index|
2. Normal mode |normal-index|
2.1. Text objects |objects|
2.3. Square bracket commands |[|
3. Visual mode |visual-index|
5. EX commands |ex-cmd-index|
==============================================================================
1. Insert mode *insert-index*
tag char action in Insert mode ~
-----------------------------------------------------------------------
|i_CTRL-K| CTRL-K {char1} {char2}
enter digraph
|i_CTRL-O| CTRL-O execute a single command and return to insert
mode
|i_CTRL-R| CTRL-R {0-9a-z"%#*:=}
insert the contents of a register
|i_CTRL-W| CTRL-W delete word before the cursor
==============================================================================
2. Normal mode *normal-index*
CHAR any non-blank character
WORD a sequence of non-blank characters
N a number entered before the command
{motion} a cursor movement command
Nmove the text that is moved over with a {motion}
SECTION a section that possibly starts with '}' instead of '{'
note: 1 = cursor movement command; 2 = can be undone/redone
tag char note action in Normal mode ~
------------------------------------------------------------------------------
|quote| "{a-zA-Z0-9.%#:-"} use register {a-zA-Z0-9.%#:-"} for next
delete, yank or put (uppercase to append)
({.%#:} only work with put)
|%| % 1 find the next (curly/square) bracket on
this line and go to its match, or go to
matching comment bracket, or go to matching
preprocessor directive.
|/| /{pattern}<CR> 1 search forward for the Nth occurrence of
{pattern}
|count| 0 1 cursor to the first char of the line
|count| 1 prepend to command to give a count
|count| 2 "
|count| 3 "
|count| 4 "
|count| 5 "
|count| 6 "
|count| 7 "
|count| 8 "
|count| 9 "
|F| F{char} 1 cursor to the Nth occurrence of {char} to
the left
|O| O 2 begin a new line above the cursor and
insert text, repeat N times
|P| ["x]P 2 put the text [from buffer x] before the
cursor N times
|T| T{char} 1 cursor till after Nth occurrence of {char}
to the left
|Y| ["x]Y yank N lines [into buffer x]; synonym for
"yy"
|c| ["x]c{motion} 2 delete Nmove text [into buffer x] and start
insert
|cc| ["x]cc 2 delete N lines [into buffer x] and start
|d| ["x]d{motion} 2 delete Nmove text [into buffer x]
|f| f{char} 1 cursor to Nth occurrence of {char} to the
right
|i| i 2 insert text before the cursor N times
|p| ["x]p 2 put the text [from register x] after the
cursor N times
|q| q{0-9a-zA-Z"} record typed characters into named register
{0-9a-zA-Z"} (uppercase to append)
|q| q (while recording) stops recording
|t| t{char} 1 cursor till before Nth occurrence of {char}
to the right
|y| ["x]y{motion} yank Nmove text [into buffer x]
|yy| ["x]yy yank N lines [into buffer x]
|~| ~ 2 'tildeop' off: switch case of N characters
under cursor and move the cursor N
characters to the right
==============================================================================
2.1 Text objects *objects*
These can be used after an operator or in Visual mode to select an object.
tag command action in op-pending and Visual mode ~
------------------------------------------------------------------------------
|v_aquote| a" double quoted string
|v_a'| a' single quoted string
|v_a(| a( same as ab
|v_a)| a) same as ab
|v_a<| a< "a <>" from '<' to the matching '>'
|v_a>| a> same as a<
|v_aB| aB "a Block" from "[{" to "]}" (with brackets)
|v_aW| aW "a WORD" (with white space)
|v_a[| a[ "a []" from '[' to the matching ']'
|v_a]| a] same as a[
|v_a`| a` string in backticks
|v_ab| ab "a block" from "[(" to "])" (with braces)
|v_ap| ap "a paragraph" (with white space)
|v_as| as "a sentence" (with white space)
|v_aw| aw "a word" (with white space)
|v_a{| a{ same as aB
|v_a}| a} same as aB
|v_iquote| i" double quoted string without the quotes
|v_i'| i' single quoted string without the quotes
|v_i(| i( same as ib
|v_i)| i) same as ib
|v_i<| i< "inner <>" from '<' to the matching '>'
|v_i>| i> same as i<
|v_iB| iB "inner Block" from "[{" and "]}"
|v_iW| iW "inner WORD"
|v_i[| i[ "inner []" from '[' to the matching ']'
|v_i]| i] same as i[
|v_i`| i` string in backticks without the backticks
|v_ib| ib "inner block" from "[(" to "])"
|v_ip| ip "inner paragraph"
|v_is| is "inner sentence"
|v_iw| iw "inner word"
|v_i{| i{ same as iB
|v_i}| i} same as iB
==============================================================================
2.3 Square bracket commands *[* *]*
tag char note action in Normal mode ~
------------------------------------------------------------------------------
|[(| [( 1 cursor N times back to unmatched '('
|[{| [{ 1 cursor N times back to unmatched '{'
|])| ]) 1 cursor N times forward to unmatched ')'
|]}| ]} 1 cursor N times forward to unmatched '}'
==============================================================================
2.4 Commands starting with 'g' *g*
tag char note action in Normal mode ~
------------------------------------------------------------------------------
|gg| gg 1 cursor to line N, default first line
|gi| gi 2 like "i", but first move to the |'^| mark
==============================================================================
3. Visual mode *visual-index*
Most commands in Visual mode are the same as in Normal mode. The ones listed
here are those that are different.
tag command note action in Visual mode ~
------------------------------------------------------------------------------
|v_y| y yank the highlighted area
==============================================================================
4. Command-line editing *ex-edit-index*
Get to the command-line with the ':', '!', '/' or '?' commands.
Normal characters are inserted at the current cursor position.
"Completion" below refers to context-sensitive completion. It will complete
file names, tags, commands etc. as appropriate.
tag command action in Command-line editing mode ~
------------------------------------------------------------------------------
|c_CTRL-R| CTRL-R {0-9a-z"%#*:= CTRL-F CTRL-P CTRL-W CTRL-A}
insert the contents of a register or object
under the cursor as if typed
==============================================================================
5. EX commands *ex-cmd-index*
This is a brief but complete listing of all the ":" commands, without
mentioning any arguments. The optional part of the command name is inside [].
The commands are sorted on the non-optional part of their name.
tag command action ~
------------------------------------------------------------------------------
|:display| :di[splay] display registers
|:registers| :reg[isters] display the contents of registers
|:substitute| :s[ubstitute] find and replace text