Let say I've register which has string stored in it, but I'd like to use substitute command to change it.
For example I've 5x5 html table:
let @t='<table>'.repeat('<tr>'.repeat('<td>_</td>',5).'</tr>',5).'</table>'
and I'd like to replace placeholder (_
) with some other data ideally by modifying existing register (not assigning to another).
I've tried the following syntax:
"ts/_/test/g
"@ts/_/test/g " with modifiable set
which doesn't give any errors, but it doesn't work as expected (in similar way as prefixing with %
works).
What's the proper way of doing that?
:help function-list
is a very useful page ;-) There are also some other tags in that page, such asstring-functions
.