Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to create a script to make the vi color change described here http://www.kavoir.com/2009/05/how-to-change-vim-syntax-highlighting-colors.html

Trying to do it with sed but it's not working for some reason

I do this, but nothing happens..

sudo sed -i 's/^hi Comment      ctermfg=darkcyan$/hi Comment      ctermfg=blue/' desert.vim

I can't figure out what I'm doing wrong, any ideas?

share|improve this question
    
Are you sure it's not a tab character in the file? That you have the same number of spaces? Did you try it with a copy of the file you own so you don't need sudo? –  Daniel Beck May 30 '13 at 11:16
    
This answer should probably be in stackoverflow.com since it is directly related with scripting/programming. –  HelpingHand May 30 '13 at 13:38
    
ahhh that's it! it's a tab.. doh! Thanks Daniel –  Oscar Jun 2 '13 at 4:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.