Ben Fritz wrote:

> The latest version of visual.txt from changeset 9cb3a75a20b9 for
> runtime file modifications contains an inaccurate description of how
> v/V/CTRL-V work with a count.
> 
> As discussed in the thread where the original patch to add selecting
> [count] characters or lines with v or V was submitted (
> https://groups.google.com/d/topic/vim_dev/381bdn3wuuM/discussion ),
> [count]v already has defined behavior, and patch 529 did not change
> this behavior.
> 
> The new :help entry conflicts with the existing help just below :help
> <LeftRelease>:
> 
> If Visual mode is not active and the "v", "V" or CTRL-V is preceded with a
> count, the size of the previously highlighted area is used for a start.  You
> can then move the end of the highlighted area and give an operator.  The type
> of the old area is used (character, line or blockwise).
> - Linewise Visual mode: The number of lines is multiplied with the count.
> - Blockwise Visual mode: The number of lines and columns is multiplied with
>   the count.
> - Normal Visual mode within one line: The number of characters is multiplied
>   with the count.
> - Normal Visual mode with several lines: The number of lines is multiplied
>   with the count, in the last line the same number of characters is used as
>   in the last line in the previously highlighted area.
> The start of the text is the Cursor position.  If the "$" command was used as
> one of the last commands to extend the highlighted text, the area will be
> extended to the rightmost column of the longest line.
> 
> You could fix this with a modification to the help for [count]v and similar 
> for [count]V:
> 
> [count]v              Start Visual mode per character.
>                       With [count], if no previous visual selection has been
>                       acted on since Vim started, select that many
>                       characters like moving the cursor right [count]
>                       characters. One less when 'selection' is not
>                       "exclusive". With [count], if a previous visual
>                       selection has been acted on, select the same number of
>                       characters as the last acted-on visual selection,
>                       multiplied by [count], like moving the cursor right.
> 
> However, I think this behavior is confusing, and there is a very small
> window of time in an editing session during which the new behavior can
> actually be used. I think a new option, or a new 'cpo' flag, may be
> needed to switch between the behaviors entirely if both are desired.
> 
> I prefer the old behavior over the new. It is easy enough to v4l
> instead of just 4v, however I don't know of a good way to select a
> visual area of the same size as last time other than just using 1v.

I'll have to think about this.

-- 
hundred-and-one symptoms of being an internet addict:
27. You refer to your age as 3.x.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui