Mercurial > vim
annotate runtime/doc/visual.txt @ 3682:11d40fc82f11
Updated runtime files.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Thu, 12 Jul 2012 22:01:11 +0200 |
parents | 9cb3a75a20b9 |
children | 9f48a5432997 |
rev | line source |
---|---|
3682 | 1 *visual.txt* For Vim version 7.3. Last change: 2012 Jun 14 |
7 | 2 |
3 | |
4 VIM REFERENCE MANUAL by Bram Moolenaar | |
5 | |
6 | |
7 Visual mode *Visual* *Visual-mode* *visual-mode* | |
8 | |
9 Visual mode is a flexible and easy way to select a piece of text for an | |
10 operator. It is the only way to select a block of text. | |
11 | |
12 This is introduced in section |04.4| of the user manual. | |
13 | |
14 1. Using Visual mode |visual-use| | |
15 2. Starting and stopping Visual mode |visual-start| | |
16 3. Changing the Visual area |visual-change| | |
17 4. Operating on the Visual area |visual-operators| | |
18 5. Blockwise operators |blockwise-operators| | |
19 6. Repeating |visual-repeat| | |
20 7. Examples |visual-examples| | |
21 8. Select mode |Select-mode| | |
22 | |
23 {Vi has no Visual mode, the name "visual" is used for Normal mode, to | |
24 distinguish it from Ex mode} | |
25 {not available when the |+visual| feature was disabled when compiling} | |
26 | |
27 ============================================================================== | |
28 1. Using Visual mode *visual-use* | |
29 | |
30 Using Visual mode consists of three parts: | |
31 1. Mark the start of the text with "v", "V" or CTRL-V. | |
32 The character under the cursor will be used as the start. | |
33 2. Move to the end of the text. | |
34 The text from the start of the Visual mode up to and including the | |
35 character under the cursor is highlighted. | |
36 3. Type an operator command. | |
37 The highlighted characters will be operated upon. | |
38 | |
39 The 'highlight' option can be used to set the display mode to use for | |
40 highlighting in Visual mode. | |
41 The 'virtualedit' option can be used to allow positioning the cursor to | |
42 positions where there is no actual character. | |
43 | |
44 The highlighted text normally includes the character under the cursor. | |
45 However, when the 'selection' option is set to "exclusive" and the cursor is | |
46 after the Visual area, the character under the cursor is not included. | |
47 | |
48 With "v" the text before the start position and after the end position will | |
42 | 49 not be highlighted. However, all uppercase and non-alpha operators, except |
7 | 50 "~" and "U", will work on whole lines anyway. See the list of operators |
51 below. | |
52 | |
53 *visual-block* | |
54 With CTRL-V (blockwise Visual mode) the highlighted text will be a rectangle | |
55 between start position and the cursor. However, some operators work on whole | |
56 lines anyway (see the list below). The change and substitute operators will | |
57 delete the highlighted text and then start insertion at the top left | |
58 position. | |
59 | |
60 ============================================================================== | |
61 2. Starting and stopping Visual mode *visual-start* | |
62 | |
63 *v* *characterwise-visual* | |
3557 | 64 [count]v Start Visual mode per character. |
65 With [count] select that many characters, like moving | |
66 the cursor right [count] characters. One less when | |
67 'selection' is not "exclusive". | |
7 | 68 |
69 *V* *linewise-visual* | |
3557 | 70 [count]V Start Visual mode linewise. |
71 With [count] select that many lines. | |
7 | 72 |
73 *CTRL-V* *blockwise-visual* | |
3557 | 74 [count]CTRL-V Start Visual mode blockwise. Note: Under Windows |
7 | 75 CTRL-V could be mapped to paste text, it doesn't work |
76 to start Visual mode then, see |CTRL-V-alternative|. | |
3557 | 77 [count] is used as with `v` above. |
7 | 78 |
79 If you use <Esc>, click the left mouse button or use any command that | |
80 does a jump to another buffer while in Visual mode, the highlighting stops | |
81 and no text is affected. Also when you hit "v" in characterwise Visual mode, | |
82 "CTRL-V" in blockwise Visual mode or "V" in linewise Visual mode. If you hit | |
83 CTRL-Z the highlighting stops and the editor is suspended or a new shell is | |
84 started |CTRL-Z|. | |
85 | |
86 new mode after typing: *v_v* *v_CTRL-V* *v_V* | |
87 old mode "v" "CTRL-V" "V" ~ | |
88 | |
89 Normal Visual blockwise Visual linewise Visual | |
90 Visual Normal blockwise Visual linewise Visual | |
91 blockwise Visual Visual Normal linewise Visual | |
92 linewise Visual Visual blockwise Visual Normal | |
93 | |
548 | 94 *gv* *v_gv* *reselect-Visual* |
7 | 95 gv Start Visual mode with the same area as the previous |
236 | 96 area and the same mode. |
97 In Visual mode the current and the previous Visual | |
98 area are exchanged. | |
99 After using "p" or "P" in Visual mode the text that | |
100 was put will be selected. | |
7 | 101 |
102 *<LeftMouse>* | |
103 <LeftMouse> Set the current cursor position. If Visual mode is | |
104 active it is stopped. Only when 'mouse' option is | |
105 contains 'n' or 'a'. If the position is within 'so' | |
106 lines from the last line on the screen the text is | |
107 scrolled up. If the position is within 'so' lines from | |
108 the first line on the screen the text is scrolled | |
109 down. | |
110 | |
111 *<RightMouse>* | |
112 <RightMouse> Start Visual mode if it is not active. The text from | |
113 the cursor position to the position of the click is | |
114 highlighted. If Visual mode was already active move | |
115 the start or end of the highlighted text, which ever | |
116 is closest, to the position of the click. Only when | |
117 'mouse' option contains 'n' or 'a'. | |
118 | |
119 Note: when 'mousemodel' is set to "popup", | |
120 <S-LeftMouse> has to be used instead of <RightMouse>. | |
121 | |
122 *<LeftRelease>* | |
123 <LeftRelease> This works like a <LeftMouse>, if it is not at | |
124 the same position as <LeftMouse>. In an older version | |
125 of xterm you won't see the selected area until the | |
126 button is released, unless there is access to the | |
127 display where the xterm is running (via the DISPLAY | |
128 environment variable or the -display argument). Only | |
129 when 'mouse' option contains 'n' or 'a'. | |
130 | |
131 If Visual mode is not active and the "v", "V" or CTRL-V is preceded with a | |
132 count, the size of the previously highlighted area is used for a start. You | |
133 can then move the end of the highlighted area and give an operator. The type | |
134 of the old area is used (character, line or blockwise). | |
135 - Linewise Visual mode: The number of lines is multiplied with the count. | |
136 - Blockwise Visual mode: The number of lines and columns is multiplied with | |
137 the count. | |
138 - Normal Visual mode within one line: The number of characters is multiplied | |
139 with the count. | |
140 - Normal Visual mode with several lines: The number of lines is multiplied | |
141 with the count, in the last line the same number of characters is used as | |
142 in the last line in the previously highlighted area. | |
143 The start of the text is the Cursor position. If the "$" command was used as | |
144 one of the last commands to extend the highlighted text, the area will be | |
145 extended to the rightmost column of the longest line. | |
146 | |
147 If you want to highlight exactly the same area as the last time, you can use | |
148 "gv" |gv| |v_gv|. | |
149 | |
42 | 150 *v_<Esc>* |
151 <Esc> In Visual mode: Stop Visual mode. | |
152 | |
7 | 153 *v_CTRL-C* |
154 CTRL-C In Visual mode: Stop Visual mode. When insert mode is | |
155 pending (the mode message shows | |
156 "-- (insert) VISUAL --"), it is also stopped. | |
157 | |
158 ============================================================================== | |
159 3. Changing the Visual area *visual-change* | |
160 | |
161 *v_o* | |
162 o Go to Other end of highlighted text: The current | |
163 cursor position becomes the start of the highlighted | |
164 text and the cursor is moved to the other end of the | |
165 highlighted text. The highlighted area remains the | |
166 same. | |
167 | |
168 *v_O* | |
169 O Go to Other end of highlighted text. This is like | |
170 "o", but in Visual block mode the cursor moves to the | |
171 other corner in the same line. When the corner is at | |
172 a character that occupies more than one position on | |
173 the screen (e.g., a <Tab>), the highlighted text may | |
174 change. | |
175 | |
176 *v_$* | |
177 When the "$" command is used with blockwise Visual mode, the right end of the | |
178 highlighted text will be determined by the longest highlighted line. This | |
179 stops when a motion command is used that does not move straight up or down. | |
180 | |
181 For moving the end of the block many commands can be used, but you cannot | |
182 use Ex commands, commands that make changes or abandon the file. Commands | |
1121 | 183 (starting with) ".", "&", CTRL-^, "Z", CTRL-], CTRL-T, CTRL-R, CTRL-I |
7 | 184 and CTRL-O cause a beep and Visual mode continues. |
185 | |
186 When switching to another window on the same buffer, the cursor position in | |
187 that window is adjusted, so that the same Visual area is still selected. This | |
188 is especially useful to view the start of the Visual area in one window, and | |
189 the end in another. You can then use <RightMouse> (or <S-LeftMouse> when | |
42 | 190 'mousemodel' is "popup") to drag either end of the Visual area. |
7 | 191 |
192 ============================================================================== | |
193 4. Operating on the Visual area *visual-operators* | |
194 | |
195 The operators that can be used are: | |
196 ~ switch case |v_~| | |
197 d delete |v_d| | |
198 c change (4) |v_c| | |
199 y yank |v_y| | |
200 > shift right (4) |v_>| | |
201 < shift left (4) |v_<| | |
202 ! filter through external command (1) |v_!| | |
203 = filter through 'equalprg' option command (1) |v_=| | |
204 gq format lines to 'textwidth' length (1) |v_gq| | |
205 | |
206 The objects that can be used are: | |
207 aw a word (with white space) |v_aw| | |
208 iw inner word |v_iw| | |
209 aW a WORD (with white space) |v_aW| | |
210 iW inner WORD |v_iW| | |
211 as a sentence (with white space) |v_as| | |
212 is inner sentence |v_is| | |
213 ap a paragraph (with white space) |v_ap| | |
214 ip inner paragraph |v_ip| | |
215 ab a () block (with parenthesis) |v_ab| | |
216 ib inner () block |v_ib| | |
217 aB a {} block (with braces) |v_aB| | |
218 iB inner {} block |v_iB| | |
2098
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2033
diff
changeset
|
219 at a <tag> </tag> block (with tags) |v_at| |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2033
diff
changeset
|
220 it inner <tag> </tag> block |v_it| |
7 | 221 a< a <> block (with <>) |v_a<| |
222 i< inner <> block |v_i<| | |
223 a[ a [] block (with []) |v_a[| | |
224 i[ inner [] block |v_i[| | |
2098
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2033
diff
changeset
|
225 a" a double quoted string (with quotes) |v_aquote| |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2033
diff
changeset
|
226 i" inner double quoted string |v_iquote| |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2033
diff
changeset
|
227 a' a single quoted string (with quotes) |v_a'| |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2033
diff
changeset
|
228 i' inner simple quoted string |v_i'| |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2033
diff
changeset
|
229 a` a string in backticks (with backticks) |v_a`| |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2033
diff
changeset
|
230 i` inner string in backticks |v_i`| |
7 | 231 |
232 Additionally the following commands can be used: | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
233 : start Ex command for highlighted lines (1) |v_:| |
7 | 234 r change (4) |v_r| |
235 s change |v_s| | |
236 C change (2)(4) |v_C| | |
237 S change (2) |v_S| | |
238 R change (2) |v_R| | |
239 x delete |v_x| | |
240 D delete (3) |v_D| | |
241 X delete (2) |v_X| | |
242 Y yank (2) |v_Y| | |
243 p put |v_p| | |
244 J join (1) |v_J| | |
245 U make uppercase |v_U| | |
246 u make lowercase |v_u| | |
247 ^] find tag |v_CTRL-]| | |
248 I block insert |v_b_I| | |
249 A block append |v_b_A| | |
250 | |
251 (1): Always whole lines, see |:visual_example|. | |
252 (2): Whole lines when not using CTRL-V. | |
253 (3): Whole lines when not using CTRL-V, delete until the end of the line when | |
254 using CTRL-V. | |
255 (4): When using CTRL-V operates on the block only. | |
256 | |
257 Note that the ":vmap" command can be used to specifically map keys in Visual | |
258 mode. For example, if you would like the "/" command not to extend the Visual | |
259 area, but instead take the highlighted text and search for that: > | |
260 :vmap / y/<C-R>"<CR> | |
261 (In the <> notation |<>|, when typing it you should type it literally; you | |
262 need to remove the 'B' and '<' flags from 'cpoptions'.) | |
263 | |
264 If you want to give a register name using the """ command, do this just before | |
265 typing the operator character: "v{move-around}"xd". | |
266 | |
267 If you want to give a count to the command, do this just before typing the | |
268 operator character: "v{move-around}3>" (move lines 3 indents to the right). | |
269 | |
270 *{move-around}* | |
271 The {move-around} is any sequence of movement commands. Note the difference | |
272 with {motion}, which is only ONE movement command. | |
273 | |
638 | 274 Another way to operate on the Visual area is using the |/\%V| item in a |
275 pattern. For example, to replace all '(' in the Visual area with '#': > | |
276 | |
3682 | 277 :'<,'>s/\%V(/#/g |
278 | |
279 Note that the "'<,'>" will appear automatically when you press ":" in Visual | |
280 mode. | |
638 | 281 |
7 | 282 ============================================================================== |
283 5. Blockwise operators *blockwise-operators* | |
284 | |
285 {not available when compiled without the |+visualextra| feature} | |
286 | |
287 Reminder: Use 'virtualedit' to be able to select blocks that start or end | |
288 after the end of a line or halfway a tab. | |
289 | |
290 Visual-block Insert *v_b_I* | |
291 With a blockwise selection, I{string}<ESC> will insert {string} at the start | |
292 of block on every line of the block, provided that the line extends into the | |
293 block. Thus lines that are short will remain unmodified. TABs are split to | |
294 retain visual columns. | |
295 See |v_b_I_example|. | |
296 | |
297 Visual-block Append *v_b_A* | |
298 With a blockwise selection, A{string}<ESC> will append {string} to the end of | |
236 | 299 block on every line of the block. There is some differing behavior where the |
7 | 300 block RHS is not straight, due to different line lengths: |
301 | |
302 1. Block was created with <C-v>$ | |
303 In this case the string is appended to the end of each line. | |
304 2. Block was created with <C-v>{move-around} | |
305 In this case the string is appended to the end of the block on each line, | |
306 and whitespace is inserted to pad to the end-of-block column. | |
307 See |v_b_A_example|. | |
308 Note: "I" and "A" behave differently for lines that don't extend into the | |
309 selected block. This was done intentionally, so that you can do it the way | |
310 you want. | |
311 | |
312 Visual-block change *v_b_c* | |
313 All selected text in the block will be replaced by the same text string. When | |
314 using "c" the selected text is deleted and Insert mode started. You can then | |
315 enter text (without a line break). When you hit <Esc>, the same string is | |
316 inserted in all previously selected lines. | |
317 | |
318 Visual-block Change *v_b_C* | |
319 Like using "c", but the selection is extended until the end of the line for | |
320 all lines. | |
321 | |
322 *v_b_<* | |
323 Visual-block Shift *v_b_>* | |
236 | 324 The block is shifted by 'shiftwidth'. The RHS of the block is irrelevant. The |
7 | 325 LHS of the block determines the point from which to apply a right shift, and |
236 | 326 padding includes TABs optimally according to 'ts' and 'et'. The LHS of the |
7 | 327 block determines the point upto which to shift left. |
328 See |v_b_>_example|. | |
329 See |v_b_<_example|. | |
330 | |
331 Visual-block Replace *v_b_r* | |
332 Every screen char in the highlighted region is replaced with the same char, ie | |
333 TABs are split and the virtual whitespace is replaced, maintaining screen | |
334 layout. | |
335 See |v_b_r_example|. | |
336 | |
337 | |
338 ============================================================================== | |
339 6. Repeating *visual-repeat* | |
340 | |
341 When repeating a Visual mode operator, the operator will be applied to the | |
342 same amount of text as the last time: | |
343 - Linewise Visual mode: The same number of lines. | |
344 - Blockwise Visual mode: The same number of lines and columns. | |
345 - Normal Visual mode within one line: The same number of characters. | |
346 - Normal Visual mode with several lines: The same number of lines, in the | |
347 last line the same number of characters as in the last line the last time. | |
348 The start of the text is the Cursor position. If the "$" command was used as | |
349 one of the last commands to extend the highlighted text, the repeating will | |
350 be applied up to the rightmost column of the longest line. | |
351 | |
352 | |
353 ============================================================================== | |
354 7. Examples *visual-examples* | |
355 | |
356 *:visual_example* | |
357 Currently the ":" command works on whole lines only. When you select part of | |
358 a line, doing something like ":!date" will replace the whole line. If you | |
359 want only part of the line to be replaced you will have to make a mapping for | |
360 it. In a future release ":" may work on partial lines. | |
361 | |
362 Here is an example, to replace the selected text with the output of "date": > | |
363 :vmap _a <Esc>`>a<CR><Esc>`<i<CR><Esc>!!date<CR>kJJ | |
364 | |
365 (In the <> notation |<>|, when typing it you should type it literally; you | |
366 need to remove the 'B' and '<' flags from 'cpoptions') | |
367 | |
368 What this does is: | |
369 <Esc> stop Visual mode | |
370 `> go to the end of the Visual area | |
371 a<CR><Esc> break the line after the Visual area | |
372 `< jump to the start of the Visual area | |
373 i<CR><Esc> break the line before the Visual area | |
374 !!date<CR> filter the Visual text through date | |
375 kJJ Join the lines back together | |
376 | |
377 *visual-search* | |
378 Here is an idea for a mapping that makes it possible to do a search for the | |
379 selected text: > | |
380 :vmap X y/<C-R>"<CR> | |
381 | |
382 (In the <> notation |<>|, when typing it you should type it literally; you | |
383 need to remove the 'B' and '<' flags from 'cpoptions') | |
384 | |
385 Note that special characters (like '.' and '*') will cause problems. | |
386 | |
387 Visual-block Examples *blockwise-examples* | |
388 With the following text, I will indicate the commands to produce the block and | |
236 | 389 the results below. In all cases, the cursor begins on the 'a' in the first |
42 | 390 line of the test text. |
7 | 391 The following modeline settings are assumed ":ts=8:sw=4:". |
392 | |
393 It will be helpful to | |
394 :set hls | |
395 /<TAB> | |
236 | 396 where <TAB> is a real TAB. This helps visualise the operations. |
7 | 397 |
398 The test text is: | |
399 | |
400 abcdefghijklmnopqrstuvwxyz | |
401 abc defghijklmnopqrstuvwxyz | |
402 abcdef ghi jklmnopqrstuvwxyz | |
403 abcdefghijklmnopqrstuvwxyz | |
404 | |
405 1. fo<C-v>3jISTRING<ESC> *v_b_I_example* | |
406 | |
407 abcdefghijklmnSTRINGopqrstuvwxyz | |
408 abc STRING defghijklmnopqrstuvwxyz | |
409 abcdef ghi STRING jklmnopqrstuvwxyz | |
410 abcdefghijklmnSTRINGopqrstuvwxyz | |
411 | |
412 2. fo<C-v>3j$ASTRING<ESC> *v_b_A_example* | |
413 | |
414 abcdefghijklmnopqrstuvwxyzSTRING | |
415 abc defghijklmnopqrstuvwxyzSTRING | |
416 abcdef ghi jklmnopqrstuvwxyzSTRING | |
417 abcdefghijklmnopqrstuvwxyzSTRING | |
418 | |
419 3. fo<C-v>3j3l<.. *v_b_<_example* | |
420 | |
421 abcdefghijklmnopqrstuvwxyz | |
422 abc defghijklmnopqrstuvwxyz | |
423 abcdef ghi jklmnopqrstuvwxyz | |
424 abcdefghijklmnopqrstuvwxyz | |
425 | |
426 4. fo<C-v>3j>.. *v_b_>_example* | |
427 | |
428 abcdefghijklmn opqrstuvwxyz | |
429 abc defghijklmnopqrstuvwxyz | |
430 abcdef ghi jklmnopqrstuvwxyz | |
431 abcdefghijklmn opqrstuvwxyz | |
432 | |
433 5. fo<C-v>5l3jrX *v_b_r_example* | |
434 | |
435 abcdefghijklmnXXXXXXuvwxyz | |
436 abc XXXXXXhijklmnopqrstuvwxyz | |
437 abcdef ghi XXXXXX jklmnopqrstuvwxyz | |
438 abcdefghijklmnXXXXXXuvwxyz | |
439 | |
440 ============================================================================== | |
441 8. Select mode *Select* *Select-mode* | |
442 | |
443 Select mode looks like Visual mode, but the commands accepted are quite | |
444 different. This resembles the selection mode in Microsoft Windows. | |
445 When the 'showmode' option is set, "-- SELECT --" is shown in the last line. | |
446 | |
447 Entering Select mode: | |
448 - Using the mouse to select an area, and 'selectmode' contains "mouse". | |
449 'mouse' must also contain a flag for the current mode. | |
450 - Using a non-printable movement command, with the Shift key pressed, and | |
451 'selectmode' contains "key". For example: <S-Left> and <S-End>. 'keymodel' | |
452 must also contain "startsel". | |
453 - Using "v", "V" or CTRL-V command, and 'selectmode' contains "cmd". | |
454 - Using "gh", "gH" or "g_CTRL-H" command in Normal mode. | |
455 - From Visual mode, press CTRL-G. *v_CTRL-G* | |
456 | |
457 Commands in Select mode: | |
458 - Printable characters, <NL> and <CR> cause the selection to be deleted, and | |
459 Vim enters Insert mode. The typed character is inserted. | |
460 - Non-printable movement commands, with the Shift key pressed, extend the | |
461 selection. 'keymodel' must include "startsel". | |
462 - Non-printable movement commands, with the Shift key NOT pressed, stop Select | |
463 mode. 'keymodel' must include "stopsel". | |
464 - ESC stops Select mode. | |
465 - CTRL-O switches to Visual mode for the duration of one command. *v_CTRL-O* | |
466 - CTRL-G switches to Visual mode. | |
467 | |
468 Otherwise, typed characters are handled as in Visual mode. | |
469 | |
470 When using an operator in Select mode, and the selection is linewise, the | |
471 selected lines are operated upon, but like in characterwise selection. For | |
472 example, when a whole line is deleted, it can later be pasted halfway a line. | |
473 | |
474 | |
475 Mappings and menus in Select mode. *Select-mode-mapping* | |
476 | |
788 | 477 When mappings and menus are defined with the |:vmap| or |:vmenu| command they |
478 work both in Visual mode and in Select mode. When these are used in Select | |
479 mode Vim automatically switches to Visual mode, so that the same behavior as | |
480 in Visual mode is effective. If you don't want this use |:xmap| or |:smap|. | |
7 | 481 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
482 Users will expect printable characters to replace the selected area. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
483 Therefore avoid mapping printable characters in Select mode. Or use |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
484 |:sunmap| after |:map| and |:vmap| to remove it for Select mode. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
485 |
7 | 486 After the mapping or menu finishes, the selection is enabled again and Select |
487 mode entered, unless the selected area was deleted, another buffer became | |
488 the current one or the window layout was changed. | |
489 | |
490 When a character was typed that causes the selection to be deleted and Insert | |
491 mode started, Insert mode mappings are applied to this character. This may | |
492 cause some confusion, because it means Insert mode mappings apply to a | |
493 character typed in Select mode. Language mappings apply as well. | |
494 | |
495 *gV* *v_gV* | |
496 gV Avoid the automatic reselection of the Visual area | |
497 after a Select mode mapping or menu has finished. | |
498 Put this just before the end of the mapping or menu. | |
499 At least it should be after any operations on the | |
500 selection. | |
501 | |
502 *gh* | |
503 gh Start Select mode, characterwise. This is like "v", | |
504 but starts Select mode instead of Visual mode. | |
505 Mnemonic: "get highlighted". | |
506 | |
507 *gH* | |
508 gH Start Select mode, linewise. This is like "V", | |
509 but starts Select mode instead of Visual mode. | |
510 Mnemonic: "get Highlighted". | |
511 | |
512 *g_CTRL-H* | |
513 g CTRL-H Start Select mode, blockwise. This is like CTRL-V, | |
514 but starts Select mode instead of Visual mode. | |
515 Mnemonic: "get Highlighted". | |
516 | |
517 vim:tw=78:ts=8:ft=help:norl: |