Hi,
Simson Liu wrote: > > I'm have trouble with the following command: > > noremap! <A-[> <Esc> > > In Insert mode, the mapping is OK. I can exit insert mode by Alt-[ > But in command-line mode, the mapping has some problems. Such as > > :ls<A-[> "note the <A-[> is Alt-[ key > > the 'ls' command is always been exectued! The normal action should be > discard any command when enter Esc in command-line. this is VI-compatible behavior. In VI pressing <Esc> on the command line executed the command. The only way to cancel a command was to press Ctrl-C. You should thus :nmap <A-[> <C-C> For more information :help c_<Esc> :help c_<CTRL-C> Regards, Jürgen -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us. (Calvin) --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---