OpenBSD Journal

Vim syntax highlighting for pf.conf

Contributed by jose on from the :set-pf dept.

Camiel Dobbelaar writes :
"Vim syntax highlighting for pf.conf, your ruleset never looked so good before. :-)

"Screenshot": http://www.sentia.org/downloads/pf.conf.html
Syntax config file: http://www.sentia.org/downloads/pf.vim

Copy it to your syntax dir, then type ':setf pf'. "

This looks like a handy way to visually sift through complex rulesets more efficiently. Thank you Camiel!

(Comments are closed)


  1. By Froggy () spammeyoubastards@froggynet.com on http://www.froggynet.com/

    It's a little bit to colorful for my tastes, but anything that will help me parse a pf ruleset quickly is appreciated.

    I second the thank you. Any tool that helps those of us that don't build firewalls on a daily basis do our job better and faster is much appreciated.

  2. By Anonymous Coward () on

    Is it going to make it to editors/vim ? :)

  3. By Anonymous Coward () on

    You should submit this to the vim folks for inclusion in the next release.

  4. By Anonymous Coward () on

    Let's see a visudo like for pf. (;

  5. By Anonymous Coward () on

    kick ass.

  6. By Anonymous Coward () on

    I don't much care if line-continuation characters are colored, but if it is possible to highlight any whitespace after a and before the CR it might help save someone from making a stupid mistake. Good idea? Dumb?

  7. By FuraxFox () spam@goupilland.net on http://www.goupilland.net/

    Thanks for this pretty nice add-on.

    I just thought that it may be usefull to people looking for way to use pf.vim automaticaly.

    Just add:
    " PF.conf
    au BufNewFile,BufRead pf.conf* setf pf

    to $VIMRUNTIMEfiletype.vim (where $VIMRUNTIME si probably /usr/local/share/vim/vim61).

    Most of you may have gessed that but I hope this helps.

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]