brooth / far.vim

Find And Replace Vim plugin
MIT License
905 stars 44 forks source link

Unable to handle open parenthesis #109

Open axsaucedo opened 3 years ago

axsaucedo commented 3 years ago

I have tried running a replace with the command:

Far first\( second\( **/*

But I get the following error when I run the command:

Invalid pattern regex: Vim(call):E54: Unmatched \(

I have also tried running multiple variations such as without the backslashes and/or alternating.

I have also tried with the old regexengine as recommended settings (and without).

Is this a bug or just my configuration?

jrmd54 commented 8 months ago

A little late but i have the same problem myself, it seems to be an issue with the way the regex is parsed by Far.vim. If i run :F "function\(" *.cpp I get the same error, as it seems that Far.vim expects a second ) to match the first as if it was a non-escaped () group.

My solution so far is to use :F "function\(.*\)" *.cpp which does the job as i mostly want to search for functions, which always have a matching closing parenthesis