Skip to content

Instantly share code, notes, and snippets.

@tsibley
Created September 21, 2011 12:50
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 tsibley/1231946 to your computer and use it in GitHub Desktop.
Save tsibley/1231946 to your computer and use it in GitHub Desktop.
vim + ack
#!/bin/bash
grabnext=0
opts=''
for arg; do
if [[ $grabnext != 0 || ! "$arg" =~ ^- ]]; then
opts="+0 +/\\v$arg"
break
elif [[ "$arg" == "--" ]]; then
grabnext=1
fi
done
vim "$opts" $(ack -l "$@")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment