diff --git a/autoload/SpaceVim/options.vim b/autoload/SpaceVim/options.vim index 3a6a2cf2e..a4ee626dd 100644 --- a/autoload/SpaceVim/options.vim +++ b/autoload/SpaceVim/options.vim @@ -1,11 +1,13 @@ function! SpaceVim#options#list() abort let list = [] - if has('patch-7.4.2010') + if has('patch-7.4.2010') && 0 for var in getcompletion('g:spacevim_','var') call add(list, var . ' = ' . string(get(g:, var[2:] , ''))) endfor else - call add(list, 'your vim is too old, getcompletion() need patch7-4-2010') + for var in filter(map(split(execute('let g:'), "\n"), "matchstr(v:val, '\\S\\+')"), "v:val =~# '^spacevim_'") + call add(list,'g:' . var . ' = ' . string(get(g:, var , ''))) + endfor endif return list endfunction