mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-09 12:03:48 -05:00
Remove feature gitgutter_escape_grep
Reverts feature introduced in 5c23cadf57
In order to use an escaped grep, please replace
`g:gitgutter_escape_grep=1` with:
let g:gitgutter_grep_command = '\grep --color=never -e'
This commit is contained in:
@@ -179,7 +179,6 @@ You can customise:
|
|||||||
* Line highlights
|
* Line highlights
|
||||||
* Extra arguments for `git diff`
|
* Extra arguments for `git diff`
|
||||||
* Key mappings
|
* Key mappings
|
||||||
* Whether or not to escape `grep` (default to no)
|
|
||||||
* Whether or not vim-gitgutter is on initially (defaults to on)
|
* Whether or not vim-gitgutter is on initially (defaults to on)
|
||||||
* Whether or not signs are shown (defaults to yes)
|
* Whether or not signs are shown (defaults to yes)
|
||||||
* Whether or not line highlighting is on initially (defaults to off)
|
* Whether or not line highlighting is on initially (defaults to off)
|
||||||
@@ -263,14 +262,6 @@ let g:gitgutter_map_keys = 0
|
|||||||
See above for configuring maps for hunk-jumping and staging/reverting.
|
See above for configuring maps for hunk-jumping and staging/reverting.
|
||||||
|
|
||||||
|
|
||||||
#### Whether or not to escape `grep`
|
|
||||||
|
|
||||||
If you have `grep` aliased to something which changes its output, for example `grep --color=auto -H`, you will need to tell vim-gitgutter to use raw grep:
|
|
||||||
|
|
||||||
```viml
|
|
||||||
let g:gitgutter_escape_grep = 1
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Use a custom `grep` command
|
#### Use a custom `grep` command
|
||||||
|
|
||||||
If you use an alternative to grep, 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. It only needs to support extended POSIX regex.
|
||||||
|
|||||||
@@ -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 = (g:gitgutter_escape_grep ? '\grep' : 'grep')
|
let s:grep_command = 'grep'
|
||||||
let s:grep_help = gitgutter#utility#system('grep --help')
|
let s:grep_help = gitgutter#utility#system('grep --help')
|
||||||
if s:grep_help =~# '--color'
|
if s:grep_help =~# '--color'
|
||||||
let s:grep_command .= ' --color=never'
|
let s:grep_command .= ' --color=never'
|
||||||
|
|||||||
@@ -120,7 +120,6 @@ You can customise:
|
|||||||
- Extra arguments for git-diff
|
- Extra arguments for git-diff
|
||||||
- Key mappings
|
- Key mappings
|
||||||
- The grep executable used
|
- The grep executable used
|
||||||
- Whether or not to escape grep (defaults to no)
|
|
||||||
- Whether or not vim-gitgutter is on initially (defaults to on)
|
- Whether or not vim-gitgutter is on initially (defaults to on)
|
||||||
- Whether or not signs are shown (defaults to yes)
|
- Whether or not signs are shown (defaults to yes)
|
||||||
- Whether or not line highlighting is on initially (defaults to off)
|
- Whether or not line highlighting is on initially (defaults to off)
|
||||||
@@ -213,18 +212,13 @@ To change the hunk-staging/reverting/previewing maps (defaults shown):
|
|||||||
nmap <Leader>hp <Plug>GitGutterPreviewHunk
|
nmap <Leader>hp <Plug>GitGutterPreviewHunk
|
||||||
<
|
<
|
||||||
|
|
||||||
TO ESCAPE GREP
|
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 -e'
|
||||||
<
|
<
|
||||||
|
|
||||||
To avoid any alias you have for grep, use this:
|
|
||||||
>
|
|
||||||
let g:gitgutter_escape_grep = 1
|
|
||||||
<
|
|
||||||
|
|
||||||
TO TURN OFF VIM-GITGUTTER BY DEFAULT
|
TO TURN OFF VIM-GITGUTTER BY DEFAULT
|
||||||
|
|
||||||
Add to your |vimrc|
|
Add to your |vimrc|
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ endtry
|
|||||||
|
|
||||||
call s:set('g:gitgutter_sign_modified_removed', '~_')
|
call s:set('g:gitgutter_sign_modified_removed', '~_')
|
||||||
call s:set('g:gitgutter_diff_args', '')
|
call s:set('g:gitgutter_diff_args', '')
|
||||||
call s:set('g:gitgutter_escape_grep', 0)
|
|
||||||
call s:set('g:gitgutter_map_keys', 1)
|
call s:set('g:gitgutter_map_keys', 1)
|
||||||
call s:set('g:gitgutter_avoid_cmd_prompt_on_windows', 1)
|
call s:set('g:gitgutter_avoid_cmd_prompt_on_windows', 1)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user