File: jobs.vim

package info (click to toggle)
vim-link-vim 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 524 kB
  • sloc: python: 66; makefile: 30
file content (15 lines) | stat: -rw-r--r-- 417 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function! linkvim#jobs#run(cmd, ...) abort
  " Run an external process.
  "
  " The optional argument is a dictionary of options. Each option is parsed in
  " the code below.
  "
  " Return: Nothing.
  let l:opts = a:0 > 0 ? a:1 : {}

  call linkvim#paths#pushd(get(l:opts, 'cwd', ''))
  call linkvim#jobs#{s:backend}#run(a:cmd)
  call linkvim#paths#popd()
endfunction

let s:backend = has('nvim') ? 'neovim' : 'vim'