mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-09 12:03:48 -05:00
DRY configuration.
This commit is contained in:
@@ -5,42 +5,26 @@ let g:loaded_gitgutter = 1
|
|||||||
|
|
||||||
" Initialisation {{{
|
" Initialisation {{{
|
||||||
|
|
||||||
if !exists('g:gitgutter_enabled')
|
function! s:set(var, default)
|
||||||
let g:gitgutter_enabled = 1
|
if !exists(a:var)
|
||||||
endif
|
if type(a:default)
|
||||||
|
exe 'let' a:var '=' string(a:default)
|
||||||
|
else
|
||||||
|
exe 'let' a:var '=' a:default
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
if !exists('g:gitgutter_highlight_lines')
|
call s:set('g:gitgutter_enabled', 1)
|
||||||
let g:gitgutter_highlight_lines = 0
|
call s:set('g:gitgutter_highlight_lines', 0)
|
||||||
endif
|
|
||||||
let s:highlight_lines = g:gitgutter_highlight_lines
|
let s:highlight_lines = g:gitgutter_highlight_lines
|
||||||
|
call s:set('g:gitgutter_sign_column_always', 0)
|
||||||
if !exists('g:gitgutter_sign_column_always')
|
call s:set('g:gitgutter_on_bufenter', 1)
|
||||||
let g:gitgutter_sign_column_always = 0
|
call s:set('g:gitgutter_all_on_focusgained', 1)
|
||||||
endif
|
call s:set('g:gitgutter_sign_added', '+')
|
||||||
|
call s:set('g:gitgutter_sign_modified', '~')
|
||||||
if !exists('g:gitgutter_on_bufenter')
|
call s:set('g:gitgutter_sign_removed', '_')
|
||||||
let g:gitgutter_on_bufenter = 1
|
call s:set('g:gitgutter_sign_modified_removed', '~_')
|
||||||
endif
|
|
||||||
|
|
||||||
if !exists('g:gitgutter_all_on_focusgained')
|
|
||||||
let g:gitgutter_all_on_focusgained = 1
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !exists('g:gitgutter_sign_added')
|
|
||||||
let g:gitgutter_sign_added = '+'
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !exists('g:gitgutter_sign_modified')
|
|
||||||
let g:gitgutter_sign_modified = '~'
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !exists('g:gitgutter_sign_removed')
|
|
||||||
let g:gitgutter_sign_removed = '_'
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !exists('g:gitgutter_sign_modified_removed')
|
|
||||||
let g:gitgutter_sign_modified_removed = '~_'
|
|
||||||
endif
|
|
||||||
|
|
||||||
let s:file = ''
|
let s:file = ''
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user