1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 10:40:03 +08:00

Update options

This commit is contained in:
wsdjeg 2016-12-31 19:40:08 +08:00
parent 56516afc86
commit d9ae4b5e7c
8 changed files with 28 additions and 13 deletions

View File

@ -5,6 +5,8 @@ function! SpaceVim#init() abort
""
" The default_indent of SpaceVim.
let g:spacevim_default_indent = 2
""
" The max column of SpaceVim
let g:spacevim_max_column = 120
let g:spacevim_enable_googlesuggest = 0
let g:spacevim_auto_download_neobundle = 0
@ -15,9 +17,13 @@ function! SpaceVim#init() abort
let g:spacevim_autocomplete_method = ''
let g:spacevim_enable_cursorcolumn = 0
let g:spacevim_enable_neomake = 1
""
" Enable ycm or not, but default it is 0.
let g:spacevim_enable_ycm = 0
let g:spacevim_enable_neocomplcache = 0
let g:spacevim_enable_cursorline = 0
""
" The error symbol used by maker.
let g:spacevim_error_symbol = '✖'
let g:spacevim_warning_symbol = '⚠'
let g:spacevim_use_colorscheme = 1

View File

@ -19,7 +19,7 @@ function! zvim#enter() abort
if pumvisible()
if getline('.')[col('.') - 2]==# '{'
return "\<Enter>"
elseif g:settings.autocomplete_method ==# 'neocomplete'||g:settings.autocomplete_method ==# 'deoplete'
elseif g:spacevim_autocomplete_method ==# 'neocomplete'||g:spacevim_autocomplete_method ==# 'deoplete'
return "\<C-y>"
else
return "\<esc>a"

View File

@ -32,8 +32,8 @@ fu! zvim#util#source_rc(file) abort
endf
fu! zvim#util#SmartClose() abort
let ignorewin = get(g:settings,'smartcloseignorewin',[])
let ignoreft = get(g:settings,'smartcloseignoreft',[])
let ignorewin = get(g:,'spacevim_smartcloseignorewin',[])
let ignoreft = get(g:, 'spacevim_smartcloseignoreft',[])
let win_count = winnr('$')
let num = win_count
for i in range(1,win_count)
@ -214,7 +214,7 @@ endfunction
function! zvim#util#complete_project(ArgLead, CmdLine, CursorPos) abort
call zvim#debug#completion_debug(a:ArgLead, a:CmdLine, a:CursorPos)
let dir = get(g:settings, 'src_root', '~')
let dir = get(g:,'spacevim_src_root', '~')
"return globpath(dir, '*')
let result = split(globpath(dir, '*'), "\n")
let ps = []
@ -227,13 +227,13 @@ function! zvim#util#complete_project(ArgLead, CmdLine, CursorPos) abort
endfunction
function! zvim#util#OpenProject(p) abort
let dir = get(g:settings, 'src_root', '~') . a:p
let dir = get(g:, 'spacevim_src_root', '~') . a:p
exe 'CtrlP '. dir
endfunction
function! zvim#util#UpdateHosts(...) abort
if len(a:000) == 0
let url = get(g:settings, 'hosts_url', '')
let url = get(g:,'spacevim_hosts_url', '')
else
let url = a:1
endif

View File

@ -146,13 +146,13 @@ endfunction
function! MyLeaderTabfunc() abort
if g:settings.autocomplete_method == 'deoplete'
if g:settings.enable_javacomplete2_py
if g:spacevim_autocomplete_method == 'deoplete'
if g:spacevim_enable_javacomplete2_py
return deoplete#mappings#manual_complete(['javacomplete2'])
else
return deoplete#mappings#manual_complete(['omni'])
endif
elseif g:settings.autocomplete_method == 'neocomplete'
elseif g:spacevim_autocomplete_method == 'neocomplete'
return neocomplete#start_manual_complete(['omni'])
endif
endfunction

View File

@ -156,7 +156,7 @@ nnoremap <Leader>d m`YP``
vnoremap <Leader>d YPgv
fu! s:tobur(num)
if index(get(g:settings,'altmoveignoreft',[]), &filetype) == -1
if index(get(g:,'spacevim_altmoveignoreft',[]), &filetype) == -1
if a:num ==# 'bnext'
bnext
elseif a:num ==# 'bprev'

View File

@ -14,7 +14,7 @@ let g:deoplete#omni#input_patterns.java = [
let g:deoplete#omni#input_patterns.jsp = ['[^. \t0-9]\.\w*']
let g:deoplete#omni#input_patterns.php = '\h\w*\|[^. \t]->\%(\h\w*\)\?\|\h\w*::\%(\h\w*\)\?'
let g:deoplete#ignore_sources = {}
if g:settings.enable_javacomplete2_py
if g:spacevim_enable_javacomplete2_py
let g:deoplete#ignore_sources.java = ['omni']
call deoplete#custom#set('javacomplete2', 'mark', '')
else

View File

@ -8,5 +8,5 @@ let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 0
let g:syntastic_check_on_wq = 0
let g:syntastic_error_symbol = get(g:settings, 'error_symbol', '✖')
let g:syntastic_warning_symbol = get(g:settings, 'warning_symbol', '➤')
let g:syntastic_error_symbol = get(g:, 'spacevim_error_symbol', '✖')
let g:syntastic_warning_symbol = get(g:, 'spacevim_warning_symbol', '➤')

View File

@ -12,6 +12,15 @@ CONFIGURATION *SpaceVim-config*
*g:spacevim_default_indent*
The default_indent of SpaceVim.
*g:spacevim_max_column*
The max column of SpaceVim
*g:spacevim_enable_ycm*
Enable ycm or not, but default it is 0.
*g:spacevim_error_symbol*
The error symbol used by maker.
==============================================================================
FUNCTIONS *SpaceVim-functions*