Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

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.

share|improve this question

migrated from Mar 3 '11 at 21:01

This question came from our site for system and network administrators.

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.

share|improve this answer
Note that is limited to 16 colors. Most of the Vim colorschemes available will look like shit while they will be gorgeous in MacVim. If you want 256 colors in your shell, try iTerm2. – romainl Mar 4 '11 at 7:00

Your Answer


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

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