-
Notifications
You must be signed in to change notification settings - Fork 2
Description
In the plugin that I'm using with Venu, vim native menus are modified upon entering and leaving a buffer (on BufEnter and BufLeave). Currently, vim doesn't provide any proper ways to detect changes on menu. Moreover, when I use vemu#native#import in my .vimrc, printed menu does not include these entries since BufEnter is not called yet. I source my .vimrc again after I go to that buffer to include those menu entries, but that's certainly not a good workaround.
Can we add a custom event e.g. User VenuPrint whose attached handlers called just before :VenuPrint command? In this way I can attach a handle to this event to empty all Venu entries and reimport them just before :VenuPrint so that it will print up-to-date menu.
On a side note, this also requires something like venu#unregisterAll() or venu#clear(). #4 has a todo item for unregistering a menu, but it would really make things much simpler if there would be 'remove all menus' function. I believe it is also much easier to implement compared to unregistering a certain menu.
Thanks!