Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Translate \b into \W\@= for vim

\W\@= is vim syntax for "zero-width match on a non-word character".
I think this works for any instance of \b, unlike \< and \> in vim which
explicitly match start and end (respectively) of a word.
  • Loading branch information...
commit abe5079ba835874d910db8e8077af76aa0633829 1 parent 150e9dc
@tsibley authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  viack
View
1  viack
@@ -12,6 +12,7 @@ for (@ARGV) {
# characters are < and >
my $vimpat = $_;
$vimpat =~ s{([<>=@!%/&])}{\\$1}g;
+ $vimpat =~ s{\\b}{\\W\\@=}g; # translate Perl's \b to \W\@= for vim
push @vimopts, '+1', '+/\v'.$vimpat;
last;
}
Please sign in to comment.
Something went wrong with that request. Please try again.