"Never memorize something you can look up", Albert Einstein

VI add prefix to CSS entries

I needed to add the prefix div#wiki to all declarations in a CSS-file, my trick:

  • Format the CSS-file in Eclipse
  • Run this simple search and replace in VI(M)
:%s/^.*{/div#wiki &/g

Edit: Updated

 


Only members are allowed to post a comment.

Comments

No comments have been placed.