1" Vim syntax file 2" Language: Privoxy actions file 3" Maintainer: Doug Kearns <dougkearns@gmail.com> 4" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/privoxy.vim 5" Last Change: 2007 Mar 30 6 7" Privoxy 3.0.6 8 9if exists("b:current_syntax") 10 finish 11endif 12 13let s:cpo_save = &cpo 14set cpo&vim 15 16setlocal iskeyword=@,48-57,_,- 17 18syn keyword privoxyTodo contained TODO FIXME XXX NOTE 19syn match privoxyComment "#.*" contains=privoxyTodo,@Spell 20 21syn region privoxyActionLine matchgroup=privoxyActionLineDelimiter start="^\s*\zs{" end="}\ze\s*$" 22 \ contains=privoxyEnabledPrefix,privoxyDisabledPrefix 23 24syn match privoxyEnabledPrefix "\%(^\|\s\|{\)\@<=+\l\@=" nextgroup=privoxyAction,privoxyFilterAction contained 25syn match privoxyDisabledPrefix "\%(^\|\s\|{\)\@<=-\l\@=" nextgroup=privoxyAction,privoxyFilterAction contained 26 27syn match privoxyAction "\%(add-header\|block\|content-type-overwrite\|crunch-client-header\|crunch-if-none-match\)\>" contained 28syn match privoxyAction "\%(crunch-incoming-cookies\|crunch-outgoing-cookies\|crunch-server-header\|deanimate-gifs\)\>" contained 29syn match privoxyAction "\%(downgrade-http-version\|fast-redirects\|filter-client-headers\|filter-server-headers\)\>" contained 30syn match privoxyAction "\%(filter\|force-text-mode\|handle-as-empty-document\|handle-as-image\)\>" contained 31syn match privoxyAction "\%(hide-accept-language\|hide-content-disposition\|hide-forwarded-for-headers\)\>" contained 32syn match privoxyAction "\%(hide-from-header\|hide-if-modified-since\|hide-referrer\|hide-user-agent\|inspect-jpegs\)\>" contained 33syn match privoxyAction "\%(kill-popups\|limit-connect\|overwrite-last-modified\|prevent-compression\|redirect\)\>" contained 34syn match privoxyAction "\%(send-vanilla-wafer\|send-wafer\|session-cookies-only\|set-image-blocker\)\>" contained 35syn match privoxyAction "\%(treat-forbidden-connects-like-blocks\)\>" 36 37syn match privoxyFilterAction "filter{[^}]*}" contained contains=privoxyFilterArg,privoxyActionBraces 38syn match privoxyActionBraces "[{}]" contained 39syn keyword privoxyFilterArg js-annoyances js-events html-annoyances content-cookies refresh-tags unsolicited-popups all-popups 40 \ img-reorder banners-by-size banners-by-link webbugs tiny-textforms jumping-windows frameset-borders demoronizer 41 \ shockwave-flash quicktime-kioskmode fun crude-parental ie-exploits site-specifics no-ping google yahoo msn blogspot 42 \ x-httpd-php-to-html html-to-xml xml-to-html hide-tor-exit-notation contained 43 44" Alternative spellings 45syn match privoxyAction "\%(kill-popup\|hide-referer\|prevent-keeping-cookies\)\>" contained 46 47" Pre-3.0 compatibility 48syn match privoxyAction "\%(no-cookie-read\|no-cookie-set\|prevent-reading-cookies\|prevent-setting-cookies\)\>" contained 49syn match privoxyAction "\%(downgrade\|hide-forwarded\|hide-from\|image\|image-blocker\|no-compression\)\>" contained 50syn match privoxyAction "\%(no-cookies-keep\|no-cookies-read\|no-cookies-set\|no-popups\|vanilla-wafer\|wafer\)\>" contained 51 52syn match privoxySetting "\<for-privoxy-version\>" 53 54syn match privoxyHeader "^\s*\zs{{\%(alias\|settings\)}}\ze\s*$" 55 56hi def link privoxyAction Identifier 57hi def link privoxyFilterAction Identifier 58hi def link privoxyActionLineDelimiter Delimiter 59hi def link privoxyDisabledPrefix SpecialChar 60hi def link privoxyEnabledPrefix SpecialChar 61hi def link privoxyHeader PreProc 62hi def link privoxySetting Identifier 63hi def link privoxyFilterArg Constant 64 65hi def link privoxyComment Comment 66hi def link privoxyTodo Todo 67 68let b:current_syntax = "privoxy" 69 70let &cpo = s:cpo_save 71unlet s:cpo_save 72