Skip to content

Instantly share code, notes, and snippets.

@mhartington
Created April 29, 2016 13:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mhartington/884250a84086cf4f45a5be87b030137c to your computer and use it in GitHub Desktop.
Save mhartington/884250a84086cf4f45a5be87b030137c to your computer and use it in GitHub Desktop.
function! vim_typings#install(...)
let type_file_list = map(range(1, a:{0}), 'a:{v:val}')
let stdouts = systemlist('typings install '.join(type_file_list, ' ').' --save')
if len(stdouts)
if stdouts =~ 'typings ERR!'
let stdouts = systemlist('typings install '.join(type_file_list, ' ').' --ambient --save')
endif
echom join(stdouts, ', ')
endif
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment