Re: amenu doesn't ignore mapping to get to cmd mode
- On Sat, Nov 03, 2001 at 02:07:35PM +0100, Bram Moolenaar wrote:
>In that case, Vimacs is dangerous, but that's no news :). (I
> Andre Pang wrote:
> > i'm not sure if you'd call this a bug (i do) :). the 'amenu'
> > command doesn't seem to ignore any mappings to get back to command
> > mode before executing the menu command.
> > e.g. try this:
> > " remap <C-o> to split line at cursor, ala Emacs
> > inoremap <C-o> <CR><Left>
> Hmm, mapping CTRL-O is dangerous, parts of Vim depend on it. It's no
> suprise this causes a few problems.
promise I'll upload it to vim.sf.net soon! Just tidying it up a
> ":amenu" just inserts a <C-O> automatically, otherwise it's just likeCool. In that case, it's probably a good idea to change all the
> ":imenu". Don't want to make it more complicated by making part of the
> menu not-remappable. Let's keep it simple, just use ":anoremenu".
references from amenu to anoremenu in vimfiles/menu.vim, because
all the menu options won't work if you do something silly like
remap <C-o> in Insert Mode :).
Since I've got four essays due tomorrow and I like the art of
procrastination, I've changed the menu.vim file so all the
occurances of "amenu" are now "menu", "am" is now "an", "ome" is
now "onoreme", etc etc. You can find it at
(not attached to this msg because it's ~60k.)
I have checked the menu-noremap.vim file under Win32 (although
it's been uploaded in unix fileformat), and it seems to work well,
so you might want to merge it in the next Vim release.
I did find another bug, though -- :promptfind (and presumably
:promptrepl) doesn't work from Insert Mode. They end up
scribbling "/text" in the buffer. I think promptfind should dive
into Normal Mode before executing /foo.
#ozone/algorithm <ozone@...> - trust.in.love.to.save