0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00
vim/runtime/syntax/ipfilter.vim

44 lines
1.4 KiB
VimL
Raw Normal View History

2004-06-13 20:20:40 +00:00
" ipfilter syntax file
" Language: ipfilter configuration file
" Maintainer: Hendrik Scholz <hendrik@scholz.net>
2005-01-25 21:53:18 +00:00
" Last Change: 2005 Jan 23
2004-06-13 20:20:40 +00:00
"
" http://raisdorf.net/files/misc/ipfilter.vim
"
" This will also work for OpenBSD pf but there might be some tags that are
" not correctly identified.
" Please send comments to hendrik@scholz.net
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" comments
2005-01-25 21:53:18 +00:00
"syn match ipfComment /#/
syn match ipfComment /#.*/
2004-06-13 20:20:40 +00:00
syn keyword ipfQuick quick log dup-to
syn keyword ipfAny all any
" rule Action type
syn region ipfActionBlock start=/^block/ end=/$/ contains=ipfQuick,ipfAny
syn region ipfActionPass start=/^pass/ end=/$/ contains=ipfQuick,ipfAny
syn region ipfActionMisc start=/^log/ end=/$/ contains=ipfQuick,ipfAny
syn region ipfActionMisc start=/^count/ end=/$/ contains=ipfQuick,ipfAny
syn region ipfActionMisc start=/^skip/ end=/$/ contains=ipfQuick,ipfAny
syn region ipfActionMisc start=/^auth/ end=/$/ contains=ipfQuick,ipfAny
syn region ipfActionMisc start=/^call/ end=/$/ contains=ipfQuick,ipfAny
hi def link ipfComment Comment
hi def link ipfActionBlock String
hi def link ipfActionPass Type
hi def link ipfActionMisc Label
"hi def link ipfQuick Error
hi def link ipfQuick Special
2005-01-25 21:53:18 +00:00
hi def link ipfAny Statement
2004-06-13 20:20:40 +00:00