January 16, 2007

vi syntax highlighting on MacOs

to turn on syntax highlighting in macos:

echo “syntax on” >> ~/.vimrc

Update: I changed the command - a commentor pointed out that my previous example was incorrect in most cases.

2 Comments »

  1. Wow, that’s an excellent way to destroy people’s vim config files. You want this:


    echo "syntax on" >> ~/.vimrc

    The single > will OVERWRITE the file. Double >> appends.

    Comment by Ken Miller — January 17, 2007 @ 5:13 pm

  2. Yeah, you’re right. Stupid moment on my part. There wasn’t a .vimrc file on the laptop when I created it.

    Comment by jb — January 17, 2007 @ 5:17 pm

RSS feed for comments on this post. | TrackBack URI
You can also bookmark this on del.icio.us or check the cosmos

Leave a comment

XHTML ( You can use these tags): <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .