Apr 262011

Feel bored with black and white display nginx configuration? Evan Miller create Syntax highlighting for the world’s best text editor, vim.

nginx configuration syntax highlighting


Here’s the tutorial http://www.vim.org/scripts/script.php?script_id=1886, or this how i’ve made it work on mine.

First change to .vim directory on home directory, then create directory called syntax.

# cd .vim
# mkdir syntax
# cd syntax

Download latest nginx.vim to ~/.vim/syntax/
Create file called filetype.vim in .vim and then and then add this line.

au BufRead,BufNewFile /etc/nginx/* set ft=nginx

done. 😀