-
Notifications
You must be signed in to change notification settings - Fork 4
iptables-save/restore syntax highlighter
vim-scripts/iptables
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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.
About
iptables-save/restore syntax highlighter
Resources
Stars
Watchers
Forks
Packages 0
No packages published