On 4/29/06, Benji Fisher <[EMAIL PROTECTED]> wrote:
On Sat, Apr 29, 2006 at 12:03:12AM -0600, Eric Arnold wrote:
> :set selection=exclusive
>
> Use this text:
>
> 123456
> 2abcde
> 3abcde
> 4abcde
> 5abcde
>
> Go to line 4, col 2. Hit ^V or (^Q whichever works). Type kkll
> until you've highlighted
> abc
> abc
> abc
>
> Type <ESC>
>
> For me, now the cursor is on "c", and `< and `> go to "a" and "c".
>
> Now start at line 2, col 2 and highlight the same 3x3 square, and type
> <ESC>.
>
> Now the cursor is on "d", and `< and `> go to "a" and "d".
>
> If it doesn't do this, try starting at the other corners. Sometimes I
> *think* I've had it work differently, but I can't remember exactly
> what the conditions were.
I tried your experiment. I notice that, when I start at the
upper-left corner, the cursor is on a "d" when three lines of "abc" are
selected. When I start at the lower-left corner, the cursor is on the
"c" when three lines of "abc" are selected. In other words, when I
start at the lower-left corner, I do not see a difference between
setting 'selection' to "inclusive" or "exclusive".
Yes, it seems that this is where the "exclusive" rule isn't being exclusive.
---------------------------------------------------
The `< mark seems to be set on the top line of the Visual
selection, and the `> mark at the bottom. The two of them are set at
the two corners where I started and ended the selection. This disagrees
with what you described when starting at the lower left. It is also
odd
I'm not sure I understand. For me, if I start at L4, C2, and drag the
selection rectangle to L2, C4, and hit <ESC>, then `> is at L4, C2 and
`< is at L2, C4.
Anyway, what I was stressing was whether it was on the "c" or "d" of
the ending line/corner, meaning column 4 vs column 5.
in the following situation: after
<C-V>hhh<Esc>
the point where I entered Visual mode is `> , but if I then do
gvjj<Esc>
then the same point is `< . I think this is inconsistent with the docs:
'< `< To the first character of the last selected Visual
area in the current buffer. {not in Vi}.
I read this as saying that `< should always refer to the upper-left
corner (and `> should always refer to the lower-right).
HTH --Benji Fisher
I dunno. I can't tell any difference between `<`> and '<'> for
visual block mode.