To re-use matches and registers in replace:
%s/(\w+)/\=@a . submatch(1)/gFurther reference: https://vim.fandom.com/wiki/Search_and_replace
To re-use matches and registers in replace:
%s/(\w+)/\=@a . submatch(1)/gFurther reference: https://vim.fandom.com/wiki/Search_and_replace