diff options
author | David Robillard <d@drobilla.net> | 2010-12-01 06:05:29 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-12-01 06:05:29 +0000 |
commit | ea984b91ae477310ac7226fb56338a40531b07cb (patch) | |
tree | 0b7d3b14c1b33d6a6d8095706a12473b6e988324 /support/vim/syntax/tuplr.vim | |
parent | 5b9b071a8b59e6d66cc71c3c06a12bea3a0cebb7 (diff) | |
download | resp-ea984b91ae477310ac7226fb56338a40531b07cb.tar.gz resp-ea984b91ae477310ac7226fb56338a40531b07cb.tar.bz2 resp-ea984b91ae477310ac7226fb56338a40531b07cb.zip |
Update vim support files.
git-svn-id: http://svn.drobilla.net/resp/resp@274 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'support/vim/syntax/tuplr.vim')
-rw-r--r-- | support/vim/syntax/tuplr.vim | 166 |
1 files changed, 0 insertions, 166 deletions
diff --git a/support/vim/syntax/tuplr.vim b/support/vim/syntax/tuplr.vim deleted file mode 100644 index 7c47662..0000000 --- a/support/vim/syntax/tuplr.vim +++ /dev/null @@ -1,166 +0,0 @@ -" Vim syntax file -" Language: Tuplr -" Last Change: 2009 Apr 18 -" Maintainer: David Robillard <dave@drobilla.net> - -if version < 600 - syntax clear -elseif exists("b:current_syntax") - finish -endif - -" Fascist highlighting: everything that doesn't fit the rules is an error... - -"syn match tuplrError oneline ![^ \t()\[\]";]*! -syn match tuplrError oneline ")" - -" Quoted and backquoted stuff - -syn region tuplrQuoted matchgroup=Delimiter start="['`]" end=![ \t()\[\]";]!me=e-1 contains=ALLBUT,tuplrStruc,tuplrSyntax,tuplrFunc - -syn region tuplrQuoted matchgroup=Delimiter start="['`](" matchgroup=Delimiter end=")" contains=ALLBUT,tuplrStruc,tuplrSyntax,tuplrFunc -syn region tuplrQuoted matchgroup=Delimiter start="['`]#(" matchgroup=Delimiter end=")" contains=ALLBUT,tuplrStruc,tuplrSyntax,tuplrFunc - -syn region tuplrStrucRestricted matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALLBUT,tuplrStruc,tuplrSyntax,tuplrFunc -syn region tuplrStrucRestricted matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALLBUT,tuplrStruc,tuplrSyntax,tuplrFunc - -" Popular Scheme extension: -" using [] as well as () -syn region tuplrStrucRestricted matchgroup=Delimiter start="\[" matchgroup=Delimiter end="\]" contains=ALLBUT,tuplrStruc,tuplrSyntax,tuplrFunc -syn region tuplrStrucRestricted matchgroup=Delimiter start="#\[" matchgroup=Delimiter end="\]" contains=ALLBUT,tuplrStruc,tuplrSyntax,tuplrFunc - -syn region tuplrUnquote matchgroup=Delimiter start="," end=![ \t\[\]()";]!me=e-1 contains=ALLBUT,tuplrStruc,tuplrSyntax,tuplrFunc -syn region tuplrUnquote matchgroup=Delimiter start=",@" end=![ \t\[\]()";]!me=e-1 contains=ALLBUT,tuplrStruc,tuplrSyntax,tuplrFunc - -syn region tuplrUnquote matchgroup=Delimiter start=",(" end=")" contains=ALL -syn region tuplrUnquote matchgroup=Delimiter start=",@(" end=")" contains=ALL - -syn region tuplrUnquote matchgroup=Delimiter start=",#(" end=")" contains=ALLBUT,tuplrStruc,tuplrSyntax,tuplrFunc -syn region tuplrUnquote matchgroup=Delimiter start=",@#(" end=")" contains=ALLBUT,tuplrStruc,tuplrSyntax,tuplrFunc - -syn region tuplrUnquote matchgroup=Delimiter start=",\[" end="\]" contains=ALL -syn region tuplrUnquote matchgroup=Delimiter start=",@\[" end="\]" contains=ALL - -syn region tuplrUnquote matchgroup=Delimiter start=",#\[" end="\]" contains=ALLBUT,tuplrStruc,tuplrSyntax,tuplrFunc -syn region tuplrUnquote matchgroup=Delimiter start=",@#\[" end="\]" contains=ALLBUT,tuplrStruc,tuplrSyntax,tuplrFunc - -" R5RS Scheme Functions and Syntax: - -if version < 600 - set iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ -else - setlocal iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ -endif - -syn keyword tuplrSyntax fn def if match ns type -syn keyword tuplrFunc cons car cdr - -syn match tuplrTypeAnnotation ":[A-Z][a-zA-Z\.]*" -syn match tuplrTypeAnnotationExp ":([A-Z][a-zA-Z ]*)" -syn match tuplrType "[A-Z][a-zA-Z\.]*" -syn match tuplrPrefix "[a-z][a-z]*\." - -" ... so that a single + or -, inside a quoted context, would not be -" interpreted as a number (outside such contexts, it's a tuplrFunc) - -syn match tuplrDelimiter oneline !\.[ \t\[\]()";]!me=e-1 -syn match tuplrDelimiter oneline !\.$! -" ... and a single dot is not a number but a delimiter - -" This keeps all other stuff unhighlighted, except *stuff* and <stuff>: - -syn match tuplrOther oneline ,[a-z!$%&*/<=>?^_~+@#%-][-a-z!$%&*/:<=>?^_~0-9+.@#%]*, -"syn match tuplrError oneline ,[a-z!$%&*/:<=>?^_~+@#%-][-a-z!$%&*/:<=>?^_~0-9+.@#%]*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t\[\]()";]\+[^ \t\[\]()";]*, -" -"syn match tuplrOther oneline "\.\.\." -"syn match tuplrError oneline !\.\.\.[^ \t\[\]()";]\+! -"" ... a special identifier -" -"syn match tuplrConstant oneline ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*[ \t\[\]()";],me=e-1 -"syn match tuplrConstant oneline ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*$, -"syn match tuplrError oneline ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t\[\]()";]\+[^ \t\[\]()";]*, -" -"syn match tuplrConstant oneline ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[ \t\[\]()";],me=e-1 -"syn match tuplrConstant oneline ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>$, -"syn match tuplrError oneline ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[^-a-z!$%&*/:<=>?^_~0-9+.@ \t\[\]()";]\+[^ \t\[\]()";]*, - -" Non-quoted lists, and strings: - -syn region tuplrStruc matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALL -syn region tuplrStruc matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALL - -syn region tuplrStruc matchgroup=Delimiter start="\[" matchgroup=Delimiter end="\]" contains=ALL -syn region tuplrStruc matchgroup=Delimiter start="#\[" matchgroup=Delimiter end="\]" contains=ALL - -" Simple literals: -syn region tuplrString start=+\%(\\\)\@<!"+ skip=+\\[\\"]+ end=+"+ - -" Comments: - -syn match tuplrComment ";.*$" - - -" Writing out the complete description of Scheme numerals without -" using variables is a day's work for a trained secretary... - -syn match tuplrOther oneline ![+-][ \t\[\]()";]!me=e-1 -syn match tuplrOther oneline ![+-]$! -" -" This is a useful lax approximation: -syn match tuplrNumber oneline "[-#+0-9.][-#+/0-9a-f@i.boxesfdl]*" -syn match tuplrError oneline ![-#+0-9.][-#+/0-9a-f@i.boxesfdl]*[^-#+/0-9a-f@i.boxesfdl \t\[\]()";][^ \t\[\]()";]*! - -syn match tuplrBoolean oneline "#[tf]" -syn match tuplrError oneline !#[tf][^ \t\[\]()";]\+! - -syn match tuplrChar oneline "#\\" -syn match tuplrChar oneline "#\\." -syn match tuplrError oneline !#\\.[^ \t\[\]()";]\+! -syn match tuplrChar oneline "#\\space" -syn match tuplrError oneline !#\\space[^ \t\[\]()";]\+! -syn match tuplrChar oneline "#\\newline" -syn match tuplrError oneline !#\\newline[^ \t\[\]()";]\+! - -syn region tuplrComment start="#|" end="|#" - -" Synchronization and the wrapping up... - -syn sync match matchPlace grouphere NONE "^[^ \t]" -" ... i.e. synchronize on a line that starts at the left margin - -" Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_tuplr_syntax_inits") - if version < 508 - let did_tuplr_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - "HiLink tuplrPrefix Identifier - HiLink tuplrSyntax Statement - HiLink tuplrFunc Function - HiLink tuplrTypeAnnotation Type - HiLink tuplrTypeAnnotationExp Type - HiLink tuplrType Type - - HiLink tuplrString String - HiLink tuplrChar Character - HiLink tuplrNumber Number - HiLink tuplrBoolean Boolean - - HiLink tuplrDelimiter Delimiter - HiLink tuplrConstant Constant - - HiLink tuplrComment Comment - HiLink tuplrMultilineComment Comment - HiLink tuplrError Error - - HiLink tuplrExtSyntax Type - HiLink tuplrExtFunc PreProc - delcommand HiLink -endif - -let b:current_syntax = "tuplr" |