The ultimate Vim configuration: vimrc
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Amir 92c794cc2b Updated plugins 2 years ago
ftdetect Updated plugins 5 years ago
ftplugin Updated plugins 2 years ago
indent Updated plugins 2 years ago
syntax Updated plugins 2 years ago Added not added new plugin files 6 years ago Updated plugins 2 years ago



Vim plugin for Nginx


The plugin is based on the recent vim-plugin distributed with nginx-1.12.0 and additionally features the following syntax improvements:

  • Highlight IPv4 and IPv6 addresses
  • Mark insecure ssl_protocols as errors
  • Inline template syntax highlight for ERB and Jinja
  • Inline syntax highlight for LUA
  • Improve integer matching
  • Syntax highlighting for proxy_next_upstream options
  • Syntax highlighting for sticky options
  • Syntax highlighting for upstream server options
  • More to come!


  • Remove annoying delimiters, resulting in strange word-boundaries

Note: Also check out sslsecure.vim: it supports highlighting insecure SSL/TLS cipher suites and protocols in all your files!


A server block with highlighting of insecure ssl_protocol options: nginx server block with SSL configuration

An upstream block with highlighted options: nginx upstream configuration

Embedded highlighting for ERB and Jinja templates: Embedded highlighting for ERB and Jinja templates

Embedded LUA syntax highlighting: Embedded LUA syntax highlighting


  • Based on the original nginx-1.12.0/contrib/vim
  • IPv4 and IPv6 address highlighting, based on expressions found in this forum post
  • Blog post introducing this plugin including some more examples

For help with secure cipher selection, visit Mozillas SSL Configuration Generator


If your Vim is at version 8 or later, the first method below is the quickest. Otherwise, install this plugin with any Vim plugin manager (vim-plug is recommended).

Native plugin management (Vim 8+)

Clone or submodule this repo into your Vim packages location. Example:

mkdir -p ~/.vim/pack/plugins/start
cd ~/.vim/pack/plugins/start
git clone


Plug 'chr4/nginx.vim'


call dein#add('chr4/nginx.vim')


Plugin 'chr4/nginx.vim'


git clone ~/.vim/bundle/nginx.vim

Optionally, if you like Jinja template syntax highlighting, install lepture/vim-jinja, too.


Copyright (c) Chris Aumann. Distributed under the same terms as Vim itself. See :help license.