Attempting to use a VIM syntax highlighting plugin for editing nginx config files on El Capitan. It doesn't take.

It asks that you place these files and add these directores:

~/.vim/syntax/nginx.vim         <-- the plugin itself
~/.vim/filetype.vim.            <-- additional config file

filetype.vim contains just this one line:

au BufRead,BufNewFile /etc/nginx/*,/usr/local/nginx/conf/* if &ft == '' | setfiletype nginx | endif

The default nginx config files directory, in os x (via brew install), is


I assume the comma separated wildcard paths in filetype.vim are all the paths with which to look for nginx configuration files (.conf).

No manner of editing filetype.vim will take. I've tried adding /usr/local/etc/nginx/* both by itself and as one of the comma separated arguments to the au vim scripting command.

There are no error messages. Has anyone ever used nginx.vim on os x? Much thanks!


Wow am I a doof. I forgot to actually turn on syntax highlighting in VIM. Once I did it worked just fine.

:syntax on

Welp, at least I learned something about VIM and OS X directory structure I guess! Sorry folks.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .