1
<S-DOWN>

Moves the cursor back a few characters. But not always by the same amount.

<S-UP>

Moves the cursor to the end of the line.

<S-LEFT>

Deletes the next two lines.

<S-RIGHT>

Deletes the next two lines, adds empty line, enters insert mode at said empty line.

This happens in any mode, visual, insert and normal mode.

Looking at h:index, it says noting about this behavior. If I enter

unmap <S-LEFT>

or any other mentioned command, I am prompted with the "no mapping" message.

Any idea what is happening, and how to prevent it?

EDIT

I also tried adding

map ^[[1;2B <Nop>

where ^[[1;2B is the result of pressing Ctrl+v . But than, upon pressing I am prompted with

E486: Pattern not found:

Also note that after adding such mapping for all the combinations, the

<S-UP>
<S-LEFT>

work, meaning, they do nothing. But for

<S-DOWN>
<S-LEFT>

I am prompted with the message

E486: Pattern not found:

1 Answer 1

1

As I have found the solution in the mean time, I will post it here.

One should set for vim what the correct escape keys are. In my sitution, this means that I had to add

set <S-UP>=[1;2A
set <S-DOWN>=[1;2B
set <S-LEFT>=[1;2D
set <S-RIGHT>=[1;2C

into the .vimrc. The rhs is generated by pressing Ctrl+v+. Now the sequences behave as specified in the h:index.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.