From d7ccf9370c4730074ab2deb18e5b84c7f5cdf674 Mon Sep 17 00:00:00 2001 From: Wang Shidong Date: Tue, 24 Aug 2021 00:25:30 +0800 Subject: [PATCH] Escape space in rtp (#4423) --- main.vim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.vim b/main.vim index ba63c1274..d7dd81a05 100644 --- a/main.vim +++ b/main.vim @@ -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(''), +let g:_spacevim_root_dir = escape(fnamemodify(s:resolve(fnamemodify(expand(''), \ ':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]