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:
parent
9dc5f917c9
commit
4b62f0511b
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user