With the folowing lines:
call submode#enter_with('test', 'n', '', '<leader><UP>', '<C-w>-') call submode#map('test', 'n', '', '<UP>', '<C-w>-')
LeaderUp let me enter in the submode
test without any issue but in this submode when I hit Up I leave the submode and insert a
A character in my buffer.
If I replace the second line with:
call submode#map('test', 'n', '', 'a', '<C-w>-')
Everything works properly i.e. hitting a execute the submode command.
The issue comes from the terminal which doesn't interpret correctly the arrow key because the commands works perfectly fine on a gVim on the same system.
My problem is that I don't understand why this happens because:
The arrow key is correctly interpreted in the
enter_withmapping. Even if I replace the first line with
call submode#enter_with('test', 'n', '', '<UP>', '<C-w>-')hitting Up will trigger the submode
I can create a mapping like
nnoremap <Up> :echo "FOO"<CR>which will work properly.
I've tried to replace
'<UP>' with the code of the arrow using Ctrl+r Ctrl+r Up to insert it which gave me
OA but that still doesn't work.
My setup is:
- Debian Wheezy
- rxvt Unicode
- vim 7.4
What can I do to solve my problem?