Closed tjdevries closed 7 years ago
this is mostly so that I can pass an argument (like a dictionary) into the function. A better example might be:
for setting in keys(config_dict)
" Give the option of a setting for each item:
call quickmenu#append(
\ printf('Set: %s.%s', area, setting),
\ { -> config#set_setting(config_dict, setting, input('New value: ')},
\ )
endfor
good point, new version released
Works great for me. I'm using it in my plugin here: www.github.com/tjdevries/conf.vim
It makes great menus now. Autogenerated cause of your wonderful plugin.
Having the ability to add descriptions is great for helping people to figure out what the options are. Thanks!
The code changes became very easy with your change.
call quickmenu#append(
\ printf('Set: %s.%s', area, setting),
\ funcref('conf#set_setting_prompt', [
\ a:script,
\ area,
\ setting,
\ ]),
\ conf#setting#get_description(a:script, area, setting)
\ )
Hi, awesome plugin :smile:
I'm wondering if it would be possible to use a function reference or lambda for
quickmenu#append()
.For example:
Thanks