I've posted a number of times to try and get closer to what I'm trying to do. My problem is I have got the commands I need to make the conversion happen, however I cannot successfully map it to a key.
This is the type of sequences I have to convert (123456789 representing any number combination):
0010|C|||N12345678|W1234567891234 0010|H|S12345678|E123456789|| 0020|L|N12345678|W123456789|N12345678|W12345678912341234 0030|G|N12345678|W123456789|| 0020|R|N12345678|W123456789|N12345678|W12345678912341234
This is my desired outcome:
0010|C|||N12345678|W123456789|123.4 0010|H|S12345678|E123456789|| 0020|L|N12345678|W123456789|N12345678|W123456789|123.4|123.4 0030|G|N12345678|W123456789|| 0020|R|N12345678|W123456789|N12345678|W123456789|123.4|123.4
A member on reddit came up with two global commands which does exactly what I need it to:
:global/|C|/execute "normal $3hi|\<Esc>$i." :g/|L|\||R|/execute "normal $7hi|\<Esc>4li.\<Esc>2li|\<Esc>$i."
anyone able to map it to a single key?