Vim I used once on Linux has syntax coloring. But not in my Mac command line. How can I get syntax coloring? I have MacVim too, but I'm trying to adapt on command line.

I'm currently editing Haskell file on remote server via Vim installed locally. It'll be appreciated too if you guide me to get Haskell specific syntax coloring.

1 Answer 1


Create .vimrc in your home directory, like so:

vim ~/.vimrc

Then paste this:

if has('syntax') && (&t_Co > 2)
  syntax on

I believe vim on Snow Leopard (10.6+) supports haskell syntax out of the box.


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.