Skip to content

Instantly share code, notes, and snippets.

@mhinz
Last active July 15, 2017 00:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhinz/2b95aee17c494dbec83f24f770c25b79 to your computer and use it in GitHub Desktop.
Save mhinz/2b95aee17c494dbec83f24f770c25b79 to your computer and use it in GitHub Desktop.
" Changing the defaults arguments:
let grepper = {
\ 'grep': {
\ 'grepprg': 'grep -rn --include=\*.rb $* .'
\ }}
" Set the command on the fly (useful for commands):
command! RubyGrep Grepper -grepprg grep -rn --include=\*.rb $* .
" For a tool like git this is much easier, since you can use the default arguments:
:Grepper -tool git
git grep -nI> up *.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment