For writing a text book I would like text expansion; on typing this:|25,50,65|it should expand this to:$25\ux,50\uy,65\uz$I tried to use simple text replacement with :s%/TEXT/NEWTEXT/gc, but problem is my requirement with three arguments vim should wrap some text around three arguments.The same problem exists with iabbrev, plus iabbrev requires typing TEXT and then a space.How can I achieve this in Vim?
Text expansion for LaTeX editing
substitute;replace;filetype tex
You can change any set of numbers (e.g. 24,10,4 to $24\ux,10uy,4uz$) with something like this::%s/\v(\d+)(,\d+)(,\d+)/$\1\\ux\2\\uy\3\\uz$/g