On Wednesday, August 22, 2012 2:50:35 PM UTC-5, [email protected] wrote: > 2012/8/22 Chris Jones <[email protected]> > > > On Wed, Aug 22, 2012 at 10:28:47AM EDT, Pablo Giménez wrote: > > > > > I am using Vim with terminals Mrxvt in Linux and iTerm2 in the Mac. > > > I have the same problem in Gvim as well. > > > > [..] > > > > Don't have access to either.. > > > > What happens if you use <Esc> instead of <M- or <A- > > > > i.e. > > > > map <Esc>a :echo 'You hit Alt+A'<CR> > > Wow this seems to work! > Why <Esc> is working?
Some terminals send ALT+t to Vim as an <Esc> character ^[ followed by t. So mapping <Esc>t in these terminals will react to what the terminal sends for ALT+t, but will not be able to tell the difference between this an you actually pressing <Esc> followed by t. I think it's possible to correct the problem in your terminal config, but I don't know much about that. Try these two tips: http://vim.wikia.com/wiki/Fix_meta-keys_that_break_out_of_Insert_mode http://vim.wikia.com/wiki/Get_Alt_key_to_work_in_terminal And remember that <Esc>t probably won't work in gvim, although ALT+t works out-of-the-box. -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
