neosnippet.vim/autoload/vital.vim
Shougo Matsushita c07fdec557 - Vitalized.
2012-09-30 17:06:28 +09:00

13 lines
391 B
VimL

function! vital#of(name)
let files = globpath(&runtimepath, 'autoload/vital/' . a:name . '.vital')
let file = split(files, "\n")
if empty(file)
throw 'vital: version file not found: ' . a:name
endif
let ver = readfile(file[0], 'b')
if empty(ver)
throw 'vital: invalid version file: ' . a:name
endif
return vital#_{substitute(ver[0], '\W', '', 'g')}#new()
endfunction