mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 19:43:47 -05:00
@@ -338,11 +338,11 @@ See above for configuring maps for hunk-jumping and staging/undoing.
|
|||||||
|
|
||||||
#### Use a custom `grep` command
|
#### Use a custom `grep` command
|
||||||
|
|
||||||
If you use an alternative to grep, or your grep does not support the `color` flag, you can tell vim-gitgutter to use it here. It only needs to support extended POSIX regex.
|
If you use an alternative to grep, you can tell vim-gitgutter to use it here.
|
||||||
|
|
||||||
```viml
|
```viml
|
||||||
" Default:
|
" Default:
|
||||||
let g:gitgutter_grep_command = 'grep --color=never -e'
|
let g:gitgutter_grep_command = 'grep --color=never'
|
||||||
```
|
```
|
||||||
|
|
||||||
#### To turn off vim-gitgutter by default
|
#### To turn off vim-gitgutter by default
|
||||||
@@ -526,7 +526,7 @@ Here are some things you can check:
|
|||||||
* Your git config is compatible with the version of git returned by the command above.
|
* Your git config is compatible with the version of git returned by the command above.
|
||||||
* Your Vim supports signs (`:echo has('signs')` should give `1`).
|
* Your Vim supports signs (`:echo has('signs')` should give `1`).
|
||||||
* Your file is being tracked by git and has unstaged changes.
|
* Your file is being tracked by git and has unstaged changes.
|
||||||
* If your grep does not support the `color` flag, add `let g:gitgutter_grep_command = 'grep -e'` to your `~/.vimrc`.
|
* If your grep does not support the `color` flag, add `let g:gitgutter_grep_command = 'grep'` to your `~/.vimrc`.
|
||||||
|
|
||||||
|
|
||||||
### Shameless Plug
|
### Shameless Plug
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ if exists('g:gitgutter_grep_command')
|
|||||||
else
|
else
|
||||||
let s:grep_available = executable('grep')
|
let s:grep_available = executable('grep')
|
||||||
if s:grep_available
|
if s:grep_available
|
||||||
let s:grep_command = 'grep --color=never -e'
|
let s:grep_command = 'grep --color=never'
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
let s:hunk_re = '^@@ -\(\d\+\),\?\(\d*\) +\(\d\+\),\?\(\d*\) @@'
|
let s:hunk_re = '^@@ -\(\d\+\),\?\(\d*\) +\(\d\+\),\?\(\d*\) @@'
|
||||||
|
|||||||
@@ -274,7 +274,7 @@ TO USE A CUSTOM GREP COMMAND
|
|||||||
|
|
||||||
To use a custom invocation for grep, use this:
|
To use a custom invocation for grep, use this:
|
||||||
>
|
>
|
||||||
let g:gitgutter_grep_command = 'grep --color=never -e'
|
let g:gitgutter_grep_command = 'grep --color=never'
|
||||||
<
|
<
|
||||||
|
|
||||||
TO TURN OFF VIM-GITGUTTER BY DEFAULT
|
TO TURN OFF VIM-GITGUTTER BY DEFAULT
|
||||||
|
|||||||
Reference in New Issue
Block a user