mirror of
https://github.com/amix/vimrc
synced 2025-06-23 06:35:01 +08:00
Updated plugins
This commit is contained in:
@ -212,6 +212,7 @@ You can customise:
|
||||
* The signs' colours and symbols
|
||||
* Line highlights
|
||||
* The base of the diff
|
||||
* Extra arguments for `git` when running `git diff`
|
||||
* Extra arguments for `git diff`
|
||||
* Key mappings
|
||||
* Whether or not vim-gitgutter is on initially (defaults to on)
|
||||
@ -297,6 +298,14 @@ let g:gitgutter_diff_base = '<commit SHA>'
|
||||
```
|
||||
|
||||
|
||||
#### Extra arguments for `git` when running `git diff`
|
||||
|
||||
If you want to pass extra arguments to `git` when running `git diff`, do so like this:
|
||||
|
||||
```viml
|
||||
let g:gitgutter_git_args = '--git-dir-""'
|
||||
```
|
||||
|
||||
#### Extra arguments for `git diff`
|
||||
|
||||
If you want to pass extra arguments to `git diff`, for example to ignore whitespace, do so like this:
|
||||
|
@ -100,7 +100,7 @@ function! gitgutter#diff#run_diff(bufnr, preserve_full_diff) abort
|
||||
call s:write_buffer(a:bufnr, buff_file)
|
||||
|
||||
" Call git-diff with the temporary files.
|
||||
let cmd .= g:gitgutter_git_executable.' --git-dir="" --no-pager'
|
||||
let cmd .= g:gitgutter_git_executable.' --no-pager '.g:gitgutter_git_args
|
||||
if s:c_flag
|
||||
let cmd .= ' -c "diff.autorefreshindex=0"'
|
||||
let cmd .= ' -c "diff.noprefix=false"'
|
||||
|
@ -232,6 +232,7 @@ Most important option:~
|
||||
Git:~
|
||||
|
||||
|g:gitgutter_git_executable|
|
||||
|g:gitgutter_git_args|
|
||||
|g:gitgutter_diff_args|
|
||||
|g:gitgutter_diff_base|
|
||||
|
||||
@ -270,6 +271,15 @@ Default: 'git'
|
||||
This option determines what git binary to use. Set this if git is not on your
|
||||
path.
|
||||
|
||||
*g:gitgutter_git_args*
|
||||
Default: empty
|
||||
|
||||
Use this option to pass any extra arguments to git when running git-diff.
|
||||
For example:
|
||||
>
|
||||
let g:gitgutter_git_args = '--git-dir=""'
|
||||
<
|
||||
|
||||
*g:gitgutter_diff_args*
|
||||
Default: empty
|
||||
|
||||
|
@ -45,6 +45,7 @@ else
|
||||
endif
|
||||
|
||||
call s:set('g:gitgutter_sign_modified_removed', '~_')
|
||||
call s:set('g:gitgutter_git_args', '')
|
||||
call s:set('g:gitgutter_diff_args', '')
|
||||
call s:set('g:gitgutter_diff_base', '')
|
||||
call s:set('g:gitgutter_map_keys', 1)
|
||||
@ -202,6 +203,10 @@ augroup gitgutter
|
||||
|
||||
autocmd FocusGained,ShellCmdPost * call gitgutter#all(1)
|
||||
|
||||
if exists('##VimResume')
|
||||
autocmd VimResume * call gitgutter#all(1)
|
||||
endif
|
||||
|
||||
autocmd ColorScheme * call gitgutter#highlight#define_sign_column_highlight() | call gitgutter#highlight#define_highlights()
|
||||
|
||||
" Disable during :vimgrep
|
||||
|
Reference in New Issue
Block a user