Skip to content

Instantly share code, notes, and snippets.

@kmjones1979
Last active November 17, 2016 00:09
Show Gist options
  • Save kmjones1979/e3580525801254844e3b3f57989cbd38 to your computer and use it in GitHub Desktop.
Save kmjones1979/e3580525801254844e3b3f57989cbd38 to your computer and use it in GitHub Desktop.
Enable syntax highlighting within vim for NGINX configuration files
#!/bin/bash
wget -O nginx.vim http://www.vim.org/scripts/download_script.php\?src_id\=19394
mkdir -p ~/.vim/syntax
mv nginx.vim ~/.vim/syntax/
echo "au BufRead,BufNewFile /etc/nginx/*,/usr/local/nginx/conf/* if &ft == '' | setfiletype nginx | endif" | tee -a ~/.vim/filetype.vim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment