Skip to content

Instantly share code, notes, and snippets.

@majidalaeinia
Last active January 21, 2022 23:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save majidalaeinia/fd79282367ed26e4e291bb0a29ecfcf4 to your computer and use it in GitHub Desktop.
Save majidalaeinia/fd79282367ed26e4e291bb0a29ecfcf4 to your computer and use it in GitHub Desktop.
Enable Vim Syntax Highlighting for NGINX Files
mkdir -p ~/.vim/syntax/
wget https://www.vim.org/scripts/download_script.php?src_id=27919 -O ~/.vim/syntax/nginx.vim
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