Ask Different is a question and answer site for power users of Apple hardware and software. 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

Is there a way to let Vim on Mac OS highlighten syntax of different languages in Terminal? I would guess for vim it is a .vimrc thing, right? (But I cannot find this file in my home folder).

share|improve this question
up vote 13 down vote accepted

If the file ~/.vimrc is not there, you'll just need to create it. To enable syntax highlighting, add

syntax on

to it. Also make sure that "Display ANSI colors" is enabled in the Terminal Settings.

share|improve this answer

You most probably want to enable indentation along with syntax highlighting, so add these to lines to ~/.vimrc

filetype plugin indent on
syntax on

Steps with screenshots can be found here

share|improve this answer

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.