1
0
Fork 0
mirror of synced 2024-12-22 06:51:06 -05:00
ultimate-vim/sources_non_forked/nginx.vim
Amir Salihefendic 3aefdbd21a Updated plugins
2019-08-22 17:36:17 +02:00
..
ftdetect Updated plugins 2018-08-25 18:13:42 +02:00
ftplugin Added not added new plugin files 2017-11-24 14:59:41 +01:00
indent Added not added new plugin files 2017-11-24 14:59:41 +01:00
syntax Updated plugins 2018-07-04 12:53:25 +02:00
CHANGELOG.md Added not added new plugin files 2017-11-24 14:59:41 +01:00
LICENSE Added not added new plugin files 2017-11-24 14:59:41 +01:00
README.md Updated plugins 2019-08-22 17:36:17 +02:00

nginx.vim

Description

Vim plugin for Nginx

Features

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!

Furthermore:

  • 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!

Screenshots

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

References

  • 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

Installation

Pathogen

git clone https://github.com/chr4/nginx.vim ~/.vim/bundle/nginx.vim

Other (Plug, Dein.vim, Vundle)

" Plug
Plug 'chr4/nginx.vim'

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

" Vundle
Plugin 'chr4/nginx.vim'

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