iptables


Ⅰ. 插件描述

iptables-save/restore syntax highlighter

Ⅱ. 基本信息

创建日期:  2011-02-19
使用用户:  26
Github星:  9
插件作者:  Eric Haarbauer

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/iptables'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/iptables'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/iptables'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/iptables

Ⅳ. 文档说明

This vim syntax script highlights files used by Harald Welte's iptables-save
and iptables-restore utilities.  Both utilities are part of the iptables
application (http://www.netfilter.org/projects/iptables).

Features:

  * Distinguishes commands, options, modules, targets and chains.
  * Distinguishes numeric IP addresses from net masks.
  * Highlights tokens that occur only in hand-edited files; for example,
    "--append" and "destination-unreachable".
  * Special handling for module names; for example, the tcp module is
    colored differently from the tcp protocol.

Options:

  Customize the behavior of this script by setting values for the following
  options in your .vimrc file.  (Type ":h vimrc" in vim for more information
  on the .vimrc file.)

  g:Iptables_SpecialDelimiters
    This variable, if set to a non-zero value, distinguishes numeric
    delimiters, including the dots in IP addresses, the slash that separates
    an IP address from a netmask, and the colon that separates the ends of a
    port range.  If not set, this option defaults to off.

Known Issues:

  * Some special argument tokens are highlighted whether or not they are
    used with the correct option.  For example, "destination-unreachable"
    gets special highlighting whether or not is used as an argument to the
    --icmp-type option.  In practice, this is rarely a problem.

Reporting Issues:

  If you discover an iptables file that this script highlights incorrectly,
  please email the author (address at the top of the script) with the
  following information:

    * Problem iptables file WITH ANY SENSITIVE INFORMATION REMOVED
    * The release version of this script (see top of the script)
    * If possible, a patch to fix the problem

Design Notes:

  Part of this script is autogenerated from the output of the iptables man
  page.  The source code for generating the script is available from the
  author on request (see email address at the top of the script).  The
  script should build from source on most Linux systems with iptables
  installed.

  The build system that generates this script strips special CVS tokens
  (like "Id:") so that CVS no longer recognizes them.  This allows users to
  place the script in their own version control system without losing
  information.  The author encourages other vim script developers to adopt a
  similar approach in their own scripts.

添加新评论