diff options
Diffstat (limited to 'runtime/doc/visual.txt')
-rw-r--r-- | runtime/doc/visual.txt | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/runtime/doc/visual.txt b/runtime/doc/visual.txt index 6810d50c11..252a1ca8b8 100644 --- a/runtime/doc/visual.txt +++ b/runtime/doc/visual.txt @@ -1,4 +1,4 @@ -*visual.txt* For Vim version 7.4. Last change: 2014 Mar 23 +*visual.txt* Nvim VIM REFERENCE MANUAL by Bram Moolenaar @@ -11,14 +11,7 @@ operator. It is the only way to select a block of text. This is introduced in section |04.4| of the user manual. -1. Using Visual mode |visual-use| -2. Starting and stopping Visual mode |visual-start| -3. Changing the Visual area |visual-change| -4. Operating on the Visual area |visual-operators| -5. Blockwise operators |blockwise-operators| -6. Repeating |visual-repeat| -7. Examples |visual-examples| -8. Select mode |Select-mode| + Type |gO| to see the table of contents. ============================================================================== 1. Using Visual mode *visual-use* @@ -32,8 +25,7 @@ Using Visual mode consists of three parts: 3. Type an operator command. The highlighted characters will be operated upon. -The 'highlight' option can be used to set the display mode to use for -highlighting in Visual mode. +The |hl-Visual| group determines the highlighting of the visual selection. The 'virtualedit' option can be used to allow positioning the cursor to positions where there is no actual character. @@ -78,10 +70,7 @@ position. selected. *CTRL-V* *blockwise-visual* -[count]CTRL-V Start Visual mode blockwise. Note: Under Windows - CTRL-V could be mapped to paste text, it doesn't work - to start Visual mode then, see |CTRL-V-alternative|. - [count] is used as with `v` above. +[count]CTRL-V Start Visual mode blockwise. If you use <Esc>, click the left mouse button or use any command that does a jump to another buffer while in Visual mode, the highlighting stops @@ -278,7 +267,7 @@ mode. For example, if you would like the "/" command not to extend the Visual area, but instead take the highlighted text and search for that: > :vmap / y/<C-R>"<CR> (In the <> notation |<>|, when typing it you should type it literally; you -need to remove the 'B' and '<' flags from 'cpoptions'.) +need to remove the 'B' flag from 'cpoptions'.) If you want to give a register name using the """ command, do this just before typing the operator character: "v{move-around}"xd". @@ -310,8 +299,8 @@ Visual-block Insert *v_b_I* With a blockwise selection, I{string}<ESC> will insert {string} at the start of block on every line of the block, provided that the line extends into the block. Thus lines that are short will remain unmodified. TABs are split to -retain visual columns. -See |v_b_I_example|. +retain visual columns. Works only for adding text to a line, not for +deletions. See |v_b_I_example|. Visual-block Append *v_b_A* With a blockwise selection, A{string}<ESC> will append {string} to the end of @@ -327,6 +316,7 @@ See |v_b_A_example|. Note: "I" and "A" behave differently for lines that don't extend into the selected block. This was done intentionally, so that you can do it the way you want. +Works only for adding text to a line, not for deletions. Visual-block change *v_b_c* All selected text in the block will be replaced by the same text string. When @@ -382,7 +372,7 @@ Here is an example, to replace the selected text with the output of "date": > :vmap _a <Esc>`>a<CR><Esc>`<i<CR><Esc>!!date<CR>kJJ (In the <> notation |<>|, when typing it you should type it literally; you -need to remove the 'B' and '<' flags from 'cpoptions') +need to remove the 'B' flag from 'cpoptions') What this does is: <Esc> stop Visual mode @@ -399,7 +389,7 @@ selected text: > :vmap X y/<C-R>"<CR> (In the <> notation |<>|, when typing it you should type it literally; you -need to remove the 'B' and '<' flags from 'cpoptions') +need to remove the 'B' flag from 'cpoptions') Note that special characters (like '.' and '*') will cause problems. @@ -534,4 +524,4 @@ g CTRL-H Start Select mode, blockwise. This is like CTRL-V, but starts Select mode instead of Visual mode. Mnemonic: "get Highlighted". - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: |