On Thu, Nov 09, 2006 at 08:14:41PM +0100, Bram Moolenaar wrote:
>
> Benji Fisher wrote:
>
> > Maps and menus work in much the same way, and when writing a vim
> > script (especially an ftplugin) I like to make a menu item corresponding
> > to each key map that I define. Unfortunately, there are two ways that
> > maps and menus differ:
> >
> > 1. There is an :amenu command (and also :anoremenu), but there is no
> > :amap command (nor :anoremap).
> >
> > 2. I can make buffer-local maps with :map <buffer>, but :menu <buffer>
> > does not work.
> >
> > Both of these shortcomings can be overcome with scripting, but it
> > would be more convenient and more consistent if :amap and :menu <buffer>
> > were both implemented.
>
> Both are in the todo list.
I neglected to check. Maybe I need to update my todo list: I see
a remark about buffer-local menus, but nothing about :amap.
> ":amap" would not be terrible difficult to implement.
>
> buffer-local menus are complicated. What about menus that are not for
> the current buffer, hide them? Would make jumping between buffers very
> slow.
I will try deleting and refreshing them with autocommands and see
how slow it is. Off hand, I would say hide them: I do not want to
waste menu space on TeX-related items when I am editing another file
type.
--Benji Fisher