1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 05:30:05 +08:00

Add version api

This commit is contained in:
wsdjeg 2017-12-31 22:34:43 +08:00
parent 9dc5f917c9
commit 4b62f0511b

View File

@ -3,6 +3,7 @@ function! SpaceVim#api#vim#compatible#get() abort
\ 'execute' : '',
\ 'system' : '',
\ 'systemlist' : '',
\ 'version' : '',
\ 'globpath' : '',
\ },
\ "function('s:' . v:key)"
@ -86,4 +87,20 @@ else
endfunction
endif
if has('nvim')
function! s:version() abort
redir => l:msg
silent! execute ':version'
redir END
return matchstr(l:msg,'NVIM v\zs[^\n]*')
endfunction
else
function! s:version() abort
redir => l:msg
silent! execute ':version'
redir END
return matchstr(l:msg,'Included patches: v\zs[^\n]*')
endfunction
endif
" vim:set et sw=2 cc=80: