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?

  • I am pretty sure there was an issue for that, but cannot find it currently – Christian Brabandt Dec 20 '18 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 Dec 22 '18 at 18:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.