Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turning on syntax highlighting in vim causes warning message

Tags:

vim

macos

I'm wanting to turn on syntax highlighting in vim using the .exrc file and using the following commands:

syntax on
syntax=html

Every time I open a file I get the following message now:

No Syntax items defined for this buffer

I'm using VIM version 7.3 on OS X 10.10.4

like image 274
Simon Bosley Avatar asked Jul 23 '15 12:07

Simon Bosley


1 Answers

Use the following in your ~/.vimrc file:

filetype plugin indent on
syntax on

For more information see:

:h :filetype
:h :syntax
:h filetype
like image 143
Peter Rincker Avatar answered Oct 16 '22 05:10

Peter Rincker