On 09/02/10 10:02, Maxim Kim wrote:
Hi,

What is the vim way to define filetype(or buffer) specific menus?
I want a menu to be available only in buffers of my filetype.
For mappings I usually use<buffer>  but couldn't find it for :menu
command.

There is 'disable' exists though. But as far as I can see it needs
autocommands to set menus disabled/enabled depending on buffer. Is it
the only way?

Maxim.


I'm surprised that there was no answer to this post in almost two months.

Yes, in Vim the only way to detect that a buffer has been entered or left is by means of autocommands. Since you want to take some action (modify the menus, which in Vim are normally global) depending on which buffer is current, you would have to harness some autocommand events, probably BufEnter and BufLeave.


Best regards,
Tony.
--
If all the Chinese simultaneously jumped into the Pacific off a 10 foot
platform erected 10 feet off their coast, it would cause a tidal wave
that would destroy everything in this country west of Nebraska.

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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to