Mac – How to enable Syntax highlighting on Vim in Mac OS Terminal

macvimterminal

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).

Best Answer

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.