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

re #373 & #374 make all plugin configs dynamic

This commit is contained in:
alan bount 2017-03-29 09:36:46 -04:00
parent c1c46335df
commit 2b1d59c64b
17 changed files with 161 additions and 154 deletions

View File

@ -1,3 +1,3 @@
scriptencoding utf-8 scriptencoding utf-8
let g:Lf_StlSeparator = { 'left': '', 'right': '' } let g:Lf_StlSeparator = get(g:, 'Lf_StlSeparator', { 'left': '', 'right': '' })
let g:Lf_StlColorscheme = 'spacevim' let g:Lf_StlColorscheme = get(g:, 'Lf_StlColorscheme', 'spacevim')

View File

@ -1,2 +1,2 @@
let g:ag_prg='ag --vimgrep' let g:ag_prg= get(g:, 'ag_prg', 'ag --vimgrep')
let g:ag_working_path_mode='r' let g:ag_working_path_mode= get(g:, 'ag_working_path_mode', 'r')

View File

@ -4,7 +4,8 @@ let s:sys = SpaceVim#api#import('system')
" denite option " denite option
let s:denite_options = {'default' : { let s:denite_options = get(g:, 'denite_options', {
\ 'default' : {
\ 'winheight' : 15, \ 'winheight' : 15,
\ 'mode' : 'insert', \ 'mode' : 'insert',
\ 'quit' : 'true', \ 'quit' : 'true',
@ -13,7 +14,7 @@ let s:denite_options = {'default' : {
\ 'direction': 'rightbelow', \ 'direction': 'rightbelow',
\ 'statusline' : 'false', \ 'statusline' : 'false',
\ 'prompt' : '➭', \ 'prompt' : '➭',
\ }} \ }})
function! s:profile(opts) abort function! s:profile(opts) abort
for fname in keys(a:opts) for fname in keys(a:opts)

View File

@ -1,70 +1,70 @@
" deoplete options " deoplete options
let g:deoplete#enable_at_startup = 1 let g:deoplete#enable_at_startup = get(g:, 'deoplete#enable_at_startup', 1)
let g:deoplete#enable_ignore_case = 1 let g:deoplete#enable_ignore_case = get(g:, 'deoplete#enable_ignore_case', 1)
let g:deoplete#enable_smart_case = 1 let g:deoplete#enable_smart_case = get(g:, 'deoplete#enable_smart_case', 1)
let g:deoplete#enable_camel_case = 1 let g:deoplete#enable_camel_case = get(g:, 'deoplete#enable_camel_case', 1)
let g:deoplete#enable_refresh_always = 1 let g:deoplete#enable_refresh_always = get(g:, 'deoplete#enable_refresh_always', 1)
let g:deoplete#max_abbr_width = 0 let g:deoplete#max_abbr_width = get(g:, 'deoplete#max_abbr_width', 0)
let g:deoplete#max_menu_width = 0 let g:deoplete#max_menu_width = get(g:, 'deoplete#max_menu_width', 0)
" init deoplet option dict " init deoplet option dict
let g:deoplete#ignore_sources = get(g:,'deoplete#ignore_sources',{}) let g:deoplete#ignore_sources = get(g:,'deoplete#ignore_sources',{})
let g:deoplete#omni#input_patterns = get(g:,'deoplete#omni#input_patterns',{}) let g:deoplete#omni#input_patterns = get(g:,'deoplete#omni#input_patterns',{})
let g:deoplete#omni_patterns = get(g:, 'deoplete#omni_patterns', {}) let g:deoplete#omni_patterns = get(g:, 'deoplete#omni_patterns', {})
" java && jsp " java && jsp
let g:deoplete#omni#input_patterns.java = [ let g:deoplete#omni#input_patterns.java = get(g:, 'deoplete#omni#input_patterns', [
\'[^. \t0-9]\.\w*', \'[^. \t0-9]\.\w*',
\'[^. \t0-9]\->\w*', \'[^. \t0-9]\->\w*',
\'[^. \t0-9]\::\w*', \'[^. \t0-9]\::\w*',
\] \])
let g:deoplete#omni#input_patterns.jsp = ['[^. \t0-9]\.\w*'] let g:deoplete#omni#input_patterns.jsp = get(g:, 'deoplete#omni#input_patterns', ['[^. \t0-9]\.\w*'])
if g:spacevim_enable_javacomplete2_py if g:spacevim_enable_javacomplete2_py
let g:deoplete#ignore_sources.java = ['omni'] let g:deoplete#ignore_sources.java = get(g:, 'deoplete#ignore_sources', ['omni'])
call deoplete#custom#set('javacomplete2', 'mark', '') call deoplete#custom#set('javacomplete2', 'mark', '')
else else
let g:deoplete#ignore_sources.java = ['javacomplete2'] let g:deoplete#ignore_sources.java = get(g:, 'deoplete#ignore_sources', ['javacomplete2'])
call deoplete#custom#set('omni', 'mark', '') call deoplete#custom#set('omni', 'mark', '')
endif endif
" go " go
let g:deoplete#ignore_sources.go = ['omni'] let g:deoplete#ignore_sources.go = get(g:, 'deoplete#ignore_sources', ['omni'])
call deoplete#custom#set('go', 'mark', '') call deoplete#custom#set('go', 'mark', '')
call deoplete#custom#set('go', 'rank', 9999) call deoplete#custom#set('go', 'rank', 9999)
" perl " perl
let g:deoplete#omni#input_patterns.perl = [ let g:deoplete#omni#input_patterns.perl = get(g:, 'deoplete#omni#input_patterns', [
\'[^. \t0-9]\.\w*', \'[^. \t0-9]\.\w*',
\'[^. \t0-9]\->\w*', \'[^. \t0-9]\->\w*',
\'[^. \t0-9]\::\w*', \'[^. \t0-9]\::\w*',
\] \])
" javascript " javascript
let g:deoplete#omni#input_patterns.javascript = ['[^. \t0-9]\.\w*'] let g:deoplete#omni#input_patterns.javascript = get(g:, 'deoplete#omni#input_patterns', ['[^. \t0-9]\.\w*'])
" php " php
let g:deoplete#omni#input_patterns.php = [ let g:deoplete#omni#input_patterns.php = get(g:, 'deoplete#omni#input_patterns', [
\'[^. \t0-9]\.\w*', \'[^. \t0-9]\.\w*',
\'[^. \t0-9]\->\w*', \'[^. \t0-9]\->\w*',
\'[^. \t0-9]\::\w*', \'[^. \t0-9]\::\w*',
\] \])
let g:deoplete#ignore_sources.php = ['omni', 'around', 'member'] let g:deoplete#ignore_sources.php = get(g:, 'deoplete#ignore_sources', ['omni', 'around', 'member'])
call deoplete#custom#set('phpcd', 'mark', '') call deoplete#custom#set('phpcd', 'mark', '')
call deoplete#custom#set('phpcd', 'input_pattern', '\w*|[^. \t]->\w*|\w*::\w*') call deoplete#custom#set('phpcd', 'input_pattern', '\w*|[^. \t]->\w*|\w*::\w*')
" lua " lua
let g:deoplete#omni_patterns.lua = '.' let g:deoplete#omni_patterns.lua = get(g:, 'deoplete#omni_patterns', '.')
" c c++ " c c++
call deoplete#custom#set('clang2', 'mark', '') call deoplete#custom#set('clang2', 'mark', '')
let g:deoplete#ignore_sources.c = ['omni'] let g:deoplete#ignore_sources.c = get(g:, 'deoplete#ignore_sources', ['omni'])
" rust " rust
let g:deoplete#ignore_sources.rust = ['omni'] let g:deoplete#ignore_sources.rust = get(g:, 'deoplete#ignore_sources', ['omni'])
call deoplete#custom#set('racer', 'mark', '') call deoplete#custom#set('racer', 'mark', '')
" public settings " public settings
call deoplete#custom#set('_', 'matchers', ['matcher_full_fuzzy']) call deoplete#custom#set('_', 'matchers', ['matcher_full_fuzzy'])
let g:deoplete#ignore_sources._ = ['around'] let g:deoplete#ignore_sources._ = get(g:, 'deoplete#ignore_sources', ['around'])
inoremap <expr><C-h> deoplete#mappings#smart_close_popup()."\<C-h>" inoremap <expr><C-h> deoplete#mappings#smart_close_popup()."\<C-h>"
inoremap <expr><BS> deoplete#mappings#smart_close_popup()."\<C-h>" inoremap <expr><BS> deoplete#mappings#smart_close_popup()."\<C-h>"
set isfname-== set isfname-==

View File

@ -1 +1 @@
let g:gruvbox_italic = 0 let g:gruvbox_italic = get(g:, 'gruvbox_italic', 0)

View File

@ -1,5 +1,5 @@
let g:java_getset_disable_map = 1 let g:java_getset_disable_map = get(g:, 'java_getset_disable_map', 1)
let g:javagetset_setterTemplate = let g:javagetset_setterTemplate = get(g:, 'javagetset_setterTemplate',
\ "/**\n" . \ "/**\n" .
\ " * Set %varname%.\n" . \ " * Set %varname%.\n" .
\ " *\n" . \ " *\n" .
@ -7,8 +7,8 @@ let g:javagetset_setterTemplate =
\ " */\n" . \ " */\n" .
\ "%modifiers% void %funcname%(%type% %varname%){\n" . \ "%modifiers% void %funcname%(%type% %varname%){\n" .
\ " this.%varname% = %varname%;\n" . \ " this.%varname% = %varname%;\n" .
\ "}" \ "}")
let g:javagetset_getterTemplate = let g:javagetset_getterTemplate = get(g:, 'javagetset_getterTemplate',
\ "/**\n" . \ "/**\n" .
\ " * Get %varname%.\n" . \ " * Get %varname%.\n" .
\ " *\n" . \ " *\n" .
@ -16,6 +16,6 @@ let g:javagetset_getterTemplate =
\ " */\n" . \ " */\n" .
\ "%modifiers% %type% %funcname%(){\n" . \ "%modifiers% %type% %funcname%(){\n" .
\ " return %varname%;\n" . \ " return %varname%;\n" .
\ "}" \ "}")
" vim:set et sw=2: " vim:set et sw=2:

View File

@ -1,41 +1,41 @@
"--------------------------------------------------------------------------- "---------------------------------------------------------------------------
" neocomplache.vim " neocomplache.vim
" "
let g:neocomplcache_enable_at_startup = 1 let g:neocomplcache_enable_at_startup = get(g:, 'neocomplcache_enable_at_startup', 1)
" Use smartcase " Use smartcase
let g:neocomplcache_enable_smart_case = 1 let g:neocomplcache_enable_smart_case = get(g:, 'neocomplcache_enable_smart_case', 1)
" Use camel case completion. " Use camel case completion.
let g:neocomplcache_enable_camel_case_completion = 1 let g:neocomplcache_enable_camel_case_completion = get(g:, 'neocomplcache_enable_camel_case_completion', 1)
" Use underbar completion. " Use underbar completion.
let g:neocomplcache_enable_underbar_completion = 1 let g:neocomplcache_enable_underbar_completion = get(g:, 'neocomplcache_enable_underbar_completion', 1)
" Use fuzzy completion. " Use fuzzy completion.
let g:neocomplcache_enable_fuzzy_completion = 1 let g:neocomplcache_enable_fuzzy_completion = get(g:, 'neocomplcache_enable_fuzzy_completion', 1)
" Set minimum syntax keyword length. " Set minimum syntax keyword length.
let g:neocomplcache_min_syntax_length = 3 let g:neocomplcache_min_syntax_length = get(g:, 'neocomplcache_min_syntax_length', 3)
" Set auto completion length. " Set auto completion length.
let g:neocomplcache_auto_completion_start_length = 2 let g:neocomplcache_auto_completion_start_length = get(g:, 'neocomplcache_auto_completion_start_length', 2)
" Set manual completion length. " Set manual completion length.
let g:neocomplcache_manual_completion_start_length = 0 let g:neocomplcache_manual_completion_start_length = get(g:, 'neocomplcache_manual_completion_start_length', 0)
" Set minimum keyword length. " Set minimum keyword length.
let g:neocomplcache_min_keyword_length = 3 let g:neocomplcache_min_keyword_length = get(g:, 'neocomplcache_min_keyword_length', 3)
" let g:neocomplcache_enable_cursor_hold_i = v:version > 703 || " let g:neocomplcache_enable_cursor_hold_i = v:version > 703 ||
" \ v:version == 703 && has('patch289') " \ v:version == 703 && has('patch289')
let g:neocomplcache_enable_cursor_hold_i = 0 let g:neocomplcache_enable_cursor_hold_i = get(g:, 'neocomplcache_enable_cursor_hold_i', 0)
let g:neocomplcache_cursor_hold_i_time = 300 let g:neocomplcache_cursor_hold_i_time = get(g:, 'neocomplcache_cursor_hold_i_time', 300)
let g:neocomplcache_enable_insert_char_pre = 1 let g:neocomplcache_enable_insert_char_pre = get(g:, 'neocomplcache_enable_insert_char_pre', 1)
let g:neocomplcache_enable_prefetch = 1 let g:neocomplcache_enable_prefetch = get(g:, 'neocomplcache_enable_prefetch', 1)
let g:neocomplcache_skip_auto_completion_time = '0.6' let g:neocomplcache_skip_auto_completion_time = get(g:, 'neocomplcache_skip_auto_completion_time', '0.6')
" For auto select. " For auto select.
let g:neocomplcache_enable_auto_select = 0 let g:neocomplcache_enable_auto_select = get(g:, 'neocomplcache_enable_auto_select', 0)
let g:neocomplcache_enable_auto_delimiter = 1 let g:neocomplcache_enable_auto_delimiter = get(g:, 'neocomplcache_enable_auto_delimiter', 1)
let g:neocomplcache_disable_auto_select_buffer_name_pattern = let g:neocomplcache_disable_auto_select_buffer_name_pattern = get(g:, 'neocomplcache_disable_auto_select_buffer_name_pattern',
\ '\[Command Line\]' \ '\[Command Line\]')
"let g:neocomplcache_disable_auto_complete = 0 "let g:neocomplcache_disable_auto_complete = 0
let g:neocomplcache_max_list = 100 let g:neocomplcache_max_list = get(g:, 'neocomplcache_max_list', 100)
let g:neocomplcache_force_overwrite_completefunc = 1 let g:neocomplcache_force_overwrite_completefunc = get(g:, 'neocomplcache_force_overwrite_completefunc', 1)
if !exists('g:neocomplcache_omni_patterns') if !exists('g:neocomplcache_omni_patterns')
let g:neocomplcache_omni_patterns = {} let g:neocomplcache_omni_patterns = {}
endif endif
@ -45,21 +45,24 @@ endif
if !exists('g:neocomplcache_force_omni_patterns') if !exists('g:neocomplcache_force_omni_patterns')
let g:neocomplcache_force_omni_patterns = {} let g:neocomplcache_force_omni_patterns = {}
endif endif
let g:neocomplcache_enable_auto_close_preview = 1 let g:neocomplcache_enable_auto_close_preview = get(g:, 'neocomplcache_enable_auto_close_preview', 1)
" let g:neocomplcache_force_omni_patterns.ruby = '[^. *\t]\.\w*\|\h\w*::' " let g:neocomplcache_force_omni_patterns.ruby = get(g:, ': ,[^. *\t]\.\w*\|\h\w*::')
let g:neocomplcache_omni_patterns.ruby = '[^. *\t]\.\w*\|\h\w*::' let g:neocomplcache_omni_patterns.ruby = get(g:, 'neocomplcache_omni_patterns',
let g:neocomplcache_omni_patterns.java = '[^. *\t]\.\w*\|\h\w*::' \ '[^. *\t]\.\w*\|\h\w*::')
let g:neocomplcache_force_omni_patterns.java = '[^. *\t]\.\w*\|\h\w*::' let g:neocomplcache_omni_patterns.java = get(g:, 'neocomplcache_omni_patterns',
\ '[^. *\t]\.\w*\|\h\w*::')
let g:neocomplcache_force_omni_patterns.java = get(g:, 'neocomplcache_force_omni_patterns',
\ '[^. *\t]\.\w*\|\h\w*::')
" For clang_complete. " For clang_complete.
let g:neocomplcache_force_overwrite_completefunc = 1 let g:neocomplcache_force_overwrite_completefunc = get(g:, 'neocomplcache_force_overwrite_completefunc', 1)
let g:neocomplcache_force_omni_patterns.c = let g:neocomplcache_force_omni_patterns.c = get(g:, 'neocomplcache_force_omni_patterns',
\ '[^.[:digit:] *\t]\%(\.\|->\)' \ '[^.[:digit:] *\t]\%(\.\|->\)')
let g:neocomplcache_force_omni_patterns.cpp = let g:neocomplcache_force_omni_patterns.cpp = get(g:, 'neocomplcache_force_omni_patterns',
\ '[^.[:digit:] *\t]\%(\.\|->\)\|\h\w*::' \ '[^.[:digit:] *\t]\%(\.\|->\)\|\h\w*::')
let g:clang_complete_auto = 0 let g:clang_complete_auto = get(g:, 'clang_complete_auto', 0)
let g:clang_auto_select = 0 let g:clang_auto_select = get(g:, 'clang_auto_select', 0)
let g:clang_use_library = 1 let g:clang_use_library = get(g:, 'clang_use_library', 1)
" Define keyword pattern. " Define keyword pattern.
if !exists('g:neocomplcache_keyword_patterns') if !exists('g:neocomplcache_keyword_patterns')
@ -67,9 +70,9 @@ if !exists('g:neocomplcache_keyword_patterns')
endif endif
let g:neocomplcache_keyword_patterns['default'] = '[0-9a-zA-Z:#_]\+' let g:neocomplcache_keyword_patterns['default'] = '[0-9a-zA-Z:#_]\+'
let g:neocomplcache_keyword_patterns.perl = '\h\w*->\h\w*\|\h\w*::' let g:neocomplcache_keyword_patterns.perl = '\h\w*->\h\w*\|\h\w*::'
let g:neocomplete#enable_multibyte_completion = 1 let g:neocomplete#enable_multibyte_completion = get(g:, 'neocomplete#enable_multibyte_completion', 1)
let g:neocomplcache_vim_completefuncs = { let g:neocomplcache_vim_completefuncs = get(g:, 'neocomplcache_vim_completefuncs', {
\ 'Ref' : 'ref#complete', \ 'Ref' : 'ref#complete',
\ 'Unite' : 'unite#complete_source', \ 'Unite' : 'unite#complete_source',
\ 'VimShellExecute' : \ 'VimShellExecute' :
@ -81,6 +84,6 @@ let g:neocomplcache_vim_completefuncs = {
\ 'VimShell' : 'vimshell#complete', \ 'VimShell' : 'vimshell#complete',
\ 'VimFiler' : 'vimfiler#complete', \ 'VimFiler' : 'vimfiler#complete',
\ 'Vinarise' : 'vinarise#complete', \ 'Vinarise' : 'vinarise#complete',
\} \})
" vim:set et sw=2: " vim:set et sw=2:

View File

@ -1,25 +1,25 @@
let g:neocomplete#data_directory='~/.cache/neocomplete' let g:neocomplete#data_directory= get(g:, 'neocomplete#data_directory','~/.cache/neocomplete')
let g:acp_enableAtStartup = 0 let g:acp_enableAtStartup = get(g:, 'acp_enableAtStartup', 0)
let g:neocomplete#enable_at_startup = 1 let g:neocomplete#enable_at_startup = get(g:, 'neocomplete#enable_at_startup', 1)
" Use smartcase. " Use smartcase.
let g:neocomplete#enable_smart_case = 1 let g:neocomplete#enable_smart_case = get(g:, 'neocomplete#enable_smart_case', 1)
let g:neocomplete#enable_camel_case = 1 let g:neocomplete#enable_camel_case = get(g:, 'neocomplete#enable_camel_case', 1)
"let g:neocomplete#enable_ignore_case = 1 "let g:neocomplete#enable_ignore_case = 1
let g:neocomplete#enable_fuzzy_completion = 1 let g:neocomplete#enable_fuzzy_completion = get(g:, 'neocomplete#enable_fuzzy_completion', 1)
" Set minimum syntax keyword length. " Set minimum syntax keyword length.
let g:neocomplete#sources#syntax#min_keyword_length = 3 let g:neocomplete#sources#syntax#min_keyword_length = get(g:, 'neocomplete#sources#syntax#min_keyword_length', 3)
let g:neocomplete#lock_buffer_name_pattern = '\*ku\*' let g:neocomplete#lock_buffer_name_pattern = get(g:, 'neocomplete#lock_buffer_name_pattern', '\*ku\*')
" Define dictionary. " Define dictionary.
let g:neocomplete#sources#dictionary#dictionaries = { let g:neocomplete#sources#dictionary#dictionaries = get(g:, 'neocomplete#sources#dictionary#dictionaries', {
\ 'default' : '', \ 'default' : '',
\ 'vimshell' : $CACHE.'/vimshell/command-history', \ 'vimshell' : $CACHE.'/vimshell/command-history',
\ 'java' : '~/.vim/dict/java.dict', \ 'java' : '~/.vim/dict/java.dict',
\ 'ruby' : '~/.vim/dict/ruby.dict', \ 'ruby' : '~/.vim/dict/ruby.dict',
\ 'scala' : '~/.vim/dict/scala.dict', \ 'scala' : '~/.vim/dict/scala.dict',
\ } \ })
let g:neocomplete#enable_auto_delimiter = 1 let g:neocomplete#enable_auto_delimiter = get(g:, 'neocomplete#enable_auto_delimiter', 1)
" Define keyword. " Define keyword.
if !exists('g:neocomplete#keyword_patterns') if !exists('g:neocomplete#keyword_patterns')

View File

@ -3,12 +3,12 @@ scriptencoding utf-8
let g:neomake_open_list = get(g:, 'neomake_open_list', 2) let g:neomake_open_list = get(g:, 'neomake_open_list', 2)
let g:neomake_verbose = get(g:, 'neomake_verbose', 0) let g:neomake_verbose = get(g:, 'neomake_verbose', 0)
let g:neomake_java_javac_delete_output = get(g:, 'neomake_java_javac_delete_output', 0) let g:neomake_java_javac_delete_output = get(g:, 'neomake_java_javac_delete_output', 0)
let g:neomake_error_sign = { let g:neomake_error_sign = get(g:, 'neomake_error_sign', {
\ 'text': get(g:, 'spacevim_error_symbol', '✖'), \ 'text': get(g:, 'spacevim_error_symbol', '✖'),
\ 'texthl': (g:spacevim_colorscheme ==# 'gruvbox' ? 'GruvboxRedSign' : 'error'), \ 'texthl': (g:spacevim_colorscheme ==# 'gruvbox' ? 'GruvboxRedSign' : 'error'),
\ } \ })
let g:neomake_warning_sign = { let g:neomake_warning_sign = get(g:, 'neomake_warning_sign', {
\ 'text': get(g:,'spacevim_warning_symbol', '➤'), \ 'text': get(g:,'spacevim_warning_symbol', '➤'),
\ 'texthl': (g:spacevim_colorscheme ==# 'gruvbox' ? 'GruvboxYellowSign' : 'todo'), \ 'texthl': (g:spacevim_colorscheme ==# 'gruvbox' ? 'GruvboxYellowSign' : 'todo'),
\ } \ })
" vim:set et sw=2: " vim:set et sw=2:

View File

@ -10,9 +10,12 @@ endif
if g:spacevim_force_global_config == 0 if g:spacevim_force_global_config == 0
let g:neosnippet#snippets_directory = [getcwd() . '/.Spacevim.d/snippets'] + g:neosnippet#snippets_directory let g:neosnippet#snippets_directory = [getcwd() . '/.Spacevim.d/snippets'] + g:neosnippet#snippets_directory
endif endif
let g:neosnippet#enable_snipmate_compatibility=1 let g:neosnippet#enable_snipmate_compatibility = get(g:, 'neosnippet#enable_snipmate_compatibility', 1)
let g:neosnippet#enable_complete_done = 1 let g:neosnippet#enable_complete_done = get(g:, 'neosnippet#enable_complete_done', 1)
let g:neosnippet#completed_pairs= {}
if !exists('g:neosnippet#completed_pairs')
let g:neosnippet#completed_pairs = {}
endif
let g:neosnippet#completed_pairs.java = {'(' : ')'} let g:neosnippet#completed_pairs.java = {'(' : ')'}
if g:neosnippet#enable_complete_done if g:neosnippet#enable_complete_done
let g:neopairs#enable = 0 let g:neopairs#enable = 0

View File

@ -1,6 +1,6 @@
"for open-browser {{{ "for open-browser {{{
" This is my setting. " This is my setting.
let g:netrw_nogx = 1 " disable netrw's gx mapping. let g:netrw_nogx = get(g:, 'netrw_nogx', 1) " disable netrw's gx mapping.
"nmap gx <Plug>(openbrowser-smart-search) "nmap gx <Plug>(openbrowser-smart-search)
"vmap gx <Plug>(openbrowser-smart-search) "vmap gx <Plug>(openbrowser-smart-search)
"" Open URI under cursor. "" Open URI under cursor.

View File

@ -2,19 +2,19 @@ scriptencoding utf-8
if !filereadable('pom.xml') && !filereadable('build.gradle') && isdirectory('bin') if !filereadable('pom.xml') && !filereadable('build.gradle') && isdirectory('bin')
let g:syntastic_java_javac_options = '-d bin' let g:syntastic_java_javac_options = '-d bin'
endif endif
let g:syntastic_java_javac_config_file_enabled = 1 let g:syntastic_java_javac_config_file_enabled = get(g:, 'syntastic_java_javac_config_file_enabled', 1)
let g:syntastic_java_javac_delete_output = 0 let g:syntastic_java_javac_delete_output = get(g:, 'syntastic_java_javac_delete_output', 0)
let g:syntastic_always_populate_loc_list = 1 let g:syntastic_always_populate_loc_list = get(g:, 'syntastic_always_populate_loc_list', 1)
let g:syntastic_auto_loc_list = 1 let g:syntastic_auto_loc_list = get(g:, 'syntastic_auto_loc_list', 1)
let g:syntastic_check_on_open = 0 let g:syntastic_check_on_open = get(g:, 'syntastic_check_on_open', 0)
let g:syntastic_check_on_wq = 0 let g:syntastic_check_on_wq = get(g:, 'syntastic_check_on_wq', 0)
let g:syntastic_error_symbol = get(g:, 'spacevim_error_symbol', '✖') let g:syntastic_error_symbol = get(g:, 'spacevim_error_symbol', '✖')
let g:syntastic_warning_symbol = get(g:, 'spacevim_warning_symbol', '➤') let g:syntastic_warning_symbol = get(g:, 'spacevim_warning_symbol', '➤')
let g:syntastic_vimlint_options = { let g:syntastic_vimlint_options = get(g:, 'syntastic_vimlint_options', {
\'EVL102': 1 , \'EVL102': 1 ,
\'EVL103': 1 , \'EVL103': 1 ,
\'EVL205': 1 , \'EVL205': 1 ,
\'EVL105': 1 , \'EVL105': 1 ,
\} \})
" vim:set et sw=2: " vim:set et sw=2:

View File

@ -1,4 +1,4 @@
let g:tagbar_width = g:spacevim_sidebar_width let g:tagbar_width = get(g:, 'tagbar_width', g:spacevim_sidebar_width)
let g:tagbar_left = 1 let g:tagbar_left = get(g:, 'tagbar_left', 1)
let g:tagbar_sort = 0 let g:tagbar_sort = get(g:, 'tagbar_sort', 0)
let g:tagbar_compact = 1 let g:tagbar_compact = get(g:, 'tagbar_compact', 1)

View File

@ -1,13 +1,13 @@
scriptencoding utf-8 scriptencoding utf-8
if !executable('ctags') if !executable('ctags')
let g:Tlist_Ctags_Cmd = '/usr/bin/ctags' "设置ctags执行路径 let g:Tlist_Ctags_Cmd = get(g:, 'Tlist_Ctags_Cmd', '/usr/bin/ctags') "设置ctags执行路径
endif endif
let g:Tlist_Auto_Update=1 let g:Tlist_Auto_Update = get(g:, 'Tlist_Auto_Update', 1)
let g:Tlist_Auto_Open =0 let g:Tlist_Auto_Open = get(g:, 'Tlist_Auto_Open', 0)
let g:Tlist_Use_Right_Window=1 let g:Tlist_Use_Right_Window = get(g:, 'Tlist_Use_Right_Window', 1)
let g:Tlist_Show_One_File=0 let g:Tlist_Show_One_File = get(g:, 'Tlist_Show_One_File', 0)
let g:Tlist_File_Fold_Auto_Close=1 let g:Tlist_File_Fold_Auto_Close = get(g:, 'Tlist_File_Fold_Auto_Close', 1)
let g:Tlist_Exit_OnlyWindow=1 let g:Tlist_Exit_OnlyWindow = get(g:, 'Tlist_Exit_OnlyWindow', 1)
let g:Tlist_Show_Menu=1 let g:Tlist_Show_Menu = get(g:, 'Tlist_Show_Menu', 1)
" vim:set et sw=2: " vim:set et sw=2:

View File

@ -4,8 +4,8 @@ nnoremap <leader>gr :execute 'Unite -auto-preview -start-insert -no-split gtags
nnoremap <leader>gg :execute 'Unite -auto-preview -start-insert -no-split gtags/grep'<CR> nnoremap <leader>gg :execute 'Unite -auto-preview -start-insert -no-split gtags/grep'<CR>
"nnoremap <leader>gp :execute 'Unite -auto-preview -start-insert -no-split gtags/completion'<CR> "nnoremap <leader>gp :execute 'Unite -auto-preview -start-insert -no-split gtags/completion'<CR>
vnoremap <leader>gd <ESC>:execute 'Unite -auto-preview -start-insert -no-split gtags/def:'.GetVisualSelection()<CR> vnoremap <leader>gd <ESC>:execute 'Unite -auto-preview -start-insert -no-split gtags/def:'.GetVisualSelection()<CR>
let g:unite_source_gtags_project_config = { let g:unite_source_gtags_project_config = get(g:, 'unite_source_gtags_project_config', {
\ '_': { 'treelize': 0 } \ '_': { 'treelize': 0 }
\ } \ })
" vim:set et sw=2: " vim:set et sw=2:

View File

@ -1 +1 @@
let g:unite_source_radio_play_cmd='mpv' let g:unite_source_radio_play_cmd= get(g:, 'unite_source_radio_play_cmd', 'mpv')

View File

@ -23,20 +23,20 @@ call unite#custom#profile('default', 'context', {
call unite#custom#profile('source/neobundle/update', 'context', { call unite#custom#profile('source/neobundle/update', 'context', {
\ 'start_insert' : 0, \ 'start_insert' : 0,
\ }) \ })
let g:unite_source_codesearch_ignore_case = 1 let g:unite_source_codesearch_ignore_case = get(g:, 'unite_source_codesearch_ignore_case', 1)
let g:unite_source_buffer_time_format = '(%m-%d-%Y %H:%M:%S) ' let g:unite_source_buffer_time_format = get(g:, 'unite_source_buffer_time_format', '(%m-%d-%Y %H:%M:%S) ')
let g:unite_source_file_mru_time_format = '(%m-%d-%Y %H:%M:%S) ' let g:unite_source_file_mru_time_format = get(g:, 'unite_source_file_mru_time_format', '(%m-%d-%Y %H:%M:%S) ')
let g:unite_source_directory_mru_time_format = '(%m-%d-%Y %H:%M:%S) ' let g:unite_source_directory_mru_time_format = get(g:, 'unite_source_directory_mru_time_format', '(%m-%d-%Y %H:%M:%S) ')
let g:unite_source_directory_mru_limit = 80 let g:unite_source_directory_mru_limit = get(g:, 'unite_source_directory_mru_limit', 80)
let g:unite_source_file_rec_max_depth = 6 let g:unite_source_file_rec_max_depth = get(g:, 'unite_source_file_rec_max_depth', 6)
let g:unite_enable_ignore_case = 1 let g:unite_enable_ignore_case = get(g:, 'unite_enable_ignore_case', 1)
let g:unite_enable_smart_case = 1 let g:unite_enable_smart_case = get(g:, 'unite_enable_smart_case', 1)
let g:unite_data_directory='~/.cache/unite' let g:unite_data_directory = get(g:, 'unite_data_directory','~/.cache/unite')
"let g:unite_enable_start_insert=1 "let g:unite_enable_start_insert=1
let g:unite_source_history_yank_enable=1 let g:unite_source_history_yank_enable = get(g:, 'unite_source_history_yank_enable', 1)
let g:unite_split_rule = 'botright' let g:unite_split_rule = get(g:, 'unite_split_rule', 'botright')
let g:unite_winheight=25 let g:unite_winheight = get(g:, 'unite_winheight', 25)
let g:unite_source_grep_default_opts = '-iRHn' let g:unite_source_grep_default_opts = get(g:, 'unite_source_grep_default_opts', '-iRHn'
\ . " --exclude='tags'" \ . " --exclude='tags'"
\ . " --exclude='cscope*'" \ . " --exclude='cscope*'"
\ . " --exclude='*.svn*'" \ . " --exclude='*.svn*'"
@ -46,13 +46,13 @@ let g:unite_source_grep_default_opts = '-iRHn'
\ . " --exclude-dir='CVS'" \ . " --exclude-dir='CVS'"
\ . " --exclude-dir='.svn'" \ . " --exclude-dir='.svn'"
\ . " --exclude-dir='.git'" \ . " --exclude-dir='.git'"
\ . " --exclude-dir='node_modules'" \ . " --exclude-dir='node_modules'")
let g:unite_launch_apps = [ let g:unite_launch_apps = get(g:, 'unite_launch_apps', [
\ 'rake', \ 'rake',
\ 'make', \ 'make',
\ 'git pull', \ 'git pull',
\ 'git push'] \ 'git push'])
let g:unite_source_menu_menus = get(g:,'unite_source_menu_menus',{}) let g:unite_source_menu_menus = get(g:, 'unite_source_menu_menus', {})
let g:unite_source_menu_menus.git = { let g:unite_source_menu_menus.git = {
\ 'description' : ' gestionar repositorios git \ 'description' : ' gestionar repositorios git
\ ⌘ [espacio]g', \ ⌘ [espacio]g',
@ -135,52 +135,52 @@ let g:unite_source_menu_menus.StatusCodeDefinitions.command_candidates = [
\['➤ 505 HTTP Version Not Supported ', 'echo "HTTP Version Not Supported"'], \['➤ 505 HTTP Version Not Supported ', 'echo "HTTP Version Not Supported"'],
\] \]
nnoremap <silent><leader>sc :Unite -silent -winheight=17 -start-insert menu:StatusCodeDefinitions<CR> nnoremap <silent><leader>sc :Unite -silent -winheight=17 -start-insert menu:StatusCodeDefinitions<CR>
let g:unite_source_grep_max_candidates = 200 let g:unite_source_grep_max_candidates = get(g:, 'unite_source_grep_max_candidates', 200)
if executable('hw') if executable('hw')
" Use hw (highway) " Use hw (highway)
" https://github.com/tkengo/highway " https://github.com/tkengo/highway
let g:unite_source_grep_command = 'hw' let g:unite_source_grep_command = get(g:, 'unite_source_grep_command', 'hw')
let g:unite_source_grep_default_opts = '--no-group --no-color' let g:unite_source_grep_default_opts = get(g:, 'unite_source_grep_default_opts', '--no-group --no-color')
let g:unite_source_grep_recursive_opt = '' let g:unite_source_grep_recursive_opt = get(g:, 'unite_source_grep_recursive_opt', '')
elseif executable('ag') elseif executable('ag')
" Use ag (the silver searcher) " Use ag (the silver searcher)
" https://github.com/ggreer/the_silver_searcher " https://github.com/ggreer/the_silver_searcher
let g:unite_source_grep_command = 'ag' let g:unite_source_grep_command = get(g:, 'unite_source_grep_command', 'ag')
let g:unite_source_grep_default_opts = let g:unite_source_grep_default_opts = get(g:, 'unite_source_grep_default_opts',
\ '-i --line-numbers --nocolor --nogroup --hidden --ignore ' . \ '-i --line-numbers --nocolor --nogroup --hidden --ignore ' .
\ '''.hg'' --ignore ''.svn'' --ignore ''.git'' --ignore ''.bzr''' \ '''.hg'' --ignore ''.svn'' --ignore ''.git'' --ignore ''.bzr''')
let g:unite_source_grep_recursive_opt = '' let g:unite_source_grep_recursive_opt = get(g:, 'unite_source_grep_recursive_opt', '')
elseif executable('pt') elseif executable('pt')
" Use pt (the platinum searcher) " Use pt (the platinum searcher)
" https://github.com/monochromegane/the_platinum_searcher " https://github.com/monochromegane/the_platinum_searcher
let g:unite_source_grep_command = 'pt' let g:unite_source_grep_command = get(g:, 'unite_source_grep_command', 'pt')
let g:unite_source_grep_default_opts = '--nogroup --nocolor' let g:unite_source_grep_default_opts = get(g:, 'unite_source_grep_default_opts', '--nogroup --nocolor')
let g:unite_source_grep_recursive_opt = '' let g:unite_source_grep_recursive_opt = get(g:, 'unite_source_grep_recursive_opt', '')
elseif executable('ack-grep') elseif executable('ack-grep')
" Use ack " Use ack
" http://beyondgrep.com/ " http://beyondgrep.com/
let g:unite_source_grep_command = 'ack-grep' let g:unite_source_grep_command = get(g:, 'unite_source_grep_command', 'ack-grep')
let g:unite_source_grep_default_opts = let g:unite_source_grep_default_opts = get(g:, 'unite_source_grep_default_opts',
\ '-i --no-heading --no-color -k -H' \ '-i --no-heading --no-color -k -H')
let g:unite_source_grep_recursive_opt = '' let g:unite_source_grep_recursive_opt = get(g:, 'unite_source_grep_recursive_opt', '')
elseif executable('ack') elseif executable('ack')
let g:unite_source_grep_command = 'ack' let g:unite_source_grep_command = get(g:, 'unite_source_grep_command', 'ack')
let g:unite_source_grep_default_opts = '-i --no-heading --no-color -k -H' let g:unite_source_grep_default_opts = get(g:, 'unite_source_grep_default_opts', '-i --no-heading --no-color -k -H')
let g:unite_source_grep_recursive_opt = '' let g:unite_source_grep_recursive_opt = get(g:, 'unite_source_grep_recursive_opt', '')
elseif executable('jvgrep') elseif executable('jvgrep')
" Use jvgrep " Use jvgrep
" https://github.com/mattn/jvgrep " https://github.com/mattn/jvgrep
let g:unite_source_grep_command = 'jvgrep' let g:unite_source_grep_command = get(g:, 'unite_source_grep_command', 'jvgrep')
let g:unite_source_grep_default_opts = '-i --exclude ''\.(git|svn|hg|bzr)''' let g:unite_source_grep_default_opts = get(g:, 'unite_source_grep_default_opts', '-i --exclude ''\.(git|svn|hg|bzr)''')
let g:unite_source_grep_recursive_opt = '-R' let g:unite_source_grep_recursive_opt = get(g:, 'unite_source_grep_recursive_opt', '-R')
elseif executable('beagrep') elseif executable('beagrep')
" Use beagrep " Use beagrep
" https://github.com/baohaojun/beagrep " https://github.com/baohaojun/beagrep
let g:unite_source_grep_command = 'beagrep' let g:unite_source_grep_command = get(g:, 'unite_source_grep_command', 'beagrep')
endif endif
let g:unite_source_rec_async_command = let g:unite_source_rec_async_command = get(g:, 'unite_source_rec_async_command',
\ ['ag', '--follow', '--nocolor', '--nogroup', \ ['ag', '--follow', '--nocolor', '--nogroup',
\ '--hidden', '-g', ''] \ '--hidden', '-g', ''])
nnoremap <silent><leader>ufa :<C-u>Unite -no-split -buffer-name=Mixed -start-insert file file_mru file_rec buffer<cr> nnoremap <silent><leader>ufa :<C-u>Unite -no-split -buffer-name=Mixed -start-insert file file_mru file_rec buffer<cr>
nnoremap <silent><leader>ufr :<C-u>Unite -buffer-name=files file_rec/async:!<cr> nnoremap <silent><leader>ufr :<C-u>Unite -buffer-name=files file_rec/async:!<cr>
nnoremap <silent><leader>ufg :<C-u>Unite -buffer-name=git-repo file_rec/git<cr> nnoremap <silent><leader>ufg :<C-u>Unite -buffer-name=git-repo file_rec/git<cr>