diff --git a/autoload/SpaceVim.vim b/autoload/SpaceVim.vim index 478fdf486..7fde67732 100644 --- a/autoload/SpaceVim.vim +++ b/autoload/SpaceVim.vim @@ -8,11 +8,23 @@ scriptencoding utf-8 " @plugin(name) is configured by these options. "" -" The default_indent of SpaceVim. +" Change the default indent of SpaceVim. default is 2. +" > +" let g:spacevim_default_indent = 2 +" < let g:spacevim_default_indent = 2 "" -" The max column of SpaceVim +" Change the max column of SpaceVim, default is 120. +" > +" let g:spacevim_max_column = 120 +" < let g:spacevim_max_column = 120 +"" +" Enable/Disable google suggestion for neocomplete. by default it is Disabled. +" you can enable it by: +" > +" let g:spacevim_enable_googlesuggest = 1 +" < let g:spacevim_enable_googlesuggest = 0 let g:spacevim_auto_download_neobundle = 0 let g:spacevim_neobundle_installed = 0 diff --git a/config/autocmds.vim b/config/autocmds.vim index fc6f91b89..38462c726 100644 --- a/config/autocmds.vim +++ b/config/autocmds.vim @@ -56,6 +56,7 @@ augroup My_autocmds autocmd FocusGained * call s:reload_touchpad_status() endif autocmd VimResized * wincmd = + autocmd BufWritePost *.vim call s:generate_doc() augroup END function! s:reload_touchpad_status() if s:touchpadoff @@ -77,3 +78,8 @@ fu! s:tool() let s:done = 1 endif endf +function! s:generate_doc() abort + if filereadable('./addon-info.json') && executable('vimdoc') + call system('vimdoc .') + endif +endfunction diff --git a/config/plugins.vim b/config/plugins.vim index cb64bc458..b4bf890e0 100644 --- a/config/plugins.vim +++ b/config/plugins.vim @@ -5,6 +5,10 @@ let s:plugins.core = [ \ ['Shougo/vimproc.vim', {'build' : 'make'}], \ ] +let s:plugins.chinese = [ + \ ['vimcn/vimcdoc'], + \ ] + let s:plugins.colorscheme = [ \ ['morhetz/gruvbox', {'loadconf' : 1}], \ ['kristijanhusak/vim-hybrid-material'], @@ -278,13 +282,6 @@ if zvim#plug#enable_plug() call zvim#plug#add('Shougo/neopairs.vim', { 'on_i' : 1}) endif "}}} - if count(g:spacevim_plugin_groups, 'colorscheme') "{{{ - "colorscheme - endif - - if count(g:spacevim_plugin_groups, 'chinese') "{{{ - call zvim#plug#add('vimcn/vimcdoc') - endif if count(g:spacevim_plugin_groups, 'github') "{{{ call zvim#plug#add('junegunn/vim-github-dashboard', { 'on_cmd':['GHD','GHA','GHActivity','GHDashboard']}) diff --git a/doc/SpaceVim.txt b/doc/SpaceVim.txt index dc9716195..b84650054 100644 --- a/doc/SpaceVim.txt +++ b/doc/SpaceVim.txt @@ -18,10 +18,23 @@ CONFIGURATION *SpaceVim-config* SpaceVim is configured by these options. *g:spacevim_default_indent* -The default_indent of SpaceVim. +Change the default indent of SpaceVim. default is 2. +> + let g:spacevim_default_indent = 2 +< *g:spacevim_max_column* -The max column of SpaceVim +Change the max column of SpaceVim, default is 120. +> + let g:spacevim_max_column = 120 +< + + *g:spacevim_enable_googlesuggest* +Enable/Disable google suggestion for neocomplete. by default it is Disabled. +you can enable it by: +> + let g:spacevim_enable_googlesuggest = 1 +< *g:spacevim_guifont* set the guifont of Spacevim, default is empty.