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:
Dan Church
2016-01-15 10:27:06 -06:00
committed by Andy Stewart
parent 8d229c222c
commit 3131bdcbb8
4 changed files with 2 additions and 18 deletions

View File

@@ -179,7 +179,6 @@ You can customise:
* Line highlights
* Extra arguments for `git diff`
* 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 signs are shown (defaults to yes)
* 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.
#### 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
If you use an alternative to grep, you can tell vim-gitgutter to use it here. It only needs to support extended POSIX regex.

View File

@@ -4,7 +4,7 @@ if exists('g:gitgutter_grep_command')
else
let s:grep_available = executable('grep')
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')
if s:grep_help =~# '--color'
let s:grep_command .= ' --color=never'

View File

@@ -120,7 +120,6 @@ You can customise:
- Extra arguments for git-diff
- Key mappings
- 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 signs are shown (defaults to yes)
- 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
<
TO ESCAPE GREP
TO USE A CUSTOM GREP COMMAND
To use a custom invocation for grep, use this:
>
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
Add to your |vimrc|

View File

@@ -46,7 +46,6 @@ endtry
call s:set('g:gitgutter_sign_modified_removed', '~_')
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_avoid_cmd_prompt_on_windows', 1)