Wikia

Vim Tips Wiki

Turn on syntax coloring in Mac OS X

Talk0
1,613pages on
this wiki
Revision as of 21:31, January 28, 2014 by 46.7.120.153 (Talk)

Tip 283 Printable Monobook Previous Next

created July 11, 2002 · complexity basic · author Mario Martinez · version 6.0


Some versions of Mac OS X don't have syntax highlighting support in terminal Vim with default settings.

If you don't have syntax highlighting in any Vim, first make sure something like this is in your .vimrc:

filetype plugin indent on
syntax on

If you have that, and still don't get syntax highlighting in Vim running in a terminal (i.e. not a GUI like MacVim), you may need to inform Vim how to handle the terminal.

Something like this is needed, prior to the syntax on command in your .vimrc:

set term=builtin_beos-ansi

Others (on "Mountain Lion") reported success with this instead:

set term=builtin_ansi

Comments

set term=builtin_ansi Worked like a charm on OS X 10.9 Mavericks, Thanks.

Around Wikia's network

Random Wiki