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

Add environment check

This commit is contained in:
wsdjeg 2017-03-17 16:56:35 +08:00
parent 1cc77cffa9
commit 9b39a27eda
2 changed files with 22 additions and 0 deletions

View File

@ -7,6 +7,18 @@ let s:system['isLinux'] = has('unix') && !has('macunix') && !has('win32unix')
let s:system['isOSX'] = has('macunix')
function! s:name() abort
if s:system.isLinux
return 'Linux'
elseif s:system.isWindows
return 'Windows'
else
return 'OSX'
endif
endfunction
let s:system['name'] = function('s:name')
function! s:isDarwin() abort
if exists('s:is_darwin')
return s:is_darwin

View File

@ -0,0 +1,10 @@
function! SpaceVim#health#environment#check() abort
let result = ['SpaceVim environment check report:']
call add(result, 'Current progpath: ' . v:progname . '(' . v:progpath . ')')
call add(result, 'version: ' . v:version)
call add(result, 'OS: ' . SpaceVim#api#import('system').name())
call add(result, '[shell, shellcmdflag, shellslash]: ' . string([&shell, &shellcmdflag, &shellslash]))
return result
endfunction
" vim:set et sw=2: