mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-09 14:00:06 +08:00
Add environment check
This commit is contained in:
parent
1cc77cffa9
commit
9b39a27eda
@ -7,6 +7,18 @@ let s:system['isLinux'] = has('unix') && !has('macunix') && !has('win32unix')
|
|||||||
|
|
||||||
let s:system['isOSX'] = has('macunix')
|
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
|
function! s:isDarwin() abort
|
||||||
if exists('s:is_darwin')
|
if exists('s:is_darwin')
|
||||||
return s:is_darwin
|
return s:is_darwin
|
||||||
|
10
autoload/SpaceVim/health/environment.vim
Normal file
10
autoload/SpaceVim/health/environment.vim
Normal 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:
|
Loading…
Reference in New Issue
Block a user