Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am programming some bash scripts in Terminal with VIM, on OSX 10.8, but there is no syntax-highlighting for bash. How can I enable it?

share|improve this question

migrated from stackoverflow.com Nov 21 '12 at 9:51

This question came from our site for professional and enthusiast programmers.

1  
Are you talking about syntax highlighting in some editor in terminal (e.g. vim, nano, emacs, etc), or are you talking about highlighting for your prompt (which isn't really syntax highlighting). – Jamie Wong Nov 20 '12 at 20:18
    
Sorry, I meant for the VIM editor. – B3y0nd3r Nov 21 '12 at 8:13
up vote 0 down vote accepted

i have been using macvim http://code.google.com/p/macvim/ for a long time, it has syntax highlighting. just enable syntax highlighting using ":syntax on" in your .vimrc.

don't forget to make an alias for macvim in your environment. just like this: alias vim='/Applications/MacVim/mvim'

the stock vim (/usr/bin/vim) should have also has syntax highlighting too.

oh, in case you need full GUI editor, try textmate, it's free now

share|improve this answer
    
Thanks. Same for MacVim as stock Vim , the order :syntax on work pretty well. By the way, thanks for the suggestion, I'll check textmate out – B3y0nd3r Nov 21 '12 at 11:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .