You are reading

Nginx Syntax Highlighting For Vim

Posted: June 5, 2010 | By: TJ | In Technology | One comment

I found this little gem by Evan Miller in the Vim scripts archive a few days ago and love it so far. If you’re working with Nginx configurations, even on a casual basis, it’s nice to have syntax highlighting. Although the Vim plugin directions are fairly straightforward, I thought I’d outline the complete process here. Log into your box and running the following commands:

$ /bin/mkdir -p ~/.vim/syntax/
$ cd ~/.vim/syntax/
$ wget http://www.vim.org/scripts/download_script.php?src_id=12990
$ mv download_script.php?src_id=12990 nginx.vim
$ touch ~/.vim/filetype.vim
$ echo "au BufRead,BufNewFile /etc/nginx/* set ft=nginx" >> ~/.vim/filetype.vim

Nginx Syntax Highlighting For Vim

Nginx Syntax Highlighting For Vim

Comments for this entry

hey thanks for these ~ added your feed to the reader.

Luke

This is an INCREDIBLE tutorial, and is even more invaluable with the fact that MediaTemple’s GridServer does not have any automated backup options available.

I am still very much a newbie with bash scripting, but I have a couple of suggestions for this script which I am currently trying to educate myself so that I might adapt your work to fit. Of course, I share these suggestions with you as they are a derivative work based on your tutorial, and I believe they may add value to this script.

1) Why not have the GZipping script loop through each of the directories within the “domains” folder. This way each site hosted within your GS account would be backed up into it’s own file.

2) Would it be possible for the MySQL Backup script to login to the MySQL server as the Main MySQL User, run the “SHOW DATABASES;” command, and, again, loop through the results and backup each of those databases into a separate file.

Just suggestions, but useful ones, even if only in my own humble opinion.

Thanks for sharing this tutorial with everyone – it’s a great help!

Hello,

This articel is so useful for me.Thank you very very much :)

By the way, where can i get this theme ? :D

Leave your comment



Copyright © 2010. All rights reserved.

This blog is powered by WordPress and proudly hosted by (mt) Media Temple.