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

Escape space in rtp (#4423)

This commit is contained in:
Wang Shidong 2021-08-24 00:25:30 +08:00 committed by GitHub
parent 6b633d9d7f
commit d7ccf9370c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,9 +11,10 @@ if has('vim_starting')
" set default encoding to utf-8
" Let Vim use utf-8 internally, because many scripts require this
exe 'set encoding=utf-8'
set encoding=utf-8
scriptencoding utf-8
if &compatible
" compatible mode is not supported in SpaceVim
set nocompatible
endif
" python host
@ -49,9 +50,9 @@ else
return resolve(a:path)
endfunction
endif
let g:_spacevim_root_dir = fnamemodify(s:resolve(fnamemodify(expand('<sfile>'),
let g:_spacevim_root_dir = escape(fnamemodify(s:resolve(fnamemodify(expand('<sfile>'),
\ ':p:h:gs?\\?'.((has('win16') || has('win32')
\ || has('win64'))?'\':'/') . '?')), ':p:gs?[\\/]?/?')
\ || has('win64'))?'\':'/') . '?')), ':p:gs?[\\/]?/?'), ' ')
lockvar g:_spacevim_root_dir
if has('nvim')
let s:qtdir = split(&rtp, ',')[-1]