Open MellongLau opened 9 years ago
Confirmed, $1
does not work. How do people use xvim without working regexps?..
I just ran this test case through vim and it failed to pattern match.
Tested on %s/(s)td/$1ad/g
and it didn't work, got a full code of $1ad
.
Are you sure you guys shouldn't be escaping the parenthesis?? And isn't it "\1" not "$1"?
In vim (not XVim or Xcode), /(s)td/
will only match the string (s)td
. /\(s\)td/
on the otherhand will only match the string std
storing the s
off in the first register for later use via \1
(not $1
).
XVim uses ICU regexps. And of course I tested escaping things and using \1
. Ended up doing all replacing in vim.
I never knew this! Good to know!! It would def be nice if we could get this working as I used registers a LOT in vim...
Just found this thread. This would be a great feature to implement. Is there any plan to put this into a release soon?
I try :%s/k(.+?)e/$1d/ for
extern NSString * const kTaskTitle; extern NSString * const kTaskIsCompleted; extern NSString * const kTaskCompletedDate;
but the result is
extern NSString * const $1d; extern NSString * const $1dted; extern NSString * const $1dtedDate;
capture group not work.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.