Mapping <C-left> and <S-left> to Vim

I'm trying to get Vim to behave a bit more like ACE, to no avail.

In particular, I am trying to get Vim to accept CTRL + LEFTin mode insertas display for ESC, v, Band SHIFT + LEFTin visualmode as display for B , for example:

" in my ~/.vimrc:
inoremap <C-LEFT> <ESC> v B
vnoremap <S-LEFT> B

But these bindings seem to fail. To be clear, I get an error

E388: Couldn't find definition

when i try to display CTRL + LEFT:

C-LEFT error

What am I doing wrong?

+4
source share
1 answer

You need to strip the spaces between the individual keys; a space only separates the left side from the right side:

:inoremap <C-LEFT> <ESC>vB

<Space>in normal mode, it is a command that moves the cursor to the right; which interferes with the display.

, / :

:verbose imap <C-LEFT>
:verbose vmap <S-LEFT>

, - (, Shift Ctrl) ; GVIM.

+2

All Articles