You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
725 B
VimL
39 lines
725 B
VimL
" nomadproject.vim - basic vim/nomad integration
|
|
" Maintainer: HashiVim <https://github.com/hashivim>
|
|
|
|
if exists("g:loaded_nomadproject") || v:version < 700 || &cp || !executable('nomad')
|
|
finish
|
|
endif
|
|
let g:loaded_nomadproject = 1
|
|
|
|
function! s:commands(A, L, P)
|
|
return join([
|
|
\ "run",
|
|
\ "stop",
|
|
\ "status",
|
|
\ "alloc",
|
|
\ "job",
|
|
\ "node",
|
|
\ "agent",
|
|
\ "acl",
|
|
\ "agent-info",
|
|
\ "deployment",
|
|
\ "eval",
|
|
\ "namespace",
|
|
\ "operator",
|
|
\ "quota",
|
|
\ "sentinel",
|
|
\ "server",
|
|
\ "ui",
|
|
\ "version"
|
|
\ ], "\n")
|
|
endfunction
|
|
|
|
augroup nomadproject
|
|
autocmd!
|
|
autocmd VimEnter *
|
|
\ command! -nargs=+ -complete=custom,s:commands Nomad execute '!nomad '.<q-args>
|
|
augroup END
|
|
|
|
" vim:set et sw=2:
|