Eric Leenman wrote:
Hi,

I'm trying to learn new vim habbits by
- not sourcing mswin.vim
- not setting behave mswin.
to migrate easier to linux.

I also start using the old-dos way again by copying, cutting and pasting with ctrl-insert, shift-delete and shift-insert iso CTRL-C, CTRL-X, CTRL-V, as these CTRL-keys are not always handeled the same on a linux distro.

What I now miss is the SELECT-MODE.
Not sure if this is done in mswin.vim and behave mswin.
I used to select a part of a line by pressing shift and one of the arrow keys. It then showed SELECT-MODE, and what was selected you could easily cut and past or copy and paste.

But currently shift-left or right moves to the next or previous word
Shift-up and shift-down moves a file up or down one screen.
Unclear where these mappings are done, are these default vim mappings?

Anyway, how can I map shift-arrow keys as is used in SELECT-MODE?
Or any other suggestion for a smarter way is also very welcome.

Rgds,
Eric

"Standard" visual mode is entered by hitting v in Normal mode (with three variations: v for characterwise, V linewise, Ctrl-V blockwise). This is usually not Select mode in the sense that hitting a printable key will not replace the selection. For instance, hjkl (and some others) move the cursor about.

In "Select" mode, any printable key replaces the selection. Here are the possible ways to use Select mode: - by hitting Shift-arrow, if 'selectmode' contains "key" and 'keymodel' contains "startsel". (If it also contains "stopsel", an unshifted arrow cancels Select mode; if it doesn't, it extends it just like the same shifted key does.)
- by dragging the mouse, if 'selectmode' contains "mouse".
- by right-clicking, if 'selectmode' contains "mouse" and 'mousemodel' contains "extend" (I don't use this).
- by v V or Ctrl-V, if 'selectmode' contains "cmd" (not recommended).

'selectmode', 'keymodel' and 'mousemodel' (and also 'selection') are set implicitly by the ":behave" command. Personally (but YMMV) I use neither ":behave mswin" nor ":behave xterm" but the following compromise:

set selection=inclusive
set keymodel=startsel
set mousemodel=popup
set selectmode=mouse,key



Best regards,
Tony.
--
Paul's Law:
        In America, it's not how much an item costs, it's how much you
save.

Reply via email to