5 messages in ru.sysoev.nginxRe: nginx.vim
FromSent OnAttachments
Evan MillerMay 3, 2007 1:43 am 
焦胜强May 3, 2007 3:30 am 
Wilson BilkovichMay 3, 2007 7:19 am 
Wilson BilkovichMay 3, 2007 8:02 am 
Evan MillerMay 3, 2007 2:41 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: nginx.vimActions...
From:Evan Miller (emmi@public.gmane.org)
Date:May 3, 2007 2:41:31 pm
List:ru.sysoev.nginx

焦胜强 wrote:

Then ensure that ~/.vim/filetype.vim has this line:

au BufRead,BufNewFile nginx.conf* set ft=nginx

Ah yes, you are right. Use "set ft=nginx" rather than "setf nginx" in the command. ("setf" only applies if no filetype was previously set, but some configurations might have already set the "conf" filetype, so "set ft" is safer.)

Evan

2007/5/3, Evan Miller < emmiller+gman@public.gmane.org <mailto:emmiller+gman@public.gmane.org>>:

What do you get when you combine the world's greatest web server with the world's greatest text editor? Well, not *quite* the best syntax highlighting file out there, but it's a start:

http://www.riceonfire.org/emiller/nginx.vim <http://www.riceonfire.org/emiller/nginx.vim>

Nginx has a beautiful configuration syntax and deserves to be colored appropriately. If you're a Vim user, this file will light up the valid directives in your nginx.conf, and it will highlight variable names inside of strings and URLs for easier reading. It's all done quite tastefully, if I may say so.

To install, download the above file into your ~/.vim/syntax/ folder (create that folder if it doesn't exist already). Then ensure that ~/.vim/filetype.vim has this line:

au BufRead,BufNewFile nginx.conf* setf nginx

Please note that these highlighting rules are very BETA as I just learned how to make this kind of thing three hours ago. Send comments, anomalies, and improvements my way.

My heart goes out to the list's Emacs users.

Evan