Version 4 (modified by 17 years ago) (diff) | ,
---|
Development notes
My brain is too small. I'm putting stuff here to remember it later.
Remove useless spaces where I don't want to see them:
:%s/( */(/g :%s/ *\([);]\)/\1/g :%s/\(for\|if\|while\) (/\1(/g
Add spaces where I want to see them:
# After commas and semicolons :%s/\([,;]\)\([^ ]\)/\1 \2/g # Inside = + += > etc. :%s/\([a-zA-Z0-9]\)\([-+*/><=&^%]\|[-+*/><=&^%!]=\)\([a-zA-Z0-9]\)/\1 \2 \3/g