Giter Club home page Giter Club logo

nginx.vim's Introduction

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

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 https://github.com/chr4/nginx.vim.git

Plug

Plug 'chr4/nginx.vim'

Dein.vim

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

Vundle

Plugin 'chr4/nginx.vim'

Pathogen

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

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

nginx.vim's People

Contributors

chr4 avatar hongquan avatar sollie avatar tkaden4 avatar nicklinnell avatar nrobinaubertin avatar rjanata avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.