On 16/11/09 13:59, Simson Liu wrote:
> Hi all,
> I need map <A-Esc>, but the following command:
> map <A-Esc> :echo "abc"<CR>
> do nothing for me.
> Is it possible to map <A-Esc>?
> Thanks in advance,
> Liu

It is not guaranteed, and it may depend on your OS: on my present Gnome 
desktop, the Alt-Esc key combo is not passed to gvim.

To see if it is on your system, start Vim with an empty [No Name] 
buffer, start Insert mode, hit Ctrl-V (or Ctrl-Q if you use Ctrl-V to 
paste) then the problematic key combo (here Alt-Esc). If Vim displays 
something, then you know it saw your key combo. If it still waits with 
^V at bottom right (assuming 'showcmd' is on), then it didn't get the 
key and you can't map it.

Results can be different in gvim and in each specific console terminal, 
so if you use, let's say, gvim with GTK2 GUI as well as konsole, 
gnome-terminal, xterm, mlterm and the Linux text console, that's six 
different environments, which you should test separately.

F1 is near Esc but some window managers will intercept Alt-F1 and not 
pass it to the program either; OTOH F1 alone means Help. Try Shift-F1 if 
you haven't yet remapped it, that combo ought to be "portably mappable". 
Or maybe there is a key you don't use left of the digit-1 key, in which 
case you can try mapping that.


Best regards,
Tony.
-- 
Hartley's First Law:
        You can lead a horse to water, but if you can get him to float
on his back, you've got something.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to