XVim2 icon indicating copy to clipboard operation
XVim2 copied to clipboard

Back references in regex replace not working

Open MichaelVoelkel opened this issue 7 years ago • 0 comments

Hi,

I would like to replace some string with another but it does not work.

Very simple example, I have some line:

int value;

and write:

:s/(int)/unsigned \1/g

The example has no deeper meaning, but it will just insert "unsigned \1" without using the capture, although it should result in:

unsigned int value;

I have read at some places that capturing groups need to be replaced like "(int)" but it does not work either. How can I use back references to capturing groups with Xvim?

MichaelVoelkel avatar Mar 09 '18 10:03 MichaelVoelkel