From 56516afc868f3e805c92ca7547bdb832e4e5a422 Mon Sep 17 00:00:00 2001
From: wsdjeg <wsdjeg@outlook.com>
Date: Sat, 31 Dec 2016 19:24:02 +0800
Subject: [PATCH] Use g:spacevim_* as options

issue opened here: https://github.com/google/vimdoc/issues/94
---
 README.md                  |  18 ++---
 autoload/SpaceVim.vim      | 142 ++++++++++++++++++-------------------
 autoload/zvim/plug.vim     |  70 +++++++++---------
 config/general.vim         |  14 ++--
 config/plugins.vim         |  34 ++++-----
 config/plugins/ctrlp.vim   |   4 +-
 config/plugins/neomake.vim |   8 +--
 doc/SpaceVim.txt           |   2 +-
 8 files changed, 146 insertions(+), 146 deletions(-)

diff --git a/README.md b/README.md
index 873f5643b..9471ee6b5 100644
--- a/README.md
+++ b/README.md
@@ -53,25 +53,25 @@ SpaceVim will load custom configuration from `~/.local.vim` and `.local.vim` in
 here is an example:
 ```viml
 " here are some basic customizations, please refer to the top of the vimrc file for all possible options
-let g:settings.default_indent = 3
-let g:settings.max_column     = 80
-let g:settings.colorscheme    = 'my_awesome_colorscheme'
-let g:settings.plugin_manager = 'dein'  " neobundle or dein or vim-plug
+let g:spacevim_default_indent = 3
+let g:spacevim_max_column     = 80
+let g:spacevim_colorscheme    = 'my_awesome_colorscheme'
+let g:spacevim_plugin_manager = 'dein'  " neobundle or dein or vim-plug
 
 " change the default directory where all miscellaneous persistent files go
-let g:settings.cache_dir = "/some/place/else"
+let g:spacevim_cache_dir = "/some/place/else"
 
 " by default, language specific plugins are not loaded.  this can be changed with the following:
-let g:settings.plugin_groups_exclude = ['ruby', 'python']
+let g:spacevim_plugin_groups_exclude = ['ruby', 'python']
 
 " if there are groups you want always loaded, you can use this:
-let g:settings.plugin_groups_include = ['go']
+let g:spacevim_plugin_groups_include = ['go']
 
 " alternatively, you can set this variable to load exactly what you want
-let g:settings.plugin_groups = ['core', 'web']
+let g:spacevim_plugin_groups = ['core', 'web']
 
 " if there is a particular plugin you don't like, you can define this variable to disable them entirely
-let g:settings.disabled_plugins=['vim-foo', 'vim-bar']
+let g:spacevim_disabled_plugins=['vim-foo', 'vim-bar']
 
 " anything defined here are simply overrides
 set wildignore+=\*/node_modules/\*
diff --git a/autoload/SpaceVim.vim b/autoload/SpaceVim.vim
index 8a779af7d..d8a78d7c3 100644
--- a/autoload/SpaceVim.vim
+++ b/autoload/SpaceVim.vim
@@ -1,42 +1,42 @@
 scriptencoding utf-8
 function! SpaceVim#init() abort
     "Vim settings
-    let g:settings                         = get(g:, 'settings', {})
+    let g:spacevim_                        = get(g:, 'settings', {})
     ""
     " The default_indent of SpaceVim.
-    let g:settings.default_indent          = 2
-    let g:settings.max_column              = 120
-    let g:settings.enable_googlesuggest    = 0
-    let g:settings.auto_download_neobundle = 0
-    let g:settings.neobundle_installed     = 0
-    let g:settings.dein_installed          = 0
-    let g:settings.vim_plug_installed      = 0
-    let g:settings.plugin_bundle_dir       = $HOME. join(['', '.cache', 'vimfiles', ''], '/')
-    let g:settings.autocomplete_method     = ''
-    let g:settings.enable_cursorcolumn     = 0
-    let g:settings.enable_neomake          = 1
-    let g:settings.enable_ycm              = 0
-    let g:settings.enable_neocomplcache    = 0
-    let g:settings.enable_cursorline       = 0
-    let g:settings.error_symbol            = '✖'
-    let g:settings.warning_symbol          = '⚠'
-    let g:settings.use_colorscheme         = 1
-    let g:settings.vim_help_language       = 'en'
-    let g:settings.colorscheme             = 'gruvbox'
-    let g:settings.colorscheme_default     = 'desert'
-    let g:settings.filemanager             = 'vimfiler'
-    let g:settings.plugin_manager          = 'dein'  " neobundle or dein or vim-plug
-    let g:settings.checkinstall            = 0
-    let g:settings.hiddenfileinfo          = 1
-    let g:settings.plugin_groups_exclude   = []
-    let g:settings.plugin_groups = []
-    let g:settings.smartcloseignorewin     = ['__Tagbar__' , 'vimfiler:default']
-    let g:settings.smartcloseignoreft      = ['help']
-    let g:settings.altmoveignoreft         = ['Tagbar' , 'vimfiler']
-    let g:settings.enable_javacomplete2_py = 0
-    let g:settings.src_root                = 'E:\sources\'
-    let g:settings.hosts_url               = 'https://raw.githubusercontent.com/racaljk/hosts/master/hosts'
-    let g:settings.wildignore              = '*/tmp/*,*.so,*.swp,*.zip,*.class,tags,*.jpg,
+    let g:spacevim_default_indent          = 2
+    let g:spacevim_max_column              = 120
+    let g:spacevim_enable_googlesuggest    = 0
+    let g:spacevim_auto_download_neobundle = 0
+    let g:spacevim_neobundle_installed     = 0
+    let g:spacevim_dein_installed          = 0
+    let g:spacevim_vim_plug_installed      = 0
+    let g:spacevim_plugin_bundle_dir       = $HOME. join(['', '.cache', 'vimfiles', ''], '/')
+    let g:spacevim_autocomplete_method     = ''
+    let g:spacevim_enable_cursorcolumn     = 0
+    let g:spacevim_enable_neomake          = 1
+    let g:spacevim_enable_ycm              = 0
+    let g:spacevim_enable_neocomplcache    = 0
+    let g:spacevim_enable_cursorline       = 0
+    let g:spacevim_error_symbol            = '✖'
+    let g:spacevim_warning_symbol          = '⚠'
+    let g:spacevim_use_colorscheme         = 1
+    let g:spacevim_vim_help_language       = 'en'
+    let g:spacevim_colorscheme             = 'gruvbox'
+    let g:spacevim_colorscheme_default     = 'desert'
+    let g:spacevim_filemanager             = 'vimfiler'
+    let g:spacevim_plugin_manager          = 'dein'  " neobundle or dein or vim-plug
+    let g:spacevim_checkinstall            = 0
+    let g:spacevim_hiddenfileinfo          = 1
+    let g:spacevim_plugin_groups_exclude   = []
+    let g:spacevim_plugin_groups = []
+    let g:spacevim_smartcloseignorewin     = ['__Tagbar__' , 'vimfiler:default']
+    let g:spacevim_smartcloseignoreft      = ['help']
+    let g:spacevim_altmoveignoreft         = ['Tagbar' , 'vimfiler']
+    let g:spacevim_enable_javacomplete2_py = 0
+    let g:spacevim_src_root                = 'E:\sources\'
+    let g:spacevim_hosts_url               = 'https://raw.githubusercontent.com/racaljk/hosts/master/hosts'
+    let g:spacevim_wildignore              = '*/tmp/*,*.so,*.swp,*.zip,*.class,tags,*.jpg,
                 \*.ttf,*.TTF,*.png,*/target/*,
                 \.git,.svn,.hg,.DS_Store'
 
@@ -60,70 +60,70 @@ function! SpaceVim#Layer(layer, opt) abort
 endfunction
 
 function! SpaceVim#end() abort
-    for s:group in g:settings.plugin_groups_exclude
-        let s:i = index(g:settings.plugin_groups, s:group)
+    for s:group in g:spacevim_plugin_groups_exclude
+        let s:i = index(g:spacevim_plugin_groups, s:group)
         if s:i != -1
-            call remove(g:settings.plugin_groups, s:i)
+            call remove(g:spacevim_plugin_groups, s:i)
         endif
     endfor
-    if g:settings.vim_help_language ==# 'cn'
-        call add(g:settings.plugin_groups, 'chinese')
+    if g:spacevim_vim_help_language ==# 'cn'
+        call add(g:spacevim_plugin_groups, 'chinese')
     endif
-    if g:settings.use_colorscheme==1
-        call add(g:settings.plugin_groups, 'colorscheme')
+    if g:spacevim_use_colorscheme==1
+        call add(g:spacevim_plugin_groups, 'colorscheme')
     endif
 
     if has('nvim')
-        let g:settings.autocomplete_method = 'deoplete'
+        let g:spacevim_autocomplete_method = 'deoplete'
     elseif has('lua')
-        let g:settings.autocomplete_method = 'neocomplete'
+        let g:spacevim_autocomplete_method = 'neocomplete'
     else
-        let g:settings.autocomplete_method = 'neocomplcache'
+        let g:spacevim_autocomplete_method = 'neocomplcache'
     endif
-    if g:settings.enable_ycm
-        let g:settings.autocomplete_method = 'ycm'
+    if g:spacevim_enable_ycm
+        let g:spacevim_autocomplete_method = 'ycm'
     endif
-    if g:settings.enable_neocomplcache
-        let g:settings.autocomplete_method = 'neocomplcache'
+    if g:spacevim_enable_neocomplcache
+        let g:spacevim_autocomplete_method = 'neocomplcache'
     endif
 endfunction
 
 
 function! SpaceVim#default() abort
-    call add(g:settings.plugin_groups, 'web')
-    call add(g:settings.plugin_groups, 'lang')
-    call add(g:settings.plugin_groups, 'javascript')
-    call add(g:settings.plugin_groups, 'ruby')
-    call add(g:settings.plugin_groups, 'python')
-    call add(g:settings.plugin_groups, 'scala')
-    call add(g:settings.plugin_groups, 'go')
-    call add(g:settings.plugin_groups, 'scm')
-    call add(g:settings.plugin_groups, 'editing')
-    call add(g:settings.plugin_groups, 'indents')
-    call add(g:settings.plugin_groups, 'navigation')
-    call add(g:settings.plugin_groups, 'misc')
+    call add(g:spacevim_plugin_groups, 'web')
+    call add(g:spacevim_plugin_groups, 'lang')
+    call add(g:spacevim_plugin_groups, 'javascript')
+    call add(g:spacevim_plugin_groups, 'ruby')
+    call add(g:spacevim_plugin_groups, 'python')
+    call add(g:spacevim_plugin_groups, 'scala')
+    call add(g:spacevim_plugin_groups, 'go')
+    call add(g:spacevim_plugin_groups, 'scm')
+    call add(g:spacevim_plugin_groups, 'editing')
+    call add(g:spacevim_plugin_groups, 'indents')
+    call add(g:spacevim_plugin_groups, 'navigation')
+    call add(g:spacevim_plugin_groups, 'misc')
 
-    call add(g:settings.plugin_groups, 'core')
-    call add(g:settings.plugin_groups, 'unite')
-    call add(g:settings.plugin_groups, 'github')
+    call add(g:spacevim_plugin_groups, 'core')
+    call add(g:spacevim_plugin_groups, 'unite')
+    call add(g:spacevim_plugin_groups, 'github')
     if has('python3')
-        call add(g:settings.plugin_groups, 'denite')
+        call add(g:spacevim_plugin_groups, 'denite')
     endif
-    call add(g:settings.plugin_groups, 'ctrlp')
-    call add(g:settings.plugin_groups, 'autocomplete')
+    call add(g:spacevim_plugin_groups, 'ctrlp')
+    call add(g:spacevim_plugin_groups, 'autocomplete')
     if ! has('nvim')
-        call add(g:settings.plugin_groups, 'vim')
+        call add(g:spacevim_plugin_groups, 'vim')
     else
-        call add(g:settings.plugin_groups, 'nvim')
+        call add(g:spacevim_plugin_groups, 'nvim')
     endif
     if OSX()
-        call add(g:settings.plugin_groups, 'osx')
+        call add(g:spacevim_plugin_groups, 'osx')
     endif
     if WINDOWS()
-        call add(g:settings.plugin_groups, 'windows')
+        call add(g:spacevim_plugin_groups, 'windows')
     endif
     if LINUX()
-        call add(g:settings.plugin_groups, 'linux')
+        call add(g:spacevim_plugin_groups, 'linux')
     endif
 endfunction
 
diff --git a/autoload/zvim/plug.vim b/autoload/zvim/plug.vim
index 6bffd477a..b6f5f08d0 100644
--- a/autoload/zvim/plug.vim
+++ b/autoload/zvim/plug.vim
@@ -10,20 +10,20 @@ function! s:install_manager()
         let s:Fsep = '/'
     endif
     " auto install plugin manager
-    if g:settings.plugin_manager ==# 'neobundle'
+    if g:spacevim_plugin_manager ==# 'neobundle'
         "auto install neobundle
-        if filereadable(expand(g:settings.plugin_bundle_dir)
+        if filereadable(expand(g:spacevim_plugin_bundle_dir)
                     \ . 'neobundle.vim'. s:Fsep. 'README.md')
-            let g:settings.neobundle_installed = 1
+            let g:spacevim_neobundle_installed = 1
         else
             if executable('git')
                 exec '!git clone '
                             \ .'https://github.com/'
                             \ .'Shougo/neobundle.vim'
                             \ . ' '
-                            \ . g:settings.plugin_bundle_dir
+                            \ . g:spacevim_plugin_bundle_dir
                             \ . 'neobundle.vim'
-                let g:settings.neobundle_installed = 1
+                let g:spacevim_neobundle_installed = 1
             else
                 echohl WarningMsg
                 echom "You need install git!"
@@ -31,35 +31,35 @@ function! s:install_manager()
             endif
         endif
         exec 'set runtimepath+='
-                    \ . g:settings.plugin_bundle_dir
+                    \ . g:spacevim_plugin_bundle_dir
                     \ . 'neobundle.vim'
-    elseif g:settings.plugin_manager == 'dein'
+    elseif g:spacevim_plugin_manager == 'dein'
         "auto install dein
-        if filereadable(expand(g:settings.plugin_bundle_dir)
+        if filereadable(expand(g:spacevim_plugin_bundle_dir)
                     \ . join(['repos', 'github.com',
                     \ 'Shougo', 'dein.vim', 'README.md'],
                     \ s:Fsep))
-            let g:settings.dein_installed = 1
+            let g:spacevim_dein_installed = 1
         else
             if executable('git')
                 exec '!git clone https://github.com/Shougo/dein.vim '
-                            \ . g:settings.plugin_bundle_dir
+                            \ . g:spacevim_plugin_bundle_dir
                             \ . join(['repos', 'github.com',
                             \ 'Shougo', 'dein.vim'], s:Fsep)
-                let g:settings.dein_installed = 1
+                let g:spacevim_dein_installed = 1
             else
                 echohl WarningMsg
                 echom "You need install git!"
                 echohl None
             endif
         endif
-        exec 'set runtimepath+='.g:settings.plugin_bundle_dir
+        exec 'set runtimepath+='.g:spacevim_plugin_bundle_dir
                     \ . join(['repos', 'github.com', 'Shougo',
                     \ 'dein.vim'], s:Fsep)
-    elseif g:settings.plugin_manager == 'vim-plug'
+    elseif g:spacevim_plugin_manager == 'vim-plug'
         "auto install vim-plug
         if filereadable(expand('~/.cache/vim-plug/autoload/plug.vim'))
-            let g:settings.dein_installed = 1
+            let g:spacevim_dein_installed = 1
         else
             if executable('curl')
                 exec '!curl -fLo '
@@ -67,7 +67,7 @@ function! s:install_manager()
                             \ . ' --create-dirs '
                             \ . 'https://raw.githubusercontent.com/'
                             \ . 'junegunn/vim-plug/master/plug.vim'
-                let g:settings.dein_installed = 1
+                let g:spacevim_dein_installed = 1
             else
                 echohl WarningMsg
                 echom "You need install curl!"
@@ -78,7 +78,7 @@ function! s:install_manager()
     endif
 endf
 
-if get(g:settings, 'enable_plugins', 1)
+if get(g:,'spacevim_enable_plugins', 1)
     call s:install_manager()
 endif
 
@@ -90,41 +90,41 @@ function! zvim#plug#begin(path) abort
     let g:unite_source_menu_menus.AddedPlugins.command_candidates = []
     nnoremap <silent><Leader>lp :Unite -silent
                 \ -winheight=17 -start-insert menu:AddedPlugins<CR>
-    if g:settings.plugin_manager == 'neobundle'
+    if g:spacevim_plugin_manager == 'neobundle'
         call neobundle#begin(a:path)
-    elseif g:settings.plugin_manager == 'dein'
+    elseif g:spacevim_plugin_manager == 'dein'
         call dein#begin(a:path)
-    elseif g:settings.plugin_manager == 'vim-plug'
+    elseif g:spacevim_plugin_manager == 'vim-plug'
         call plug#begin(a:path)
     endif
 endfunction
 
 function! zvim#plug#end() abort
-    if g:settings.plugin_manager == 'neobundle'
+    if g:spacevim_plugin_manager == 'neobundle'
         call neobundle#end()
-        if g:settings.checkinstall == 1
+        if g:spacevim_checkinstall == 1
             NeoBundleCheck
         endif
-    elseif g:settings.plugin_manager == 'dein'
+    elseif g:spacevim_plugin_manager == 'dein'
         call dein#end()
-        if g:settings.checkinstall == 1
+        if g:spacevim_checkinstall == 1
             if dein#check_install()
                 call dein#install()
             endif
         endif
         call dein#call_hook('source')
-    elseif g:settings.plugin_manager == 'vim-plug'
+    elseif g:spacevim_plugin_manager == 'vim-plug'
         call plug#end()
     endif
 endfunction
 
 function! zvim#plug#defind_hooks(bundle) abort
-    if g:settings.plugin_manager == 'neobundle'
+    if g:spacevim_plugin_manager == 'neobundle'
         let s:hooks = neobundle#get_hooks(a:bundle)
         func! s:hooks.on_source(bundle) abort
             call zvim#util#source_rc('plugins/' . split(a:bundle['name'],'\.')[0] . '.vim')
         endf
-    elseif g:settings.plugin_manager == 'dein'
+    elseif g:spacevim_plugin_manager == 'dein'
         call dein#config(g:dein#name, {
                     \ 'hook_source' : "call zvim#util#source_rc('plugins/" . split(g:dein#name,'\.')[0] . ".vim')"
                     \ })
@@ -132,9 +132,9 @@ function! zvim#plug#defind_hooks(bundle) abort
 endfunction
 
 function! zvim#plug#fetch() abort
-    if g:settings.plugin_manager == 'neobundle'
+    if g:spacevim_plugin_manager == 'neobundle'
         NeoBundleFetch 'Shougo/neobundle.vim'
-    elseif g:settings.plugin_manager == 'dein'
+    elseif g:spacevim_plugin_manager == 'dein'
         call dein#add('Shougo/dein.vim')
     endif
 endfunction
@@ -146,9 +146,9 @@ fu! s:parser(args)
 endf
 
 function! zvim#plug#add(repo,...) abort
-    if g:settings.plugin_manager == 'neobundle'
+    if g:spacevim_plugin_manager == 'neobundle'
         exec 'NeoBundle "'.a:repo.'"'.','.join(a:000,',')
-    elseif g:settings.plugin_manager == 'dein'
+    elseif g:spacevim_plugin_manager == 'dein'
         if len(a:000) > 0
             call dein#add(a:repo,s:parser(a:000[0]))
         else
@@ -168,17 +168,17 @@ function! zvim#plug#add(repo,...) abort
 endfunction
 
 function! zvim#plug#tap(plugin) abort
-    if g:settings.plugin_manager == 'neobundle'
+    if g:spacevim_plugin_manager == 'neobundle'
         return neobundle#tap(a:plugin)
-    elseif g:settings.plugin_manager == 'dein'
+    elseif g:spacevim_plugin_manager == 'dein'
         return dein#tap(a:plugin)
     endif
 endfunction
 
 function! zvim#plug#enable_plug() abort
-    return g:settings.neobundle_installed
-                \ || g:settings.dein_installed
-                \ || g:settings.vim_plug_installed
+    return g:spacevim_neobundle_installed
+                \ || g:spacevim_dein_installed
+                \ || g:spacevim_vim_plug_installed
 endfunction
 
 let &cpo = s:save_cpo
diff --git a/config/general.vim b/config/general.vim
index bee547cef..8af07b34a 100644
--- a/config/general.vim
+++ b/config/general.vim
@@ -88,7 +88,7 @@ set autowrite
 set hlsearch
 set laststatus=2
 set completeopt=longest,menu
-exe "set wildignore+=" . g:settings.wildignore
+exe "set wildignore+=" . g:spacevim_wildignore
 set wildignorecase
 let g:markdown_fenced_languages = ['vim', 'java', 'bash=sh', 'sh', 'html', 'python']
 set mouse=
@@ -101,21 +101,21 @@ if has('filterpipe')
 endif
 filetype plugin indent on
 syntax on
-if count(g:settings.plugin_groups, 'colorscheme')&&g:settings.colorscheme!='' "{{{
+if count(g:spacevim_plugin_groups, 'colorscheme')&&g:spacevim_colorscheme!='' "{{{
     set background=dark
     try
-        exec 'colorscheme '. g:settings.colorscheme
+        exec 'colorscheme '. g:spacevim_colorscheme
     catch
-        exec 'colorscheme '. g:settings.colorscheme_default
+        exec 'colorscheme '. g:spacevim_colorscheme_default
     endtry
 endif
-if g:settings.enable_cursorline == 1
+if g:spacevim_enable_cursorline == 1
     set cursorline                  "显示当前行
 endif
-if g:settings.enable_cursorcolumn == 1
+if g:spacevim_enable_cursorcolumn == 1
     set cursorcolumn                "显示当前列
 endif
-if g:settings.hiddenfileinfo == 1 && has("patch-7.4.1570")
+if g:spacevim_hiddenfileinfo == 1 && has("patch-7.4.1570")
     set shortmess=filnxtToOFs
 endif
 if exists('+termguicolors')
diff --git a/config/plugins.vim b/config/plugins.vim
index cb7c142de..5396fe53b 100644
--- a/config/plugins.vim
+++ b/config/plugins.vim
@@ -44,7 +44,7 @@ let s:plugins.lang = [
             \ ['isundil/vim-irssi-syntax',               { 'on_ft' : 'irssi'}],
             \ ['vimperator/vimperator.vim',              { 'on_ft' : 'vimperator'}],
             \ ]
-if g:settings.enable_javacomplete2_py
+if g:spacevim_enable_javacomplete2_py
     call add(s:plugins.lang , ['wsdjeg/vim-javacomplete2',               { 'on_ft' : ['java','jsp']}])
 else
     call add(s:plugins.lang , ['artur-shaik/vim-javacomplete2',          { 'on_ft' : ['java','jsp']}])
@@ -58,10 +58,10 @@ let s:plugins.chat = [
             \ ]
 
 if zvim#plug#enable_plug()
-    call zvim#plug#begin(g:settings.plugin_bundle_dir)
+    call zvim#plug#begin(g:spacevim_plugin_bundle_dir)
     call zvim#plug#fetch()
     let g:wsd = []
-    for group in g:settings.plugin_groups
+    for group in g:spacevim_plugin_groups
         for plugin in get(s:plugins, group, [])
             if len(plugin) == 2
                 call zvim#plug#add(plugin[0], plugin[1])
@@ -73,13 +73,13 @@ if zvim#plug#enable_plug()
             endif
         endfor
     endfor
-    if count(g:settings.plugin_groups, 'denite')
+    if count(g:spacevim_plugin_groups, 'denite')
         call zvim#plug#add('Shougo/denite.nvim',{ 'merged' : 0})
         if zvim#plug#tap('denite.nvim')
             call zvim#plug#defind_hooks('denite.nvim')
         endif
     endif
-    if count(g:settings.plugin_groups, 'unite') "{{{
+    if count(g:spacevim_plugin_groups, 'unite') "{{{
         call zvim#plug#add('Shougo/neoyank.vim')
         call zvim#plug#add('soh335/unite-qflist')
         call zvim#plug#add('ujihisa/unite-equery')
@@ -148,7 +148,7 @@ if zvim#plug#enable_plug()
             call zvim#plug#defind_hooks('vimfiler.vim')
             noremap <silent> <F3> :call zvim#util#OpenVimfiler()<CR>
         endif
-        if g:settings.enable_googlesuggest
+        if g:spacevim_enable_googlesuggest
             call zvim#plug#add('mopp/googlesuggest-source.vim')
             call zvim#plug#add('mattn/googlesuggest-complete-vim')
         endif
@@ -173,7 +173,7 @@ if zvim#plug#enable_plug()
 
 
     "{{{ctrlpvim settings
-    if count(g:settings.plugin_groups, 'ctrlp') "{{{
+    if count(g:spacevim_plugin_groups, 'ctrlp') "{{{
         call zvim#plug#add('ctrlpvim/ctrlp.vim')
         if zvim#plug#tap('ctrlp.vim')
             call zvim#plug#defind_hooks('ctrlp.vim')
@@ -204,7 +204,7 @@ if zvim#plug#enable_plug()
     endif "}}}
 
 
-    if count(g:settings.plugin_groups, 'autocomplete') "{{{
+    if count(g:spacevim_plugin_groups, 'autocomplete') "{{{
         call zvim#plug#add('honza/vim-snippets',{'on_i' : 1})
         imap <silent><expr><TAB> zvim#tab()
         smap <expr><TAB> neosnippet#expandable_or_jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
@@ -216,7 +216,7 @@ if zvim#plug#enable_plug()
         inoremap <expr> <PageUp>   pumvisible() ? "\<PageUp>\<C-p>\<C-n>" : "\<PageUp>"
         imap <expr><S-TAB> pumvisible() ? "\<C-p>" : ""
         smap <expr><S-TAB> pumvisible() ? "\<C-p>" : ""
-        if g:settings.autocomplete_method ==# 'ycm' "{{{
+        if g:spacevim_autocomplete_method ==# 'ycm' "{{{
             call zvim#plug#add('SirVer/ultisnips')
             let g:UltiSnipsExpandTrigger='<tab>'
             let g:UltiSnipsJumpForwardTrigger='<tab>'
@@ -250,21 +250,21 @@ if zvim#plug#enable_plug()
                         \   'lua' : ['.', ':'],
                         \   'erlang' : [':'],
                         \ }
-        elseif g:settings.autocomplete_method ==# 'neocomplete' "{{{
+        elseif g:spacevim_autocomplete_method ==# 'neocomplete' "{{{
             call zvim#plug#add('Shougo/neocomplete', {
                         \ 'on_i' : 1,
                         \ })
             if zvim#plug#tap('neocomplete')
                 call zvim#plug#defind_hooks('neocomplete.vim')
             endif
-        elseif g:settings.autocomplete_method ==# 'neocomplcache' "{{{
+        elseif g:spacevim_autocomplete_method ==# 'neocomplcache' "{{{
             call zvim#plug#add('Shougo/neocomplcache.vim', {
                         \ 'on_i' : 1,
                         \ })
             if zvim#plug#tap('neocomplcache.vim')
                 call zvim#plug#defind_hooks('neocomplcache.vim')
             endif
-        elseif g:settings.autocomplete_method ==# 'deoplete'
+        elseif g:spacevim_autocomplete_method ==# 'deoplete'
             call zvim#plug#add('Shougo/deoplete.nvim', {
                         \ 'on_i' : 1,
                         \ })
@@ -286,7 +286,7 @@ if zvim#plug#enable_plug()
         call zvim#plug#add('Shougo/neopairs.vim',          { 'on_i' : 1})
     endif "}}}
 
-    if count(g:settings.plugin_groups, 'colorscheme') "{{{
+    if count(g:spacevim_plugin_groups, 'colorscheme') "{{{
         "colorscheme
         call zvim#plug#add('morhetz/gruvbox')
         if zvim#plug#tap('gruvbox')
@@ -301,15 +301,15 @@ if zvim#plug#enable_plug()
         call zvim#plug#add('kristijanhusak/vim-hybrid-material')
     endif
 
-    if count(g:settings.plugin_groups, 'chinese') "{{{
+    if count(g:spacevim_plugin_groups, 'chinese') "{{{
         call zvim#plug#add('vimcn/vimcdoc')
     endif
 
-    if count(g:settings.plugin_groups, 'github') "{{{
+    if count(g:spacevim_plugin_groups, 'github') "{{{
         call zvim#plug#add('junegunn/vim-github-dashboard',      { 'on_cmd':['GHD','GHA','GHActivity','GHDashboard']})
     endif
 
-    if count(g:settings.plugin_groups, 'vim') "{{{
+    if count(g:spacevim_plugin_groups, 'vim') "{{{
         call zvim#plug#add('Shougo/vimshell.vim',                { 'on_cmd':['VimShell']})
         call zvim#plug#add('mattn/vim-terminal',                 { 'on_cmd':['Terminal']})
     endif
@@ -352,7 +352,7 @@ if zvim#plug#enable_plug()
     " use this two command to find how long the plugin take!
     "profile start vim-javacomplete2.log
     "profile! file */vim-javacomplete2/*
-    if g:settings.enable_neomake
+    if g:spacevim_enable_neomake
         call zvim#plug#add('neomake/neomake',{'merged' : 0})
         if zvim#plug#tap('neomake')
             call zvim#plug#defind_hooks('neomake')
diff --git a/config/plugins/ctrlp.vim b/config/plugins/ctrlp.vim
index 74a9f0215..fa9f65a52 100644
--- a/config/plugins/ctrlp.vim
+++ b/config/plugins/ctrlp.vim
@@ -18,9 +18,9 @@ let g:ctrlp_custom_ignore = {
             \ }
 if executable('rg')
     let g:ctrlp_user_command = 'rg %s --no-ignore --hidden --files -g "" '
-                \ . join(zvim#util#Generate_ignore(g:settings.wildignore,'rg'))
+                \ . join(zvim#util#Generate_ignore(g:spacevim_wildignore,'rg'))
 elseif executable('ag')
-    let g:ctrlp_user_command = 'ag %s --hidden -i  -g "" ' . join(zvim#util#Generate_ignore(g:settings.wildignore,'ag'))
+    let g:ctrlp_user_command = 'ag %s --hidden -i  -g "" ' . join(zvim#util#Generate_ignore(g:spacevim_wildignore,'ag'))
 endif
 let g:ctrlp_match_func = { 'match': 'pymatcher#PyMatch'  }
 "nnoremap <Leader>kk :CtrlPMixed<Cr>
diff --git a/config/plugins/neomake.vim b/config/plugins/neomake.vim
index 4989c5560..73f8838db 100644
--- a/config/plugins/neomake.vim
+++ b/config/plugins/neomake.vim
@@ -3,10 +3,10 @@ let g:neomake_open_list = 2  " 1 open list and move cursor 2 open list without m
 let g:neomake_verbose = 0
 let g:neomake_java_javac_delete_output = 0
 let g:neomake_error_sign = {
-            \ 'text': get(g:settings, 'error_symbol', '✖'),
-            \ 'texthl': (g:settings.colorscheme ==# 'gruvbox' ? 'GruvboxRedSign' : 'error'),
+            \ 'text': get(g:, 'spacevim_error_symbol', '✖'),
+            \ 'texthl': (g:spacevim_colorscheme ==# 'gruvbox' ? 'GruvboxRedSign' : 'error'),
             \ }
 let g:neomake_warning_sign = {
-            \ 'text': get(g:settings, 'warning_symbol', '➤'),
-            \ 'texthl': (g:settings.colorscheme ==# 'gruvbox' ? 'GruvboxYellowSign' : 'todo'),
+            \ 'text': get(g:,'spacevim_warning_symbol', '➤'),
+            \ 'texthl': (g:spacevim_colorscheme ==# 'gruvbox' ? 'GruvboxYellowSign' : 'todo'),
             \ }
diff --git a/doc/SpaceVim.txt b/doc/SpaceVim.txt
index 373514a37..ef5f823ca 100644
--- a/doc/SpaceVim.txt
+++ b/doc/SpaceVim.txt
@@ -9,7 +9,7 @@ CONTENTS                                                   *SpaceVim-contents*
 ==============================================================================
 CONFIGURATION                                                *SpaceVim-config*
 
-                                                                  *g:settings*
+                                                   *g:spacevim_default_indent*
 The default_indent of SpaceVim.
 
 ==============================================================================