[prev in list] [next in list] [prev in thread] [next in thread]
List: vim
Subject: Re: Mappings
From: Russell Shaw <rjshaw () iprimus ! com ! au>
Date: 2003-11-29 14:42:56
[Download RAW message or body]
Antoine J. Mechelynck wrote:
> Russell Shaw <rjshaw@iprimus.com.au> wrote:
>
>>Hi,
>>In windows, i can do: <SHIFT>+<DOWN> (shift key and numeric keypad
>>"down" key simultaneously), and it gives the effect of pressing
>>v (visual), then pressing the "down" key to extend a selection.
>>How do i do that noremap mapping?
>
> This effeft is not the result of a mapping: when "startsel" is present in
> the 'keymodel' option, then pressing a shifted arrow key starts Select mode
> (which is a variant of Visual mode, but where an 'isprint' key will
> _replace_ the selection and start Insert mode). If 'keymodel' (q.v.) also
> includes "stopsel", you need to hold the Shift key down to extend the
> selection with arrow keys.
>
> I think (but haven't tested it) that you may reassign that action to any key
> with (let's say)
>
> :noremap <F5> <S-Left>
> :noremap <F6> <S-Down>
> :noremap <F7> <S-Up>
> :noremap <F8> <S-Right>
>
> (similarly <S-Home>, <S-End>, <S-PageUp>, <S-PageDown>)
>
> provided that 'keymodel' includes "startsel".
>
> Beware: using the ":behave" command alters 'keymodel':
>
> :behave mswin " side-effect: set keymodel=startsel,stopsel
>
> :behave xterm " side-effect: set keymodel=
>
> I prefer :set keymodel=startsel " YMMV
>
> HTH,
> Tony.
This is really great:
set keymodel=startsel,stopsel " enables shift-arrow keys for visual
vnoremap <C-Insert> y
vnoremap <S-Delete> d
vnoremap <S-Insert> P
inoremap <C-Insert> y
inoremap <S-Delete> d
inoremap <S-Insert> <C-O>P
However, after a year of learning vim, i feel guilty
about corrupting my brain with this stuff now.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic