I want to replace a series of pipeline characters with different values. How would I do this with regular expressions?
Example:
This | is | a | sentenc
Define a function:
fun CountUp() let ret = g:i let g:i = g:i + 1 return ret endf
Now, use:
:let i = 1 | %s/|/\="new" . CountUp()/g