I'd like to move away from using px
units in my CSS and move towards using em
units. This page has a formula for the conversion that's 1/16*X
where 16 is the base font size in pixels, and X is the font size to be converted. With that in mind, I tried doing something like:
:%s/\(\d\+\)px/\=1\/16*submatch(1)."em"/gc
but it's not working as expected. This is my first time using expressions in vim substitutions, so I'm a little lost.