Skip to content

Instantly share code, notes, and snippets.

@jathanism
Created November 5, 2013 14:30
Show Gist options
  • Select an option

  • Save jathanism/7319863 to your computer and use it in GitHub Desktop.

Select an option

Save jathanism/7319863 to your computer and use it in GitHub Desktop.
Vim syntax file for Juniper stateless firewall filters
syn case ignore
syn match juniperPermit "accept"
syn match juniperDeny "discard"
syn match juniperProto "\(ip\|udp\|tcp\)"
syn match juniperIcmp "icmp"
syn match juniperAclName "filter"
syn match juniperComment "\/\*.*.\*\/"
syn match juniperNo "replace"
syn match juniperIP "\<\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\>"
syn match junipernextterm "next term"
syn match juniperterm "term.*."
if &background == "dark"
hi def juniperPermit ctermfg=lightgreen
hi def juniperDeny ctermfg=lightred
hi def juniperProto ctermfg=cyan
hi def juniperIcmp ctermfg=magenta
hi def juniperComment ctermfg=darkcyan
hi def juniperAclName ctermfg=white
hi def juniperNo ctermfg=white ctermbg=red
hi def juniperIP ctermfg=blue
hi def juniperAclNum ctermfg=cyan
hi def junipernextterm ctermfg=yellow
hi def juniperterm ctermfg=white
else
endif
let b:current_syntax = "juniper"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment