Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
# author: Aysad Kozanoglu
# Highligh Nginx config file in Vim
# NGINX
# Download syntax highlight
mkdir -p ~/.vim/syntax/
wget https://git.io/fhJsu -O ~/.vim/syntax/nginx.vim
# Set location of Nginx config file
cat > ~/.vim/filetype.vim <<EOF
au BufRead,BufNewFile /etc/nginx/*,/etc/nginx/conf.d/*,/usr/local/nginx/conf/* if &ft == '' | setfiletype nginx | endif
EOF
#ICINGA2
wget -O ~/.vim/syntax/icinga2.vim "https://git.io/fhJs2"
# Set location of icinga2 config file
cat >> ~/.vim/filetype.vim <<EOF
au BufNewFile,BufRead /*etc/icinga2/*.conf,/*usr/share/icinga2/include/{itl,plugins,*.conf} set filetype=icinga2
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.