On 19/09/09 06:19, tekion wrote:
>
> All,
> I need help with map, i have the following:
> map<C-F9> :TlistToggle<cr> "control + f9
> map<S-F9> :TlistToggle<cr> "shift +f9
> map<A-F9> :TlistToggle<cr> "alt + f9
>
> All of the above are not working. However, the below sytax seems to
> work:
> map tt :TlistToggle<cr>
>
> Any idea as to how this. Thanks.
In addition to what others have said (e.g. about Ctrl+Fn and Alt+Fn not
being available on all platforms), the ":map" (and friends) command is
one of those which regard a "comment as part of their arguments.
Even if your system allows Vim to see those {lhs}es (which is not
everywhere the case), if you want to add a comment on the same line you
should wrap the mapping in an ":execute" statement, and then prefix the
"comment with a | bar, as follows:
exe 'map <C-F9> :TlistToggle<CR>' |" Control + F9
exe 'map <S-F9> :TlistToggle<CR>' |" Shift + F9
exe 'map <M-F9> :TlistToggle<CR>' |" Alt + F9
On the computer where I'm now, I can map Shift+Fn all right, but Ctrl+Fn
and Alt+Fn are eaten up (and acted upon) by the window manager before
they reach any application displaying via X11. Alt+Fn is also eaten up
(and gives a different action) in the text consoles. On Windows, IIRC, I
used to be able to map them all.
Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
150. You find yourself counting emoticons to get to sleep.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---