Skip to content

Commit d8fa51d

Browse files
blueyedmhinz
authored andcommitted
Add "%f" to default grepformat settings (mhinz#220)
This is meant to handle the case when `-l` (or `/m` in the case of findstr) is used to only list files. Closes mhinz#219.
1 parent 8b78347 commit d8fa51d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

plugin/grepper.vim

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,33 +37,33 @@ let s:defaults = {
3737
\ 'repo': ['.git', '.hg', '.svn'],
3838
\ 'tools': ['git', 'ag', 'ack', 'ack-grep', 'grep', 'findstr', 'rg', 'pt', 'sift'],
3939
\ 'git': { 'grepprg': 'git grep -nGI',
40-
\ 'grepformat': '%f:%l:%c:%m,%f:%l:%m',
40+
\ 'grepformat': '%f:%l:%c:%m,%f:%l:%m,%f',
4141
\ 'escape': '\^$.*[]' },
4242
\ 'ag': { 'grepprg': 'ag --vimgrep',
43-
\ 'grepformat': '%f:%l:%c:%m,%f:%l:%m',
43+
\ 'grepformat': '%f:%l:%c:%m,%f:%l:%m,%f',
4444
\ 'escape': '\^$.*+?()[]{}|' },
4545
\ 'rg': { 'grepprg': 'rg -H --no-heading --vimgrep' . (has('win32') ? ' $* .' : ''),
46-
\ 'grepformat': '%f:%l:%c:%m',
46+
\ 'grepformat': '%f:%l:%c:%m,%f',
4747
\ 'escape': '\^$.*+?()[]{}|' },
4848
\ 'pt': { 'grepprg': 'pt --nogroup',
49-
\ 'grepformat': '%f:%l:%m' },
49+
\ 'grepformat': '%f:%l:%m,%f' },
5050
\ 'sift': { 'grepprg': 'sift -n --column --binary-skip $* .',
5151
\ 'grepprgbuf': 'sift -n --column --binary-skip --filename -- $* $.',
52-
\ 'grepformat': '%f:%l:%c:%m',
52+
\ 'grepformat': '%f:%l:%c:%m,%f',
5353
\ 'escape': '\+*?^$%#()[]' },
5454
\ 'ack': { 'grepprg': 'ack --noheading --column',
55-
\ 'grepformat': '%f:%l:%c:%m',
55+
\ 'grepformat': '%f:%l:%c:%m,%f',
5656
\ 'escape': '\^$.*+?()[]{}|' },
5757
\ 'ack-grep': { 'grepprg': 'ack-grep --noheading --column',
58-
\ 'grepformat': '%f:%l:%c:%m',
58+
\ 'grepformat': '%f:%l:%c:%m,%f',
5959
\ 'escape': '\^$.*+?()[]{}|' },
6060
\ 'grep': { 'grepprg': 'grep -RIn $* .',
6161
\ 'grepprgbuf': 'grep -HIn -- $* $.',
62-
\ 'grepformat': '%f:%l:%m',
62+
\ 'grepformat': '%f:%l:%m,%f',
6363
\ 'escape': '\^$.*[]' },
6464
\ 'findstr': { 'grepprg': 'findstr -rspnc:$* *',
6565
\ 'grepprgbuf': 'findstr -rpnc:$* $.',
66-
\ 'grepformat': '%f:%l:%m',
66+
\ 'grepformat': '%f:%l:%m,%f',
6767
\ 'wordanchors': ['\<', '\>'] }
6868
\ }
6969

0 commit comments

Comments
 (0)