skywind3000 / quickmenu.vim

A nice customizable popup menu for vim
MIT License
278 stars 12 forks source link

is there possible to toggle more than one window? #8

Closed linkensphere201 closed 7 years ago

linkensphere201 commented 7 years ago

Hi, thanks for your wonderful and newbie-friendly vim plugin.

[the background]: I'm trying to use this plugin for making a "symbol list window"(just like source-insight) to show all symbols of the editing file. my conf

[the question]: now I'm wondering if there's possible to show more window(a window for symbol-in-current-file listing , another window for symbol-in-the-whole-project searching) thanks again!

skywind3000 commented 7 years ago

Absolutely, you can indicate the menu name by the first parameter of quickmenu#toggle and setup different menu by quickmenu#current,

call quickmenu#current('symbol-file')
call quickmenu#reset()
call quickmenu#append(...)
...
call quickmenu#current('symbol-project')
call quickmenu#reset()
call quickmenu#append(...)
...
noremap <silent><F11> :call quickmenu#toggle('symbol-file')<cr>
noremap <silent><F12> :call quickmenu#toggle('symbol-project')<cr>

And of course, you can re-generate menu content each time before invoking quickmenu#toggle

linkensphere201 commented 7 years ago

awesome!