1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 01:50:05 +08:00
This commit is contained in:
wsdjeg 2017-02-15 20:15:14 +08:00
parent 084ee3fcc8
commit 3d843a7076
4 changed files with 36 additions and 1 deletions

View File

@ -66,7 +66,7 @@ let g:spacevim_vim_plug_installed = 0
" >
" let g:spacevim_plugin_bundle_dir = '~/.cache/vimplugs'
" <
let g:spacevim_plugin_bundle_dir = $HOME. join(['', '.cache', 'vimfiles', ''], '/')
let g:spacevim_plugin_bundle_dir = $HOME. join(['', '.cache', 'vimfiles', ''], SpaceVim#api#import('file').separator)
""
" Disable/Enable realtime leader guide, by default it is 0.
" to enable this feature:

View File

@ -0,0 +1,8 @@
function! SpaceVim#api#import(name) abort
let p = {}
try
let p = SpaceVim#api#{a:name}#get()
catch /^Vim\%((\a\+)\)\=:E117/
endtry
return p
endfunction

View File

@ -0,0 +1,15 @@
let s:file = {}
let s:system = SpaceVim#api#import('system')
if s:system.isWindows
let s:file['separator'] = '\'
else
let s:file['separator'] = '/'
endif
function! SpaceVim#api#file#get() abort
return deepcopy(s:file)
endfunction

View File

@ -0,0 +1,12 @@
let s:system = {}
let s:system['isWindows'] = has('win16') || has('win32') || has('win64')
let s:system['isLinux'] = has('unix') && !has('macunix') && !has('win32unix')
let s:system['isOSX'] = has('macunix')
function! SpaceVim#api#system#get() abort
return deepcopy(s:system)
endfunction