Skip to content

Instantly share code, notes, and snippets.

@t9md
Last active August 29, 2015 13:58
Show Gist options
  • Save t9md/10101542 to your computer and use it in GitHub Desktop.
Save t9md/10101542 to your computer and use it in GitHub Desktop.
" execute like
" :Unite menu:chef
" or mapp
" nnoremap <F1> :<C-U>Unite menu:chef<CR>
let g:unite_source_menu_menus = {}
let g:unite_source_menu_menus.chef = {}
let g:unite_source_menu_menus.chef.candidates = [
\ "apt_package", "bash", "batch", "breakpoint", "chef_gem", "cookbook_file",
\ "cron", "csh", "deploy", "directory", "dpkg_package", "easy_install_package",
\ "env", "erlang_call", "execute", "file", "freebsd_package", "gem_package",
\ "git", "group", "http_request", "ifconfig", "ips_package", "link", "log",
\ "macports_package", "mdadm", "mount", "ohai", "package", "pacman_package",
\ "perl", "portage_package", "powershell_script", "python", "registry_key",
\ "remote_directory", "remote_file", "route", "rpm_package", "ruby",
\ "ruby_block", "scm", "script", "service", "smartos_package",
\ "solaris_package", "subversion", "template", "user", "yum_package"
\ ]
function! g:unite_source_menu_menus.chef.map(key, value)
let url_base = "http://docs.opscode.com/resource_"
return {
\ "word": a:value,
\ "kind": "uri",
\ "action__path": url_base . a:value . ".html",
\ }
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment