On Sat, Sep 30, 2006 at 08:35:04PM EDT, A.J.Mechelynck wrote:
> cga2000 wrote:
 
[..]

> What you highlighted includes the cursor 

Misuse of "v" was the issue and explains why Vim thus behaves.

Since "v" is "per character" visual mode .. vjj does not make much sense
in the first place ..  using the wrong tool .. Either you do a Vjj .. or
vjllll etc. (or vj$ not very logical but at least is consistent).

Now that you have told me what to look for, I can see that cursor .. and
everything falls into place.
        
> (move the cursor to the other end 
> with o -- and with selection=inclusive -- to check it). The Unix default is 
> to delete the whole Visual area, including the cursor character. This, 
> IIUC, predates Vim. The Windows default is different: on Windows, in 
> non-Vim programs, the bar cursor is between characters, not on a character, 

.. sounds fishy .. in a cell terminal how could a character be between
characters.. except by being invisible?

:-)

> and the highlighted area (when using shift-right or shift-down, i.e.,
> forward motions) stops left of the cursor. The purpose of the
> confusing "exclusive" behaviour on Windows is to cater to the peculiar
> customs of Windows users. Notice that gvim has a block cursor in
> Visual mode when 'selection' is "inclusive", and a thick bar cursor
> when it is "exclusive".

> Note: to highlight and delete full lines, use linewise visual mode
> (with V not v). Linewise-visual always includes (and highlights) the
> cursor line.

Which is what I did without understanding why .. just worked.

Makes a lot of difference to know why, though .. Since this is general
to all movement/selections it explains a number of other behaviors that
have baffled me in the past. 

As always, thanks for your enlightening comments.

cga

Reply via email to