diff --git a/autoload/SpaceVim/default.vim b/autoload/SpaceVim/default.vim index 981f522d6..f49d28008 100644 --- a/autoload/SpaceVim/default.vim +++ b/autoload/SpaceVim/default.vim @@ -21,14 +21,22 @@ function! SpaceVim#default#options() abort set guioptions-=b " Hide bottom scrollbar set showtabline=0 " Hide tabline set guioptions-=e " Hide tab - if s:SYSTEM.isWindows - " please install the font in 'Dotfiles\font' - set guifont=DejaVu_Sans_Mono_for_Powerline:h11:cANSI:qDRAFT - elseif s:SYSTEM.isOSX - set guifont=DejaVu\ Sans\ Mono\ for\ Powerline:h11 - else - set guifont=DejaVu\ Sans\ Mono\ for\ Powerline\ 11 - endif + try + if s:SYSTEM.isWindows + " please install the font in 'Dotfiles\font' + set guifont=DejaVu_Sans_Mono_for_Powerline:h11:cANSI:qDRAFT + elseif s:SYSTEM.isOSX + set guifont=DejaVu\ Sans\ Mono\ for\ Powerline:h11 + else + set guifont=DejaVu\ Sans\ Mono\ for\ Powerline\ 11 + endif + catch /^Vim\%((\a\+)\)\=:E518/ + if has('gui_vimr') + " VimR has disabled support for guifont + else + throw v:exception + endif + endtry endif " indent use backspace delete indent, eol use backspace delete line at diff --git a/config/general.vim b/config/general.vim index cd1f82a9b..5670ce64c 100644 --- a/config/general.vim +++ b/config/general.vim @@ -29,5 +29,9 @@ if g:spacevim_hiddenfileinfo == 1 && has('patch-7.4.1570') set shortmess+=F endif if has('gui_running') && !empty(g:spacevim_guifont) - let &guifont = g:spacevim_guifont + if has('gui_vimr') + " VimR has removed support for guifont + else + let &guifont = g:spacevim_guifont + endif endif