2

I am using vim to replace with simple regex: %s/Foo\(.\)/Bar\1Biz/gc

I wanna to confirm each occurence and Vim asks:

replace with Bar\1Biz (y/n/a/q/l/^E/^Y)?

Is it possible to substitute group (\1) in prompt to see resulting sting for each occurrence?

2
  • I am pretty sure there was an issue for that, but cannot find it currently Commented Dec 20, 2018 at 13:59
  • This would be a valid improvement request. Christian couldn't find the issue on GitHub. I also had a look and didn't find anything. You should also search the currently open issues. If you don't find anything, open a new one.
    – Ralf
    Commented Dec 22, 2018 at 18:03

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.