{"action":"closed","issue":{"url":"https://api.github.com/repos/Shougo/unite.vim/issues/179","labels_url":"https://api.github.com/repos/Shougo/unite.vim/issues/179/labels{/name}","comments_url":"https://api.github.com/repos/Shougo/unite.vim/issues/179/comments","events_url":"https://api.github.com/repos/Shougo/unite.vim/issues/179/events","html_url":"https://github.com/Shougo/unite.vim/issues/179","id":12951146,"number":179,"title":"unite-menu: use function object as well as string","user":{"login":"ujihisa","id":11504,"avatar_url":"https://avatars.githubusercontent.com/u/11504?v=3","gravatar_id":"","url":"https://api.github.com/users/ujihisa","html_url":"https://github.com/ujihisa","followers_url":"https://api.github.com/users/ujihisa/followers","following_url":"https://api.github.com/users/ujihisa/following{/other_user}","gists_url":"https://api.github.com/users/ujihisa/gists{/gist_id}","starred_url":"https://api.github.com/users/ujihisa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ujihisa/subscriptions","organizations_url":"https://api.github.com/users/ujihisa/orgs","repos_url":"https://api.github.com/users/ujihisa/repos","events_url":"https://api.github.com/users/ujihisa/events{/privacy}","received_events_url":"https://api.github.com/users/ujihisa/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Shougo/unite.vim/labels/waffle:in%20progress","name":"waffle:in progress","color":"eac04b"}],"state":"closed","locked":false,"assignee":{"login":"ujihisa","id":11504,"avatar_url":"https://avatars.githubusercontent.com/u/11504?v=3","gravatar_id":"","url":"https://api.github.com/users/ujihisa","html_url":"https://github.com/ujihisa","followers_url":"https://api.github.com/users/ujihisa/followers","following_url":"https://api.github.com/users/ujihisa/following{/other_user}","gists_url":"https://api.github.com/users/ujihisa/gists{/gist_id}","starred_url":"https://api.github.com/users/ujihisa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ujihisa/subscriptions","organizations_url":"https://api.github.com/users/ujihisa/orgs","repos_url":"https://api.github.com/users/ujihisa/repos","events_url":"https://api.github.com/users/ujihisa/events{/privacy}","received_events_url":"https://api.github.com/users/ujihisa/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2013-04-09T00:30:32Z","updated_at":"2015-08-16T22:22:33Z","closed_at":"2015-08-16T22:22:33Z","body":"vimrcなどで`s:lots_of_examples()`が定義されているとして\r\n\r\n    let g:unite_source_menu_menus.example = {\r\n          \\   'description': 'this is very example',\r\n          \\   'command_candidates': [\r\n          \\     ['very-example', 'call <SID>lots_of_examples()']\r\n          \\   ]\r\n          \\ }\r\n\r\nのようにunite-menuの設定をした場合、残念ながらunite-menu側は記述元のSIDを参照できないため、当然ながら呼び出しに失敗します。\r\n\r\nunite-menuで実行するものとしてcommandだけでなく関数を対象にしたいというのは結構自然な要求だと思うので、関数もそのまま取り扱えるとうれしいです。イメージとしてはこんな感じ\r\n\r\n    let g:unite_source_menu_menus.example = {\r\n          \\   'description': 'this is very example',\r\n          \\   'command_candidates': [\r\n          \\     ['very-example', function('s:lots_of_examples')]\r\n          \\   ]\r\n          \\ }\r\n\r\nこの方針で問題なさそうなら、もしよければこちらでパッチ書いてみます。ちょっとこの方針自体がアレだというなら申し付けください。"}}