I have a bunch of sass files and my designer used the wrong syntax. I wanted :margin-top 1px
but he did margin-top: 1px
So I easily wrote a sub command:
:rubydo sub! /([\w-]+):/,':\1'
So that works and fixes all the colons and moves them in the place I want. I have about 50 sass files in a stylesheets
directory. How can I run this command on all my files in one shot? I'm not really sure how to go about this in vim
. Maybe something to do with grep
? I couldn't tell ya.