0

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?

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
0

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

  • 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 – u32004 Nov 21 '12 at 11:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.