sponsor Vim development Vim logo Vim Book Ad

quickmenu : A nice popup menu for vim

 script karma  Rating 185/64, Downloaded by 4453  Comments, bugs, improvements  Vim wiki

created by
Wei Lin
 
script type
utility
 
description
There are many keymaps defined in my `.vimrc`. Tired to check my `.vimrc` again and again when I forget some, so I made this `quickmenu` plugin which can be fully customized:

- Well formatted and carefully colored to ensure neat and handy.
- Press `<F12>` to popup `quickmenu` on the right, use `j` and `k` to move up and down.
- Press `<Enter>` or `1` to `9` to select an item.
- `Help` details will display in the cmdline when you are moving around the cursor.
- Items can be filtered by `filetype`, different items for different filetypes.
- Macros in `%{...}` form from `text` and `help` will be evaluated and expanded.
- No longer have to be afraid for forgetting keymaps.

Just see this GIF demonstration below:

http://skywind3000.github.io/word/images/menu/menu-2.gif

Trying to share my configuration to my friends, I found that they did't have patience to remember all the keymaps in my vimrc, but a quickmenu is quite accaptable for them. Vim is lack of ui components, that's ok for experienced user, but hard for the others, but a quickmenu is easier for them.

Homepage:
https://github.com/skywind3000/quickmenu.vim

Setup:

" clear all the items
call g:quickmenu#reset()

" section 1
call g:quickmenu#append('# Develop', '')

call g:quickmenu#append('item 1.1', 'echo "1.1 is selected"', 'select item 1.1')
call g:quickmenu#append('item 1.2', 'echo "1.2 is selected"', 'select item 1.2')
call g:quickmenu#append('item 1.3', 'echo "1.3 is selected"', 'select item 1.3')

" section 2

call g:quickmenu#append('# Misc', '')

call g:quickmenu#append('item 2.1', 'echo "2.1 is selected"', 'select item 2.1')
call g:quickmenu#append('item 2.2', 'echo "2.2 is selected"', 'select item 2.2')
call g:quickmenu#append('item 2.3', 'echo "2.3 is selected"', 'select item 2.3')
call g:quickmenu#append('item 2.4', 'echo "2.4 is selected"', 'select item 2.4')




 
install details
Extract the zip to your ~/.vim/ and edit your .vimrc:

" choose a favorite key to show/hide quickmenu
noremap <silent><F12> :call quickmenu#toggle(0)<cr>

" enable cursorline (L) and cmdline help (H)
let g:quickmenu_options = "LH"

 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
quickmenu-1.2.4.zip 1.2.4 2017-08-08 7.3 Wei Lin supports funcref now.
quickmenu-1.2.3.zip 1.2.3 2017-07-27 7.4 Wei Lin add `<nowait>` befor noremap to avoid delay when you press 'c'
quickmenu-1.2.2.zip 1.2.2 2017-07-17 7.3 Wei Lin remember cursor position when quickmenu reopen, clear help text in cmdline after closed.
quickmenu-1.2.1.zip 1.2.1 2017-07-16 7.3 Wei Lin use redraw to clear previous help text in the cmdline after quickmenu window closed
quickmenu-1.2.0.zip 1.2.0 2017-07-15 7.3 Wei Lin new feature `quickmenu#bottom` to popup on the bottom.
quickmenu-1.1.15.zip 1.1.15 2017-07-14 7.0 Wei Lin fixed: quickmenu will always popup on the right, no matter `splitright` is set or unset
quickmenu-1.1.14.zip 1.1.14 2017-07-14 7.0 Wei Lin fixed incompatible issue with vim 7.4.2201 and older version.
quickmenu-1.1.13.zip 1.1.13 2017-07-13 7.0 Wei Lin New option to set default left/right padding size, useful when running vim in a small window.
quickmenu-1.1.12.zip 1.1.12 2017-07-13 7.0 Wei Lin Full version include syntax files of 1.1.12
ip used for rating: 216.73.216.103

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github