Loading ...
Sorry, an error occurred while loading the content.

Re: amenu doesn't ignore mapping to get to cmd mode

Expand Messages
  • Andre Pang
    ... In that case, Vimacs is dangerous, but that s no news :). (I promise I ll upload it to vim.sf.net soon! Just tidying it up a bit more). ... Cool. In
    Message 1 of 3 , Nov 3, 2001
    • 0 Attachment
      On Sat, Nov 03, 2001 at 02:07:35PM +0100, Bram Moolenaar wrote:

      >
      > 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.

      In that case, Vimacs is dangerous, but that's no news :). (I
      promise I'll upload it to vim.sf.net soon! Just tidying it up a
      bit more).

      > ":amenu" just inserts a <C-O> automatically, otherwise it's just like
      > ":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".

      Cool. In that case, it's probably a good idea to change all the
      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

      http://www.algorithm.com.au/hacking/vim/menu-noremap.vim

      (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
    Your message has been successfully submitted and would be delivered to recipients shortly.