cga2000 wrote:
On Sat, Sep 30, 2006 at 06:03:28PM EDT, Dasn wrote:
[..]
How to make linux gvim behave like windows vim ("l" not cutted)?
Take a look at your 'selection', it should be 'exclusive' on your
windows platform.
For more info:
:h :behave
:h 'selection'
Could you explain further?
After reading the recommended help files I still don't see the logic of
Vim deleting more characters than what I highlighted in the first place
_and_ making this the default in *nix environments.
What am I missing and what is the purpose of this confusing behavior?
Thanks
cga
What you highlighted includes the cursor (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, 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.
Best regards,
Tony.