Created
April 29, 2016 13:22
-
-
Save mhartington/884250a84086cf4f45a5be87b030137c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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