您的位置:首页 > 运维架构 > Nginx

NGINX配置文件高亮显示

2012-12-24 12:51 369 查看
Create a folder for your VIM syntax files.

>mkdir -p ~/.vim/syntax/

Download the syntax highlighting plugin.

>curl http://www.vim.org/scripts/download_script.php?src_id=14376 -o ~/.vim/syntax/nginx.vim

Add it to VIM’s file type definitions. Make sure to adjust the path to your Nginx installation if you need to.

>echo "au BufRead,BufNewFile /etc/nginx/conf/* set ft=nginx" >> ~/.vim/filetype.vim

Now enable syntax highlighting in your .vimrc file.

>echo "syntax enable" >> ~/.vimrc

That’s it. Now you’ll have nice colors when you edit your Nginx configs with VIM!

>vim /etc/nginx/conf/nginx.conf


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: