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