new option: configure which VCS to check for
This commit is contained in:
parent
5829eab28f
commit
8eb00a2d08
@ -87,10 +87,6 @@ Current the following VCS are supported:
|
||||
- cvs
|
||||
- rcs
|
||||
|
||||
Note: CVS detection is disabled by default, because it can lead to considerable
|
||||
delay if the current repo is not a CVS one and the environment variable $CVSROOT
|
||||
is set nevertheless because a remote connection could be made.
|
||||
|
||||
#### quick jumping between changed lines
|
||||
|
||||
There are mappings for jumping forth and back between changed lines (so-called
|
||||
@ -165,6 +161,8 @@ For more info: `:h signify-options`
|
||||
__NOTE__: The shown assignments are only examples, not defaults.
|
||||
|
||||
```vim
|
||||
let g:signify_vcs_list = [ 'git', 'hg' ]
|
||||
|
||||
let g:signify_mapping_next_hunk = '<leader>gn'
|
||||
let g:signify_mapping_prev_hunk = '<leader>gp'
|
||||
|
||||
|
@ -89,6 +89,15 @@ Put these variables into your vimrc. The shown assignments are only examples,
|
||||
not defaults.
|
||||
|
||||
|
||||
let g:signify_vcs_list = [ 'git', 'hg' ]
|
||||
|
||||
A list of VCS to check for. This can improve buffer loading time since by
|
||||
default all supported VCS will be checked for.
|
||||
|
||||
NOTE: This only happens once at buffer loading. Afterwards, the VCS will be
|
||||
remembered anyway.
|
||||
|
||||
|
||||
let g:signify_mapping_next_hunk = '<leader>gj'
|
||||
let g:signify_mapping_prev_hunk = '<leader>gk'
|
||||
|
||||
|
@ -39,6 +39,8 @@ let s:other_signs_line_numbers = {}
|
||||
" overwrite non-signify signs by default
|
||||
let s:sign_overwrite = exists('g:signify_sign_overwrite') ? g:signify_sign_overwrite : 1
|
||||
|
||||
let s:vcs_list = exists('g:signify_vcs_list') ? g:signify_vcs_list : [ 'git', 'hg', 'svn', 'darcs', 'bzr', 'cvs', 'rcs' ]
|
||||
|
||||
let s:id_start = 0x100
|
||||
let s:id_top = s:id_start
|
||||
|
||||
@ -204,9 +206,9 @@ function! s:stop(path) abort
|
||||
call remove(s:sy, a:path)
|
||||
endif
|
||||
|
||||
aug signify
|
||||
au! * <buffer>
|
||||
aug END
|
||||
augroup signify
|
||||
autocmd! * <buffer>
|
||||
augroup END
|
||||
endfunction
|
||||
|
||||
" Functions -> s:sign_get_others() {{{2
|
||||
@ -253,7 +255,7 @@ function! s:repo_detect(path) abort
|
||||
echo 'signify: I cannot work without grep and diff!'
|
||||
endif
|
||||
|
||||
for type in [ 'git', 'hg', 'svn', 'darcs', 'bzr', 'cvs', 'rcs' ]
|
||||
for type in s:vcs_list
|
||||
let diff = s:repo_get_diff_{type}(a:path)
|
||||
if !empty(diff)
|
||||
return [ diff, type ]
|
||||
@ -319,7 +321,7 @@ endfunction
|
||||
|
||||
" Functions -> s:repo_get_diff_cvs {{{2
|
||||
function! s:repo_get_diff_cvs(path) abort
|
||||
if executable('cvs') && exists('g:signify_enable_cvs') && (g:signify_enable_cvs == 1)
|
||||
if executable('cvs')
|
||||
let diff = system('cvs diff -U0 -- '. a:path .' 2>&1 | grep --color=never "^@@ "')
|
||||
return v:shell_error ? '' : diff
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user