Permalink
Browse files

Add \v to the beginning of the vim regex to make it behave more like …

…Perl's

Awesome.  I've been looking for this flag forever.

See http://vimdoc.sourceforge.net/htmldoc/pattern.html#/magic
  • Loading branch information...
1 parent b0782bb commit 785f0db17c1b4e1cee87306c5605faad42b6fed6 @tsibley committed Sep 21, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 viack
View
4 viack
@@ -3,11 +3,11 @@ grabnext=0
opts=''
for arg; do
if [[ $grabnext != 0 || ! "$arg" =~ ^- ]]; then
- opts="+0 +/$arg"
+ opts="+0 +/\\v$arg"
break
elif [[ "$arg" == "--" ]]; then
grabnext=1
fi
done
-vim $opts $(ack -l "$@")
+vim "$opts" $(ack -l "$@")

0 comments on commit 785f0db

Please sign in to comment.