Skip to content

Instantly share code, notes, and snippets.

@derblub
Forked from 2called-chaos/install_nginx_vim.sh
Created December 1, 2018 14:02
Show Gist options
  • Save derblub/7ea36ffad50a17fb6ae8451c46f7a6bb to your computer and use it in GitHub Desktop.
Save derblub/7ea36ffad50a17fb6ae8451c46f7a6bb to your computer and use it in GitHub Desktop.
enable nginx vim syntax highlighting (on Ubuntu/Debian)
#!/bin/sh
mkdir -p ~/.vim/syntax/
cd ~/.vim/syntax/
wget http://www.vim.org/scripts/download_script.php?src_id=19394
mv download_script.php\?src_id\=19394 nginx.vim
cat > ~/.vim/filetype.vim <<EOF
au BufRead,BufNewFile /etc/nginx/*,/usr/local/nginx/conf/* if &ft == '' | setfiletype nginx | endif
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment