Created
December 13, 2023 18:51
-
-
Save AysadKozanoglu/21fd9ae412c618e0a51808508fb8bb34 to your computer and use it in GitHub Desktop.
vim enable syntax highlight for nginx config files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Highligh Nginx config file in Vim | |
# Download syntax highlight | |
mkdir -p ~/.vim/syntax/ | |
wget http://www.vim.org/scripts/download_script.php?src_id=19394 -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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment