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
|
- cvs
|
||||||
- rcs
|
- 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
|
#### quick jumping between changed lines
|
||||||
|
|
||||||
There are mappings for jumping forth and back between changed lines (so-called
|
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.
|
__NOTE__: The shown assignments are only examples, not defaults.
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
|
let g:signify_vcs_list = [ 'git', 'hg' ]
|
||||||
|
|
||||||
let g:signify_mapping_next_hunk = '<leader>gn'
|
let g:signify_mapping_next_hunk = '<leader>gn'
|
||||||
let g:signify_mapping_prev_hunk = '<leader>gp'
|
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.
|
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_next_hunk = '<leader>gj'
|
||||||
let g:signify_mapping_prev_hunk = '<leader>gk'
|
let g:signify_mapping_prev_hunk = '<leader>gk'
|
||||||
|
|
||||||
|
@ -39,6 +39,8 @@ let s:other_signs_line_numbers = {}
|
|||||||
" overwrite non-signify signs by default
|
" overwrite non-signify signs by default
|
||||||
let s:sign_overwrite = exists('g:signify_sign_overwrite') ? g:signify_sign_overwrite : 1
|
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_start = 0x100
|
||||||
let s:id_top = s:id_start
|
let s:id_top = s:id_start
|
||||||
|
|
||||||
@ -204,9 +206,9 @@ function! s:stop(path) abort
|
|||||||
call remove(s:sy, a:path)
|
call remove(s:sy, a:path)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
aug signify
|
augroup signify
|
||||||
au! * <buffer>
|
autocmd! * <buffer>
|
||||||
aug END
|
augroup END
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Functions -> s:sign_get_others() {{{2
|
" 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!'
|
echo 'signify: I cannot work without grep and diff!'
|
||||||
endif
|
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)
|
let diff = s:repo_get_diff_{type}(a:path)
|
||||||
if !empty(diff)
|
if !empty(diff)
|
||||||
return [ diff, type ]
|
return [ diff, type ]
|
||||||
@ -319,7 +321,7 @@ endfunction
|
|||||||
|
|
||||||
" Functions -> s:repo_get_diff_cvs {{{2
|
" Functions -> s:repo_get_diff_cvs {{{2
|
||||||
function! s:repo_get_diff_cvs(path) abort
|
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 "^@@ "')
|
let diff = system('cvs diff -U0 -- '. a:path .' 2>&1 | grep --color=never "^@@ "')
|
||||||
return v:shell_error ? '' : diff
|
return v:shell_error ? '' : diff
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user