From 3131bdcbb8b3a57ccc24afe1fb37751b6718b54b Mon Sep 17 00:00:00 2001 From: Dan Church Date: Fri, 15 Jan 2016 10:27:06 -0600 Subject: [PATCH] Remove feature gitgutter_escape_grep Reverts feature introduced in 5c23cadf57d2bd4b072e46f2320c9acec53134d6 In order to use an escaped grep, please replace `g:gitgutter_escape_grep=1` with: let g:gitgutter_grep_command = '\grep --color=never -e' --- README.mkd | 9 --------- autoload/gitgutter/diff.vim | 2 +- doc/gitgutter.txt | 8 +------- plugin/gitgutter.vim | 1 - 4 files changed, 2 insertions(+), 18 deletions(-) diff --git a/README.mkd b/README.mkd index c703485..2a20e1e 100644 --- a/README.mkd +++ b/README.mkd @@ -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. diff --git a/autoload/gitgutter/diff.vim b/autoload/gitgutter/diff.vim index 82ae1d7..cd42ef4 100644 --- a/autoload/gitgutter/diff.vim +++ b/autoload/gitgutter/diff.vim @@ -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' diff --git a/doc/gitgutter.txt b/doc/gitgutter.txt index d82fdbc..10b6eef 100644 --- a/doc/gitgutter.txt +++ b/doc/gitgutter.txt @@ -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 hp 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| diff --git a/plugin/gitgutter.vim b/plugin/gitgutter.vim index e83aaac..3de582d 100644 --- a/plugin/gitgutter.vim +++ b/plugin/gitgutter.vim @@ -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)