summaryrefslogtreecommitdiff
path: root/runtime/syntax
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2008-06-24 22:14:38 +0000
committerBram Moolenaar <Bram@vim.org>2008-06-24 22:14:38 +0000
commit864207de089119377a1e1e5d411307d8eb57399e (patch)
treed5bc119317f9c46d7136d1e12f06bac3b13d491b /runtime/syntax
parentc1a11ed54c7974b74be38f2aef6a200d7cfc878e (diff)
downloadvim-git-864207de089119377a1e1e5d411307d8eb57399e.tar.gz
updated for version 7.2a
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/dosbatch.vim22
-rw-r--r--runtime/syntax/gitconfig.vim38
-rw-r--r--runtime/syntax/haste.vim150
3 files changed, 199 insertions, 11 deletions
diff --git a/runtime/syntax/dosbatch.vim b/runtime/syntax/dosbatch.vim
index e27310cc9..8c0129933 100644
--- a/runtime/syntax/dosbatch.vim
+++ b/runtime/syntax/dosbatch.vim
@@ -2,7 +2,7 @@
" Language: MSDOS batch file (with NT command extensions)
" Maintainer: Mike Williams <mrw@eandem.co.uk>
" Filenames: *.bat
-" Last Change: 16th March 2004
+" Last Change: 10th May 2008
" Web Page: http://www.eandem.co.uk/mrw/vim
"
" Options Flags:
@@ -43,8 +43,8 @@ syn match dosbatchOperator "\s\(&\||\|^\|<<\|>>\)=\=\s"
syn match dosbatchIfOperator "if\s\+\(\(not\)\=\s\+\)\=\(exist\|defined\|errorlevel\|cmdextversion\)\="lc=2
" String - using "'s is a convenience rather than a requirement outside of FOR
-syn match dosbatchString "\"[^"]*\"" contains=dosbatchVariable,dosBatchArgument,@dosbatchNumber
-syn match dosbatchString "\<echo[^)>|]*"lc=4 contains=dosbatchVariable,dosbatchArgument,@dosbatchNumber
+syn match dosbatchString "\"[^"]*\"" contains=dosbatchVariable,dosBatchArgument,dosbatchSpecialChar,@dosbatchNumber,@Spell
+syn match dosbatchString "\<echo\([^)>|]\|\^\@<=[)>|]\)*"lc=4 contains=dosbatchVariable,dosbatchArgument,dosbatchSpecialChar,@dosbatchNumber,@Spell
syn match dosbatchEchoOperator "\<echo\s\+\(on\|off\)\s*$"lc=4
" For embedded commands
@@ -91,12 +91,12 @@ syn match dosbatchLabel "\<goto\s\+\h\w*\>"lc=4
syn match dosbatchLabel ":\h\w*\>"
" Comments - usual rem but also two colons as first non-space is an idiom
-syn match dosbatchComment "^rem\($\|\s.*$\)"lc=3 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument
-syn match dosbatchComment "\srem\($\|\s.*$\)"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument
-syn match dosbatchComment "\s*:\s*:.*$" contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument
+syn match dosbatchComment "^rem\($\|\s.*$\)"lc=3 contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
+syn match dosbatchComment "\srem\($\|\s.*$\)"lc=4 contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
+syn match dosbatchComment "\s*:\s*:.*$" contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
" Comments in ()'s - still to handle spaces before rem
-syn match dosbatchComment "(rem[^)]*"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument
+syn match dosbatchComment "(rem\([^)]\|\^\@<=)\)*"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
syn keyword dosbatchImplicit append assoc at attrib break cacls cd chcp chdir
syn keyword dosbatchImplicit chkdsk chkntfs cls cmd color comp compact convert copy
@@ -127,12 +127,12 @@ if version >= 508 || !exists("did_dosbatch_syntax_inits")
HiLink dosbatchConditional Conditional
HiLink dosbatchRepeat Repeat
- HiLink dosbatchOperator Operator
- HiLink dosbatchEchoOperator dosbatchOperator
- HiLink dosbatchIfOperator dosbatchOperator
+ HiLink dosbatchOperator Operator
+ HiLink dosbatchEchoOperator dosbatchOperator
+ HiLink dosbatchIfOperator dosbatchOperator
HiLink dosbatchArgument Identifier
- HiLink dosbatchIdentifier Identifier
+ HiLink dosbatchIdentifier Identifier
HiLink dosbatchVariable dosbatchIdentifier
HiLink dosbatchSpecialChar SpecialChar
diff --git a/runtime/syntax/gitconfig.vim b/runtime/syntax/gitconfig.vim
new file mode 100644
index 000000000..f44ce2b57
--- /dev/null
+++ b/runtime/syntax/gitconfig.vim
@@ -0,0 +1,38 @@
+" Vim syntax file
+" Language: git config file
+" Maintainer: Tim Pope <vimNOSPAM@tpope.info>
+" Filenames: gitconfig, .gitconfig, *.git/config
+" Last Change: 2008 Jun 04
+
+if exists("b:current_syntax")
+ finish
+endif
+
+setlocal iskeyword+=-
+setlocal iskeyword-=_
+syn case ignore
+syn sync minlines=10
+
+syn match gitconfigComment "[#;].*"
+syn match gitconfigSection "\%(^\s*\)\@<=\[[a-z0-9.-]\+\]"
+syn match gitconfigSection '\%(^\s*\)\@<=\[[a-z0-9.-]\+ \+\"\%([^\\"]\|\\.\)*"\]'
+syn match gitconfigVariable "\%(^\s*\)\@<=\a\k*\%(\s*\%([=#;]\|$\)\)\@=" nextgroup=gitconfigAssignment skipwhite
+syn region gitconfigAssignment matchgroup=gitconfigNone start=+=\s*+ skip=+\\+ end=+\s*$+ contained contains=gitconfigBoolean,gitconfigNumber,gitConfigString,gitConfigEscape,gitConfigError,gitconfigComment keepend
+syn keyword gitconfigBoolean true false yes no contained
+syn match gitconfigNumber "\d\+" contained
+syn region gitconfigString matchgroup=gitconfigDelim start=+"+ skip=+\\+ end=+"+ matchgroup=gitconfigError end=+[^\\"]\%#\@!$+ contained contains=gitconfigEscape,gitconfigEscapeError
+syn match gitconfigError +\\.+ contained
+syn match gitconfigEscape +\\[\\"ntb]+ contained
+syn match gitconfigEscape +\\$+ contained
+
+hi def link gitconfigComment Comment
+hi def link gitconfigSection Keyword
+hi def link gitconfigVariable Identifier
+hi def link gitconfigBoolean Boolean
+hi def link gitconfigNumber Number
+hi def link gitconfigString String
+hi def link gitconfigDelim Delimiter
+hi def link gitconfigEscape Delimiter
+hi def link gitconfigError Error
+
+let b:current_syntax = "gitconfig"
diff --git a/runtime/syntax/haste.vim b/runtime/syntax/haste.vim
new file mode 100644
index 000000000..cf943f108
--- /dev/null
+++ b/runtime/syntax/haste.vim
@@ -0,0 +1,150 @@
+" Vim syntax file
+" Language: HASTE
+" Maintainer: M. Tranchero - maurizio.tranchero?gmail.com
+" Credits: some parts have been taken from vhdl, verilog, and C syntax
+" files
+" version: 0.5
+
+" HASTE
+if exists("b:current_syntax")
+ finish
+endif
+" 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
+
+" case is significant
+syn case match
+
+" HASTE keywords
+syn keyword hasteStatement act alias arb array begin bitvec
+syn keyword hasteStatement bitwidth boolvec broad case
+syn keyword hasteStatement cast chan const dataprobe do edge
+syn keyword hasteStatement else end export false ff fi file
+syn keyword hasteStatement fit for forever func if import
+syn keyword hasteStatement inprobe is les main narb narrow
+syn keyword hasteStatement negedge od of or outprobe pas
+syn keyword hasteStatement posedge probe proc ram ramreg
+syn keyword hasteStatement repeat rom romreg sample sel si
+syn keyword hasteStatement sign sizeof skip stop then true
+syn keyword hasteStatement type until var wait wire
+syn keyword hasteFutureExt Z ffe partial
+syn keyword hasteVerilog buf reg while
+
+" Special match for "if", "or", and "else" since "else if"
+" and other "else+if" combination shouldn't be highlighted.
+" The right keyword is "or"
+syn match hasteStatement "\<\(if\|then\|else\|fi\)\>"
+syn match hasteNone "\<else\s\+if\>$"
+syn match hasteNone "\<else\s\+if\>\s"
+syn match hasteNone "\<elseif\>\s"
+syn match hasteNone "\<elsif\>\s"
+syn match hasteStatement "\<\(case\|is\|si\)\>"
+syn match hasteStatement "\<\(repeat\|until\)\>"
+syn match hasteStatement "\<\(forever\|do\|od\)\>"
+syn match hasteStatement "\<\(for\|do\|od\)\>"
+syn match hasteStatement "\<\(do\|or\|od\)\>"
+syn match hasteStatement "\<\(sel\|les\)\>"
+syn match hasteError "\<\d\+[_a-zA-Z]\+\>"
+
+" Predifined Haste types
+syn keyword hasteType bool
+
+" Values for standard Haste types
+" syn match hasteVector "\'[0L1HXWZU\-\?]\'"
+
+syn match hasteVector "0b\"[01_]\+\""
+syn match hasteVector "0x\"[0-9a-f_]\+\""
+syn match hasteCharacter "'.'"
+syn region hasteString start=+"+ end=+"+
+" C pre-processor directives
+"syn region hasteIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
+syn match hasteIncluded display contained "<[^>]*>"
+syn match hasteIncluded display contained "<[^"]*>"
+syn match hasteInclude display "^\s*#include\>\s*["<]" contains=hasteIncluded
+syn region hasteDefine start="^\s*\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" end="//"me=s-1 contains=ALLBUT,@hastePreProcGroup,@Spell
+syn region hasteDefine start="^\s*\(%:\|#\)\s*\(ifndef\|ifdef\|endif\)\>" skip="\\$" end="$" end="//"me=s-1 contains=@Spell
+syn region hastePreCondit start="^\s*\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1 contains=hasteComment,hasteCppString,hasteCharacter,hasteCppParen,hasteParenError,hasteNumbers,hasteCommentError,hasteSpaceError
+syn region hastePreProc start="^\s*\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@hastePreProcGroup,@Spell
+syn cluster hastePreProcGroup contains=hasteIncluded,hasteInclude,hasteDefine
+syn region hasteCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=hasteSpaceError,hasteCppSkip
+
+" floating numbers
+syn match hasteNumber "-\=\<\d\+\.\d\+\(E[+\-]\=\d\+\)\>"
+syn match hasteNumber "-\=\<\d\+\.\d\+\>"
+syn match hasteNumber "0*2#[01_]\+\.[01_]\+#\(E[+\-]\=\d\+\)\="
+syn match hasteNumber "0*16#[0-9a-f_]\+\.[0-9a-f_]\+#\(E[+\-]\=\d\+\)\="
+" integer numbers
+syn match hasteNumber "-\=\<\d\+\(E[+\-]\=\d\+\)\>"
+syn match hasteNumber "-\=\<\d\+\>"
+syn match hasteNumber "0*2#[01_]\+#\(E[+\-]\=\d\+\)\="
+syn match hasteNumber "0*16#[0-9a-f_]\+#\(E[+\-]\=\d\+\)\="
+" operators
+syn keyword hasteSeparators & , . \| :
+syn keyword hasteExecution \|\| ; @
+syn keyword hasteOperator := ? !
+syn keyword hasteTypeConstr "[" << >> .. "]" ~
+syn keyword hasteExprOp < <= >= > = # <> + - * == ##
+syn keyword hasteMisc ( ) 0x 0b
+"
+syn match hasteSeparators "[&:\|,.]"
+syn match hasteOperator ":="
+syn match hasteOperator "?"
+syn match hasteOperator "!"
+syn match hasteExecution "||"
+syn match hasteExecution ";"
+syn match hasteExecution "@"
+syn match hasteType "\[\["
+syn match hasteType "\]\]"
+syn match hasteType "<<"
+syn match hasteType ">>"
+syn match hasteExprOp "<"
+syn match hasteExprOp "<="
+syn match hasteExprOp ">="
+syn match hasteExprOp ">"
+syn match hasteExprOp "<>"
+syn match hasteExprOp "="
+syn match hasteExprOp "=="
+syn match hasteExprOp "##"
+syn match hasteExprOp "#"
+syn match hasteExprOp "*"
+syn match hasteExprOp "+"
+
+syn region hasteComment start="/\*" end="\*/" contains=@Spell
+syn region hasteComment start="{" end="}" contains=@Spell
+syn match hasteComment "//.*" contains=@Spell
+
+" Define the default highlighting.
+" Only when an item doesn't have highlighting yet
+hi def link hasteSpecial Special
+hi def link hasteStatement Statement
+hi def link hasteCharacter String
+hi def link hasteString String
+hi def link hasteVector String
+hi def link hasteBoolean String
+hi def link hasteComment Comment
+hi def link hasteNumber String
+hi def link hasteTime String
+hi def link hasteType Type
+hi def link hasteGlobal Error
+hi def link hasteError Error
+hi def link hasteAttribute Type
+hi def link hasteSeparators Special
+hi def link hasteExecution Special
+hi def link hasteTypeConstr Special
+hi def link hasteOperator Type
+hi def link hasteExprOp Type
+hi def link hasteMisc String
+hi def link hasteFutureExt Error
+hi def link hasteVerilog Error
+hi def link hasteDefine Macro
+hi def link hasteInclude Include
+hi def link hastePreProc PreProc
+
+let b:current_syntax = "haste"
+
+" vim: ts=8