[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

new pf.vim



I've uploaded a new version of pf.vim to www.vim.org.
http://www.vim.org/scripts/script.php?script_id=341
Older 'screenshot' here:
http://www.sentia.org/downloads/pf.conf.html
Changes:
- recognizes altq and table statements
- recognizes ipv4 shorthands: 10/8, 172.16/12
- folding
Folding is a cool Vim feature that's very suited to large pf
rulesets.  Inside pf.conf all you have to do is use '###>' to denote a
section, '##>' for a subsection, and '#>' for a sub-subsection.
Example below, but it really doesn't do it justice. :-)
--
Cam
If you structure your ruleset like this:
###> MACROS
###> TABLES
###> OPTIONS
###> NORMALIZE
###> QUEUE
###> NAT
###> FILTER
##> lo0 - localhost
##> enc0 -  encryption interface
##> $int_if - internal interface (lan)
##> $wlan_if - wavelan interface (bridged with lan)
##> $ext_if - external interface
##> Default policy
then this is what Vim can show you (three folds open):
+-- 16 lines: ###> MACROS--------------------------------------------
+--  4 lines: ###> TABLES--------------------------------------------
+--  6 lines: ###> OPTIONS-------------------------------------------
###> NORMALIZE
scrub in all min-ttl 2
+-- 13 lines: ###> QUEUE---------------------------------------------
+--  4 lines: ###> NAT-----------------------------------------------
###> FILTER
+---  4 lines: ##> lo0 - localhost-----------------------------------
+---  4 lines: ##> enc0 -  encryption interface----------------------
+---  5 lines: ##> $int_if - internal interface (lan)----------------
+---  4 lines: ##> $wlan_if - wavelan interface (bridged with lan)---
+--- 32 lines: ##> $ext_if - external interface----------------------
##> Default policy
block log all
~
~
~
~
~