Skip to content

Instantly share code, notes, and snippets.

@Abica
Created March 1, 2010 18:25
Show Gist options
  • Save Abica/318638 to your computer and use it in GitHub Desktop.
Save Abica/318638 to your computer and use it in GitHub Desktop.
open grep results in vi
$ cat ~/bin/vigrep
#!/bin/sh
# open all files containing grep results in vi
# usage:
# vigrep term directory/
vi $( grep -R $1 $2 | sed 's/:.*//' | uniq | xargs echo )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment