" Kind: Setup file for the editor "Vim" - "syntax file" " Language: Text - Colors for normal text editing " Maintainer: Sven Guckes " Latest change: Mo Sep 22 10:00:00 CEST 2014 " URL: http://www.guckes.net/vim/syntax/sven.vim " General remark: This file is a "Vim syntax file". " It contains definitions for text and sets the rules to colorize them. " The rules within this file give color to the following kinds of text: " Whitespace (sequences of space and/or tabs) at the end of lines, " whitespace at the end of lines, tab runs within the text, " high-bit characters (so I'll remember to convert them before I post on " Usenet thus avoiding base64 conversion). email addresses and URLs. " However, not everything is working as I had expected. " If you have a better solution then please let me know! " -- Sven vim-sven(at)guckes.net " ========================================================================== " Syntax Clear: Removes existing definitions/rules. " syn clear " Set the keyword characters " set isk=@,48-57,_,- " Define names for colored text: " source ~/.P/vim/syntax/colnames.vim " todo: Make color setting depend on the current background, ie " dark, light, or greyscale. " Spaces: Spaces in WhiteSpace - both at *start* and *end* of lines. " syn match Spaces contained " " " hi Spaces term=reverse ctermfg=Black ctermbg=DarkBlue " Tabs: Tabs anywhere in the text. " syn match Tabs "\t\+" " hi Tabs term=reverse ctermfg=Black ctermbg=DarkGreen " Escape " IndentWhitespace: WhiteSpace at *start* of lines. " syn match IndentWhitespace "^\s\+" contains=Spaces " syn match IndentWhitespace "^\s\+" " hi IndentWhitespace term=reverse ctermfg=Black ctermbg=DarkRed " TrailWhitespace: WhiteSpace at end of lines " syn match TrailWhitespace "\s\+$" contains=Spaces " hi TrailWhitespace term=reverse ctermfg=Black ctermbg=DarkRed " Attribution: String that reference the person you are quoting: " This usually shows name *and* address of that person. " My (current) favourite attribution has this format: " "* Name
[date time]:" syn match Attribution "^*.*:$" contains=AddressEmail hi Attribution term=underline ctermfg=Red ctermbg=black " Emphasis: Emphasized words with *asterisks* around. " syn match Emphasized "\*\w\+\*" " example: this text is *up-to-date* syn match Emphasized "\*\S\+\*" hi Emphasized term=underline ctermfg=Red ctermbg=black " Hyphenation: Dashes at the end of lines, indicating hyphenated words. syn match Hyphenation "\w\+-$" hi Hyphenation term=underline ctermfg=Red ctermbg=black " todo: Give the same coloring to the rest " of the hyphenated word on the next line. " Protected: Text that should not be broken like flow-text, eg tables. " syn match Protected "^|" " hi Protected term=underline ctermfg=Magenta ctermbg=black " PathFile: Filenames with leading path. " Examples: $HOME/.vimrc /usr/local/bin/gvim " and/or signiert/verschlüsselt syn match PathFile "[$~a-zA-Zäöüß0-9\/._-]*/[$~a-zA-Zäöüß0-9/._-]\+" hi PathFile term=underline ctermfg=Magenta ctermbg=Black " hi Quotations " Smileys: " Smileys :-) ;-) :-/ :-( " definition as keywords fails as the punctuation requires escaping. " syn match Smileys "[:;]-[()/]" " " Smileys :-) ;-) :-/ :-( :-P o_O syn match SmileysNose "\([:;]-[()/pP]\|o_O\)" hi SmileysNose term=reverse ctermfg=Yellow ctermbg=Black syn match SmileysShort "\(;)\|:)\)" hi SmileysShort term=reverse ctermfg=Yellow ctermbg=Black " Snails: \@ @/ Beware - they eat signatures! " syn match Snails "\\*@/*" syn match Snails "\(\\@\|@\/\)" hi Snails term=reverse ctermfg=Yellow ctermbg=Black " Underline: _Underlined_ words. syn match Underline "_\w\+_" hi Underline term=underline ctermfg=Green ctermbg=Black " EndOfSentence: " Problem: How to match this at the end of the line? " syn match EndOfSentence "[\.:;!?]\+ *" " hi EndOfSentence term=bold ctermfg=LightRed ctermbg=Black " problem: this hides trailing whitespace. " probably needs to be "contained" in TrailWhitespace to work. " ShellExample: " syn match ShellExample "^\s\+[$%#] .*" contains=PathFile syn match ShellExample "^\s\{,5}[$%#/\\].*" hi ShellExample term=underline ctermfg=Green ctermbg=Black " VimlExample: syn match VimExample "^\s\+:.*" contains=PathFile hi VimExample term=underline ctermfg=Green ctermbg=Black " SignOff: How I usually sign a message. " Example: "Sven [editing emails]" syn match SignOff "^Sven\(\s\+\[.*\]\)\?" contains=Smileys,programs hi SignOff term=underline ctermfg=Red ctermbg=Black " ====== " HEADER " ====== syn case ignore syn match HeaderDate contained "^Date: .*" hi HeaderDate ctermfg=LightBlue ctermbg=Black syn match HeaderRef contained "^\(In-Reply-To\|References\): .*" hi HeaderRef ctermfg=DarkBlue ctermbg=Black " Note: I have chosen dark colors here as I do not want to see thus line. " syn match HeaderSubject contained "^Subject: .*" contains=AddressWeb,AddressEmail,programs " hi HeaderSubject ctermfg=White ctermbg=Red " syn match HeaderNewsgroups contained "^Newsgroups: .*" contains=programs " hi HeaderNewsgroups ctermbg=Black ctermfg=Yellow " syn match HeaderXtra contained "^X-[a-zA-Z0-9\.-]: .*" contains=AddressWeb,AddressEmail,programs " syn match HeaderXtra contained "^X-\w\+: .*" contains=AddressWeb,AddressEmail,programs " hi HeaderXtra ctermfg=Red ctermbg=Black " colorize even when there is no space following the header line yet: " syn match HeaderAddress contained "^\(From\|To\|Cc\|Bcc\|Reply-To\):.*" contains=AddressEmail,TrailWhitespace " space required after the colon for colorization: " syn match HeaderAddress contained "^\(From\|To\|Cc\|Bcc\|Reply-To\): .*" contains=AddressEmail,TrailWhitespace " syn region HeaderAddress contained start="^\(From\|To\|Cc\|Bcc\|Reply-To\): .*" skip="^\s\+.*[^,]$" end="[^,]$"me=s-1 contains=AddressEmail,TrailWhitespace " syn region HeaderAddress contained start="^\(From\|To\|Cc\|Bcc\|Reply-To\): .*" skip=",$" end="[^,]$" contains=AddressEmail,TrailWhitespace " syn region HeaderAddress contained start="^\(From\|To\|Cc\|Bcc\|Reply-To\): .*" skip=",$" end="$" " hi HeaderAddress ctermfg=Green ctermbg=Black ""syn region Header start="^From " skip="^[ \t]" end="^[-A-Za-z0-9]*[^-A-Za-z0-9:]"me=s-1 end="^[^:]*$"me=s-1 end="^---*" contains=Header,HeaderSubject ""syn region Header start="^\(Newsgroups\|From\|To\|Cc\|Bcc\|Reply-To\|Subject\|Return-Path\|Received\|Date\|Replied\): " skip="^\s" end="^[-a-z0-9]*[^-a-z0-9:]"me=s-1 end="^[^:]*$"me=s-1 end="^---*" contains=HeaderAddress,HeaderSubject,HeaderDate,HeaderRef,HeaderXtra,Smileys,AddressEmail,AddressWeb ""syn region Header start="^\(From\|To\|Cc\|Bcc\|Reply-To\|Subject\|Message-Id\|Newsgroups\|Return-Path\|Received\|Date\|Replied\): " end="^$" contains=HeaderAddress,HeaderNewsgroups,HeaderSubject,HeaderDate,HeaderRef,HeaderXtra,Smileys,AddressEmail,AddressWeb ""syn region Header start="^[\w-]\+: " end="^$" contains=HeaderAddress,HeaderNewsgroups,HeaderSubject,HeaderDate,HeaderRef,HeaderXtra,Smileys,AddressEmail,AddressWeb " syn region Header start="^\(\w\|-\)\+: " end="^$" contains=HeaderAddress,HeaderNewsgroups,HeaderSubject,HeaderDate,HeaderRef,HeaderXtra,Smileys,AddressEmail,AddressWeb " hi Header ctermfg=Cyan guifg=Cyan " 2014-10-01 syn match MyHeaderReceived "^Received: .*" hi MyHeaderReceived ctermfg=grey ctermbg=black syn match MyHeaderAddress "^\(From\|To\|Cc\|Bcc\|\(In-\)*Reply-To\): *" hi MyHeaderAddress ctermfg=green ctermbg=black syn match MyHeaderSubjectRe "^Subject: Re: .*" hi MyHeaderSubjectRe ctermfg=white ctermbg=blue syn match MyHeaderSubject "^Subject: [^R]" hi MyHeaderSubject ctermfg=blue ctermbg=black syn match MyHeaderDate "^Date: .*" hi MyHeaderDate ctermfg=white ctermbg=red " Content-Transfer-Encoding: " Content-Disposition: " Content-Type: " Content-Description: syn match MyHeaderContent "^Content-\([A-Z][a-z]\+-*\)\+: .*" hi MyHeaderContent ctermfg=white ctermbg=red syn match MyHeaderEnvelope "^X-Envelope-\(From\|To\): .*" hi MyHeaderEnvelope ctermfg=white ctermbg=red " TODO: " Return-Path: " Delivered-To: " Mime-Version: " Message-Id: " References: " Status: " X-Mailer: " X-Scan-Signature: " X-Spam-Score: " X-Status: ""AddressEmail: Email addresses ""syn match AddressEmail "[a-zA-Z0-9\.-]\+@[a-zA-Z0-9\.-]\+" ""syn match AddressEmail contained "\(\k\|[._-]\)\+@\(\k\|[._-]\)\+" ""syn match AddressEmail "\(\k\|[._-]\)\+@\(\k\|[._-]\)\+" ""the following requires at least one dot in the string: " syn match AddressEmail "\(\k\|[._-]\)\+@\(\k\|[._-]\)\+\.\k\+" " hi AddressEmail term=underline ctermfg=Magenta ctermbg=Black ""AddressWeb: WWW addresses (aka URLs) ""syn match AddressURL contained "\(ftp\|http\|telnet\)://[a-zA-Z0-9\./~#-]\+" contains=programs " syn match AddressURL "\(ftp\|https\?\|telnet\)://\(\w\|[-=+./?&~#_]\)\+" contains=programs " syn match AddressURL "\(ftp\|https\?\|telnet\)://\(\w\|[-=+./?&~#_]\)\+" " removed "https": syn match AddressURL "\(ftp\|http\|telnet\)://\(\w\|[-=+.,;:!/%()?&~#_]\)\+" hi AddressURL term=underline ctermfg=Green ctermbg=Black " examples of addresses with questions marks, ampersands, colons, commas, and brackets: " http://ps.bahn.de/preissuche/preissuche/psc_angebotssuche.post;jsessionid=hNJg6nngit-y1ArR4kLBoIqh5NesqUghUn5Q4u1Lok4uKL11PHxi!1442431258?shopId=96113c&lang=de&country=Deutschland " http://www.berliner-zeitung.de/archiv/schoene-bescherung--die-kulturellen-hoehepunkte-am-weihnachtsabend-highligabend,10810590,10242418.html " http://www.openstreetmap.org/?mlat=51.045834&mlon=13.702084&zoom=16 " http://de.wikipedia.org/wiki/Datei:Tortilla_Concept_Map.png " http://en.wikipedia.org/wiki/Diaspora_(software) " 2012-12-16, 2013-07-23, 2014-10-05 " must also match URLs with colons inside, eg: " https://de.wikipedia.org/wiki/Wikipedia:WikiCon_2014 syn match AddressURLhttps "https://\(\w\|[-=+.:/?&~#_%]\)\+" hi AddressURLhttps term=underline ctermfg=White ctermbg=Blue " 2013-02-02 " museum syn match AddressDomain "\w\+\.\(\w\w\w\?\|info\|name\)" hi AddressDomain term=underline ctermfg=Yellow ctermbg=Black syn match AddressWeb "www\.\(\w\|[./~#_-]\)\+" hi AddressWeb term=underline ctermfg=Green ctermbg=Black syn match AddWebService "\(dns\|ftp\|irc\|mail\|news\|time\)\.\(\w\|[./~#_-]\)\+" hi AddWebService term=underline ctermfg=Green ctermbg=Black " ====== " BODY " ====== " Sigdashes: Lines that indicate the start of a signature, ie "-- ". " syn match Sigdashes "^-- $" contained " hi Sigdashes term=underline ctermfg=Red ctermbg=Grey " Signature: A proper signature (usually at the very end of the text). " syn region Signature start="^-- $" end="^$" contains=Sigdashes,8bitChars,TABS,TrailWhitespace,programs,sveng,AddressWeb,AddressEmail " hi Signature term=reverse ctermfg=Black ctermbg=Grey " QuotedSignature: A proper signature in quoted text. " Order: Must be defined *after* QuotedText! syn region QuotedSignature start="^[> ]\+-- *$" end="^[> ]*$" contains=8bitChars,TABS,TrailWhitespace,programs,sveng,AddressWeb,AddressEmail hi QuotedSignature term=reverse ctermfg=Magenta ctermbg=Grey " QuotedText: Properly quoted text (ie lines starting with "> "): " TODO: Add levels of quoting and colorize in alternate fashion. syn match QuotedText "^> .*" contains=8bitChars,TABS,TrailWhitespace,programs,sveng,AddressWeb,AddressEmail,QuotedSignature hi QuotedText ctermbg=Black ctermfg=Cyan guifg=Cyan " NormalText: Non-quoted text. " syn match NormalText "[^>].*" contains=Indentation,8bitChars,TABS,TrailWhitespace,programs,sveng,AddressWeb,AddressEmail,Signature " hi NormalText ctermfg= guifg= " ControlChars: Control characters except tabs (ASCII 1-8 10-31) " Example: [ ] (hmm, this somehow doen't work) " syn match ControlChars contained "[--]" "                      " syn match ControlChars "[--]" " syn match ControlChars "[ ]" " hi ControlChars ctermfg=Red guifg=Red " 8bitChars: Characters with 8th bit set (ASCII 128-255). " Example: [äöüæ¤] " syn match 8bitChars contained "[€-ÿ]" ""syn match 8bitChars "[€-ÿ]" ""hi 8bitChars ctermfg=Red guifg=Red " syn keyword programs elm irc less lynx mutt pine procmail screen slrn vim zsh " syn match programs "\(elm\|gvim\|irc\|less\|lynx\|mutt\|pine\|procmail\|screen\|slrn\|vim\|zsh\)\(\d\|[.-]\)*" " syn match programs "\(gvim\|irssi\|mutt\|screen\|slrn\|vim\|zsh\)" " match only complete words: syn match MyPrograms "\<\(gpg\|gvim\|irssi\|mosh\|mutt\|screen\|sed\|slrn\|vim\|zsh\)\>" hi MyPrograms ctermbg=Black ctermfg=Red guifg=Red " ====== " TEST " ====== " syn case ignore " syn keyword sveng Sven Guckes " hi sveng ctermbg=Red guibg=Red " 2010-01-15, 2010-01-17, 2010-01-28, 2014-11-05 " "YYYY MM DD" dates within ~/.cal.dat " also allow dashes, ie "YYYY-MM-DD" syn match Dates "20[01][0-9][- ]\(0[0-9]\|1[012]\)[- ]\(0[1-9]\|[12][0-9]\|3[01]\)" hi Dates term=reverse ctermfg=Red ctermbg=Black " 2012-11-24 added plus signs for date ranges, " eg 2012-12-27-30 and 2012-12-02+03 " syn match DateRange "20[01][0-9][- ]\(0[0-9]\|1[012]\)[- ]\(0[1-9]\|[12][0-9]\|3[01]\)[-+][0123][0-9]" " hi DateRange term=reverse ctermfg=Yellow ctermbg=Black " 2014-02-11 changed format of date ranges according to ISO 8601 " YYYY-MM-DD/DD (also lists YYYY-MM-DD--DD) " http://de.wikipedia.org/wiki/ISO_8601#Zeitspannen syn match DateRange "20[01][0-9][- ]\(0[0-9]\|1[012]\)[- ]\(0[1-9]\|[12][0-9]\|3[01]\)/[0123][0-9]" hi DateRange term=reverse ctermfg=Yellow ctermbg=Black " Times: "9:23" "12:07:42" "23:42h" "8h" "11-17h" " syn match Times "\d\d:\d\d" syn match Times "\(\d\d:\d\d:\d\d\|\d\?\d:\d\dh\?\|\d\dh\|\d\?\d-\d\?\dh\)" hi Times term=reverse ctermfg=Red ctermbg=Black " 2014-11-05 " example: 17:05-23:42 syn match TimeRange "\(\d\d:\d\d-\d\d:\d\d\)" hi TimeRange term=reverse ctermfg=yellow ctermbg=black " Color for ~/.cal.dat " syn match Monday "\d\d Mon\?" " hi Monday term=reverse ctermfg=yellow ctermbg=Black " syn match Tuesday "\d\d \(Tue\?\|Die\?\)" " hi Tuesday term=reverse ctermfg=Red ctermbg=Black " syn match Wednesday "\d\d \(Wed\?\|Mit\?\)" " hi Wednesday term=reverse ctermfg=magenta ctermbg=Black " syn match Thursday "\d\d \(Thu\?\|Don\?\)" " hi Thursday term=reverse ctermfg=blue ctermbg=Black " syn match Friday "\d\d \(Fri\?\|Fre\?\)" " hi Friday term=reverse ctermfg=green ctermbg=Black " syn match Saturday "\d\d \(Sat\?\|Sam\?\)" " hi Saturday term=reverse ctermfg=brown ctermbg=Black " syn match Sunday "\d\d \(Sun\?\|Son\?\)" " hi Sunday term=reverse ctermfg=black ctermbg=white " Color for ~/.cal.dat syn match Monday "^20[01]\d \d\d \d\d \(\d\d \)\? *Mon\?" hi Monday term=reverse ctermfg=yellow ctermbg=Black syn match Tuesday "^20[01]\d \d\d \d\d \(\d\d \)\? *\(Tue\?\|Die\?\)" hi Tuesday term=reverse ctermfg=Red ctermbg=Black syn match Wednesday "^20[01]\d \d\d \d\d \(\d\d \)\? *\(Wed\?\|Mit\?\)" hi Wednesday term=reverse ctermfg=magenta ctermbg=Black syn match Thursday "^20[01]\d \d\d \d\d \(\d\d \)\? *\(Thu\?\|Don\?\)" hi Thursday term=reverse ctermfg=blue ctermbg=Black syn match Friday "^20[01]\d \d\d \d\d \(\d\d \)\? *\(Fri\?\|Fre\?\)" hi Friday term=reverse ctermfg=green ctermbg=Black syn match Saturday "^20[01]\d \d\d \d\d \(\d\d \)\? *\(Sat\?\|Sam\?\)" hi Saturday term=reverse ctermfg=brown ctermbg=Black syn match Sunday "^20[01]\d \d\d \d\d \(\d\d \)\? *\(Sun\?\|Son\?\)" hi Sunday term=reverse ctermfg=black ctermbg=white " 2010-01-28 " too many matches on "die" and "mit" " syn match WeekDaysDE "\<\(Mon\|Die\|Mit\|Don\|Fri\|Sam\|Son\)\>" " hi WeekDaysDE term=reverse ctermfg=cyan ctermbg=black " syn match WeekDaysEN "\<\(Mon\|Tue\|Wed\|Thu\|Fri\|Sat\|Sun\)\>" " hi WeekDaysEN term=reverse ctermfg=magenta ctermbg=black " 2010-01-17 syn match mycomments "^["#] .*" hi mycomments term=reverse ctermfg=cyan ctermbg=black " 2010-01-17, 2010-01-19 " MyCitations are a pair of quotes ("") " containing a sequences of words (\w\+) " possibly followed by whitespace (\s*) " followed by at least one word (\w\+). " syn match MyCitations '"\(\w\+\s*\)*\w\+"' " hi MyCitations term=reverse ctermfg=cyan ctermbg=Black " " 2010-01-19, 2013-02-11 " Citations can have more than words.. eg punctuation and digits: " "this is a cited text" and 'this is also a cited text'. syn match MyCitations '"[^"]*"' hi MyCitations term=reverse ctermfg=cyan ctermbg=Black syn match MyCitations2 "'[^"]*'" hi MyCitations2 term=reverse ctermfg=cyan ctermbg=Black " 2010-01-17, 2014-01-10 " "10715, Berlin" syn match MyBerlin "\d\d\d\d\d,\= *Berlin" hi MyBerlin term=reverse ctermfg=blue ctermbg=Black " 2010-01-30, 2014-01-10 syn match MyPLZ "^\d\d\d\d\d,\= \S\+" hi MyPLZ term=reverse ctermfg=white ctermbg=red " 2010-01-30 " "foostrasse 23" "barstr. 42" "foobarstr. 23-42" " syn match MyStreet "\S\+\(strasse\|straße\)\s\+\d\+" syn match MyStreet "\S\+\s*\([sS]trasse\|[sS]traße\| *[sS]tr\.\)\s\+[-0-9]\+" hi MyStreet term=reverse ctermfg=yellow ctermbg=red " 2010-01-17 syn match MyArrows "\(<-\|->\)" hi MyArrows term=reverse ctermfg=yellow ctermbg=Black " 2010-01-17, 2010-01-28, 2010-06-04 syn match MyFonAT "+43-[-0-9.]\+" hi MyFonAT term=reverse ctermfg=yellow ctermbg=Black syn match MyFonDE "+49-[-0-9.]\+" hi MyFonDE term=reverse ctermfg=yellow ctermbg=Black syn match MyFonBerlin "+49-30-[-0-9.]\+" hi MyFonBerlin term=reverse ctermfg=red ctermbg=Black " 2010-01-17 syn match MyMail "\S\+@\S\+" hi MyMail term=reverse ctermfg=yellow ctermbg=Black " foo@bar " 2010-01-23 syn match MyWhazzup '\\o/' hi MyWhazzup term=reverse ctermfg=yellow ctermbg=Black " 2010-01-26 " dollar sign followed by at least three capital letters syn match MyVariable '\$[A-Z]\{3,}' hi MyVariable term=reverse ctermfg=magenta ctermbg=Black " 2010-02-10 syn match MyIP '\<\(\(1\?[0-9]\?[0-9]\|2[0-4][0-9]\|25[0-5]\)\.\)\{3}\(1\?[0-9]\?[0-9]\|2[0-4][0-9]\|25[0-5]\)\>' hi MyIP term=reverse ctermfg=magenta ctermbg=Black " 2010-10-24 syn match Topics '^\[.*\]$' hi Topics term=reverse ctermfg=black ctermbg=green " 2010-11-01 syn match MyWikiTitle1 '^= .* =$' hi MyWikiTitle1 term=reverse ctermfg=black ctermbg=green syn match MyWikiTitle2 '^== .* ==$' hi MyWikiTitle2 term=reverse ctermfg=black ctermbg=yellow syn match MyWikiTitle3 '^=== .* ===$' hi MyWikiTitle3 term=reverse ctermfg=black ctermbg=red " 2010-11-01 " syn match MyWikiVerbose '^ \S.*' " indented by two spaces, but excepting "shell prompts": syn match MyWikiVerbose '^ [^ %$#/].*' hi MyWikiVerbose term=reverse ctermfg=white ctermbg=blue " 2010-11-02, 2012-11-08 (added underscores) " also works for twitter account names " examples: @c-base @buero20 " syn match MyLocation "\<@\w\+\>" " syn match MyLocation "\<@[-_a-zA-Z]\+\>" syn match MyLocation "\<@[-_a-zA-Z0-9äöüß]\+\>" hi MyLocation term=reverse ctermfg=red ctermbg=black " 2010-11-03, 2014-01-06, 2014-01-30 " syn match MyDONETODO "\(done\|todo\)" " hi MyDONETODO term=reverse ctermfg=white ctermbg=red syn match MyDONE "\" hi MyDONE ctermfg=white ctermbg=red syn match MyTODO "\" hi MyTODO term=reverse ctermfg=white ctermbg=red " 2011-04-19 " example: " * list item1 syn match MyLists1 "^[-o*] " hi MyLists1 term=reverse ctermfg=white ctermbg=black syn match MyLists2 "^[-o*]\{2\} " hi MyLists2 term=reverse ctermfg=yellow ctermbg=black syn match MyListsSub "^ [-o*] " hi MyListsSub term=reverse ctermfg=white ctermbg=blue " 2011-12-20 syn match MyHashTag "#\w\+\>" hi MyHashTag term=reverse ctermfg=white ctermbg=blue " 2011-09-27 " syn match MyWikiWord "\<[A-Z][a-z]\+[A-Z][a-z]\+\>" " hi MyWikiWord ctermfg=yellow ctermbg=blue " NEW ============================================================= " 2010-11-23 syn match MyVimWord "[Vv]im" hi MyVimWord term=reverse ctermfg=white ctermbg=green " 2010-11-24, 2012-12-09 " syn match MyKeyWord "^\w\+:" " allow two words seperated by a space: " syn match MyKeyWord "^\w\+\( \w\+\)\?:" " disallow words to be followed by a slash " to avoid highlighting URLs (http://): syn match MyKeyWord "^\w\+\( \w\+\)\?:[^/]?" hi MyKeyWord term=reverse ctermfg=black ctermbg=white " MyHelp " 2012-12-09, 2014-10-10 syn match MyHelp "^\s*:h\(elp\)\?\s\+[-_.:a-zA-Z0-9]\+" hi MyHelp ctermfg=green ctermbg=black " 2014-02-11, 2014-03-18 Calendar syn match MyCalDeadline "\(^d!\|deadline!\)" hi MyCalDeadline ctermfg=red ctermbg=black syn match MyCalAttend "^s!" hi MyCalAttend ctermfg=blue ctermbg=black syn match MyCalTickets "^\$\+" hi MyCalTickets ctermfg=green ctermbg=black " 2014-05-18 syn match MyPGPkeys "\([0-9]\{4}[DR]/\)\?[0-9A-F]\{8}" hi MyPGPkeys ctermfg=yellow ctermbg=blue " 2014-08-08 " moving from one city to another "A->B" " example: 2014 08 27 00 Wed WIEN->WEIZ syn match MyJourney "\w\+->\w\+" hi MyJourney ctermfg=black ctermbg=yellow " 2014-09-22 " encrypted data; lines with 64 characters in base64 syn match MyGPGdata "^[a-zA-Z0-9+\/]\{64}$" hi MyGPGdata ctermfg=red ctermbg=white " syn match MyGPGdatafill "^[a-zA-Z0-9+\/]\{,63}=*$" hi MyGPGdatafill ctermfg=red ctermbg=white " syn match MyGPGdatahash "^=[a-zA-Z0-9+\/]\{4}$" hi MyGPGdatahash ctermfg=green ctermbg=black syn match MyPGPmesBEG "-----BEGIN PGP MESSAGE-----" syn match MyPGPmesEND "-----END PGP MESSAGE-----" hi MyPGPmesBEG ctermfg=yellow ctermbg=black hi MyPGPmesEND ctermfg=yellow ctermbg=black syn match MyPGPsigBEG "-----BEGIN PGP SIGNATURE-----" syn match MyPGPsigEND "-----END PGP SIGNATURE-----" hi MyPGPsigBEG ctermfg=yellow ctermbg=black hi MyPGPsigEND ctermfg=yellow ctermbg=black " mind you, "header" of signatures can be followed " by a "Version:" and a "Comment:" line. example: " -----BEGIN PGP SIGNATURE----- " Version: GnuPG v1.4.12 (GNU/Linux) " Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ " " TODO: create a multiline coloring for these. " 2014-09-22 " gpg/pgp fingerprints: " example: syn match MyGPGFP "\([0-9A-F]\{4} \)\{5}\( [0-9A-F]\{4}\)\{5}" hi MyGPGFP ctermfg=red ctermbg=white "fingerprint: [0-9A-F]{4} \){5}\( [0-9A-F]{4}\){5}" " 2014-09-22 " mail separator lines syn match MyMailSepNormal "^--[a-zA-Z0-9]\{33}\(--\)\=$" hi MyMailSepNormal ctermfg=black ctermbg=white " 2014-09-22 " mail separator lines for EnigMail? " example: "--------------enig9790562D98EB1CD7ABF63836" syn match MyMailSepEnigMail "^-\{14\}enig[A-Z0-9]\{24}\(--\)\=$" hi MyMailSepEnigMail ctermfg=black ctermbg=white " 2014-09-22 " mail separator lines for KMail " example: "--nextPart7094797.GLX3f24ptv" syn match MyMailSepKMail "^--nextPart\d\{7}.[a-zA-Z0-9]\{10}\(--\)\=$" hi MyMailSepKMail ctermfg=black ctermbg=white " 2014-09-22 Postfix? only 16chars - and allows plus signs " example: "..." (TODO) syn match MyMailSepPostfix "^--[+a-zA-Z0-9]\{16}\(--\)\=$" hi MyMailSepPostfix ctermfg=black ctermbg=white " 2014-09-22 another Postfix.. " example: "------------=_1410272212-13143-134" " example: "------------=_1410948644-7628-79" syn match MyMailSepPostfix2 "^------------=_[-0-9]\{18,20}\(--\)\=$" hi MyMailSepPostfix2 ctermfg=black ctermbg=white " 2014-09-22 " example: "--Apple-Mail=_198E51DD-0CFE-49EB-AD80-1E5E9D577929" syn match MyMailSepApple "^--Apple-Mail=[-_a-zA-Z0-9]\{37}\(--\)\=$" hi MyMailSepApple ctermfg=black ctermbg=white " filenames: " " User-Agent: caff 0.0.0.484 - http://pgp-tools.alioth.debian.org/ " Content-Type: application/pgp-encrypted; name="signedkey.msg" " Content-Type: application/octet-stream; name="msg.asc" " User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.7.0 " This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156) " Content-Type: application/octet-stream; name="encrypted.asc" " Content-Type: application/pgp-signature; name="signature.asc" " 2014-10-01 syn match MyBase64 "=20$" hi MyBase64 ctermfg=darkgrey ctermbg=black " 2014-10-11 syn match MyISBN13 "978[-0-9]\{,14\}" hi MyISBN13 ctermfg=yellow ctermbg=red " 2014-10-13 syn match MyKeyword "^\w\+:$" hi MyKeyword ctermfg=red ctermbg=black " 2014-10-14 " syn match MyPrices "\d\+,\d\+ *\(¿\|euro\)" syn match MyPrices "\d\+,\d\+¿" hi MyPrices ctermfg=red ctermbg=black " 2014-10-20, 2014-12-05 syn match MyPlaces "\<\(Berlin\|Hamburg\|Vienna\)\>" hi MyPlaces ctermfg=yellow ctermbg=black " 2014-11-03 syn match MyTags "" hi MyTags ctermfg=yellow ctermbg=black " 2014-11-03 syn match MyHTMLcomment "" hi MyHTMLcomment ctermfg=yellow ctermbg=black " 2014-11-03 syn region MyCitation start='^ ".' skip='^ .*[^"]$' end='."$' hi MyCitation ctermfg=blue ctermbg=black " syn region HeaderAddress contained start="^\(From\|To\|Cc\|Bcc\|Reply-To\): .*" skip="^\s\+.*[^,]$" end="[^,]$"me=s-1 contains=AddressEmail,TrailWhitespace " 2014-11-05 " ORR program: colors for room names syn match ORRraum1 "raum1" hi ORRraum1 ctermfg=yellow syn match ORRraum2 "raum2" hi ORRraum2 ctermfg=green syn match ORRraum3 "raum3" hi ORRraum3 ctermfg=red syn match ORRkessel "kessel" hi ORRkessel ctermfg=blue syn match ORRfoyer "foyer" hi ORRfoyer ctermfg=magenta let b:current_syntax = "sven" " The last line is a "modeline" - see ":help modelines"! " vim: set ts=8 tw=120 comments=n\:\" :EOF