On 09/12/08 12:11, ludo wrote:
> Jürgen Krämer a écrit :
>> Hi,
>>
>> ludo wrote:
>>
>>> Maybe, the problem is around the SHIFT key
>>> When I try to use Fx key (F2, ... F12) with the additionnal SHIFT key
>>> for the :map function, it's failed
>>> :map<F4> :do_something
>>> :map<F...> :do_something
>>> :map<F12> :do_something
>>> all succeeded
>>>
>>> but when I try
>>> :map<S-F4> :do_something
>>> :map<S-F...> :do_something
>>> :map<S-F12> :do_something
>>> all failed :-(
>>>
>> which system are you on? And what do you see when you enter
>>
>> <C-V><F4>
>>
>> and
>>
>> <C-V><S-F4>
>>
>> while you are in insert mode?
>>
> when I hit 'Ctrl-V Shift-F4' => Vim displays ^[[26~
> when I hit 'Ctrl-V F4' => Vim displays ^[[14~
>
> I use Vim 7.2 for cygwin with XP
>
> I have tried on my Debian with Vim 7.1 and the result is similar (:map
> <S-F4> doesn't work)
> when I hit 'Ctrl-V Shift-F4' => Vim displays ^[[26~
> when I hit 'Ctrl-V F4' => Vim displays ^[[[D
Hm. What is 'term' set in each case. If it is set to different values
(let's assume "cygwin" and "xterm" for the sake of argument; but replace
them below if different), you should be able to cure the problem as follows:
if &term == 'cygwin'
set <S-F4>=^[[14~
elseif &term == 'xterm'
set <S-F4>=^[[[D
endif
where ^[ is obtained by hitting Ctrl-V followed by Esc.
Alternately, use gvim rather than Console Vim: there, your F keys ought
to be detected correctly.
Best regards,
Tony.
--
Fornication, n.:
Term used by people who don't have anybody to screw with.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---