mirror of
https://github.com/amix/vimrc
synced 2025-07-12 14:15:00 +08:00
add Previm and window management
This commit is contained in:
12
sources_non_forked/previm/autoload/vital.vim
Normal file
12
sources_non_forked/previm/autoload/vital.vim
Normal file
@ -0,0 +1,12 @@
|
||||
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
|
Reference in New Issue
Block a user