-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathREADME
58 lines (43 loc) · 2.42 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
This is a mirror of http://www.vim.org/scripts/script.php?script_id=1425
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.