updated for version 7.1b

This commit is contained in:
Bram Moolenaar
2007-05-10 18:19:11 +00:00
parent 720c710091
commit 2c7a763832
26 changed files with 663 additions and 122 deletions

View File

@ -0,0 +1,491 @@
" Vim syntax file
" Language: FrameScript v4.0
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2007-02-22
if exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
syn match framescriptOperator
\ '[+*/%=-]\|[><]=\=\|#[&|]'
syn keyword framescriptTodo
\ contained
\ TODO FIXME XXX NOTE
syn cluster framescriptCommentGroup
\ contains=
\ framescriptTodo,
\ @Spell
syn match framescriptComment
\ display
\ contains=@framescriptCommentGroup
\ '//.*$'
syn region framescriptComment
\ contains=@framescriptCommentGroup
\ matchgroup=framescriptCommentStart
\ start='/\*'
\ end='\*/'
syn case ignore
syn match framescriptInclude
\ display
\ contains=framescriptIncluded
\ "^\s*<#Include\>\s*'"
syn region framescriptIncluded
\ contained
\ display
\ start=+'+
\ skip=+\\\\\|\\'+
\ end=+'+
syn match framescriptNumbers
\ display
\ transparent
\ contains=
\ framescriptInteger,
\ framescriptReal,
\ framescriptMetric,
\ framescriptCharacter
\ '\<\d\|\.\d'
syn keyword framescriptBoolean
\ True False
syn match framescriptInteger
\ contained
\ display
\ '\d\+\>'
syn match framescriptInteger
\ contained
\ display
\ '\x\+H\>'
syn match framescriptInteger
\ contained
\ display
\ '[01]\+B\>'
syn match framescriptReal
\ contained
\ display
\ '\d\+\.\d*\|\.\d\+\>'
syn match framescriptMetric
\ contained
\ display
\ '\%(\d\+\%(\.\d*\)\=\|\.\d\+\)\%(pts\|in\|"\|cm\|mm\|pica\)\>'
syn match framescriptCharacter
\ contained
\ display
\ '\d\+S\>'
syn region framescriptString
\ contains=framescriptStringSpecialChar,@Spell
\ start=+'+
\ skip=+\\\\\|\\'+
\ end=+'+
syn match framescriptStringSpecialChar
\ contained
\ display
\ "\\[\\']"
syn keyword framescriptConstant
\ BackSlash
\ CharCR
\ CharLF
\ CharTAB
\ ClientDir
\ ClientName
\ FslVersionMajor
\ FslVersionMinor
\ InstallName
\ InstalledScriptList
\ MainScript
\ NULL
\ ObjEndOffset
\ ProductRevision
\ Quote
\ ThisScript
syn keyword framescriptOperator
\ not
\ and
\ or
syn keyword framescriptSessionVariables
\ ErrorCode
\ ErrorMsg
\ DeclareVarMode
\ PlatformEncodingMode
syn keyword framescriptStructure
\ Event
\ EndEvent
syn keyword framescriptStatement
\ Sub
\ EndSub
\ Run
\ Function
\ EndFunction
\ Set
\ Add
\ Apply
\ CallClient
\ Close
\ Copy
\ Cut
\ DialogBox
\ Delete
\ Demote
\ Display
\ DocCompare
\ Export
\ Find
\ LeaveLoop
\ LeaveScript
\ LeaveSub
\ LoopNext
\ Merge
\ MsgBox
\ Paste
\ PopClipboard
\ PushClipboard
\ Read
\ Replace
\ Return
\ Sort
\ Split
syn keyword framescriptStatement
\ nextgroup=framescriptApplySubStatement skipwhite skipempty
\ Apply
syn keyword framescriptApplySubStatement
\ contained
\ Pagelayout
\ TextProperties
syn keyword framescriptStatement
\ nextgroup=framescriptClearSubStatement skipwhite skipempty
\ Clear
syn keyword framescriptClearSubStatement
\ contained
\ ChangeBars
\ Text
syn keyword framescriptStatement
\ nextgroup=framescriptCloseSubStatement skipwhite skipempty
\ Close
syn keyword framescriptCloseSubStatement
\ contained
\ Book
\ Document
\ TextFile
syn keyword framescriptStatement
\ nextgroup=framescriptExecSubStatement skipwhite skipempty
\ Exec
syn keyword framescriptExecSubStatement
\ contained
\ Compile
\ Script
\ Wait
syn keyword framescriptStatement
\ nextgroup=framescriptExecuteSubStatement skipwhite skipempty
\ Execute
syn keyword framescriptExecuteSubStatement
\ contained
\ FrameCommand
\ Hypertext
\ StartUndoCheckPoint
\ EndUndoCheckPoint
\ ClearUndoHistory
syn keyword framescriptStatement
\ nextgroup=framescriptGenerateSubStatement skipwhite skipempty
\ Generate
syn keyword framescriptGenerateSubStatement
\ contained
\ Bookfile
syn keyword framescriptStatement
\ nextgroup=framescriptGetSubStatement skipwhite skipempty
\ Get
syn keyword framescriptGetSubStatement
\ contained
\ Member
\ Object
\ String
\ TextList
\ TextProperties
syn keyword framescriptStatement
\ nextgroup=framescriptImportSubStatement skipwhite skipempty
\ Import
syn keyword framescriptImportSubStatement
\ contained
\ File
\ Formats
\ ElementDefs
syn keyword framescriptStatement
\ nextgroup=framescriptInstallSubStatement skipwhite skipempty
\ Install
\ Uninstall
syn keyword framescriptInstallSubStatement
\ contained
\ ChangeBars
\ Text
syn keyword framescriptStatement
\ nextgroup=framescriptNewSubStatement skipwhite skipempty
\ New
syn keyword framescriptNewSubStatement
\ contained
\ AFrame
\ Footnote
\ Marker
\ TiApiClient
\ Variable
\ XRef
\ FormatChangeList
\ FormatRule
\ FmtRuleClause
\ Arc
\ Ellipse
\ Flow
\ Group
\ Inset
\ Line
\ Math
\ Polygon
\ Polyline
\ Rectangle
\ RoundRect
\ TextFrame
\ Textline
\ UnanchoredFrame
\ Command
\ Menu
\ MenuItemSeparator
\ Book
\ CharacterFormat
\ Color
\ ConditionFormat
\ ElementDef
\ FormatChangeList
\ MarkerType
\ MasterPage
\ ParagraphFormat
\ PgfFmt
\ ReferencePAge
\ RulingFormat
\ TableFormat
\ VariableFormat
\ XRefFormat
\ BodyPage
\ BookComponent
\ Paragraph
\ Element
\ Attribute
\ AttributeDef
\ AttributeList
\ AttributeDefList
\ ElementLoc
\ ElementRange
\ Table
\ TableRows
\ TableCols
\ Text
\ Integer
\ Real
\ Metric
\ String
\ Object
\ TextLoc
\ TextRange
\ IntList
\ UIntList
\ MetricList
\ StringList
\ PointList
\ TabList
\ PropertyList
\ LibVar
\ ScriptVar
\ SubVar
\ TextFile
syn keyword framescriptStatement
\ nextgroup=framescriptOpenSubStatement skipwhite skipempty
\ Open
syn keyword framescriptOpenSubStatement
\ contained
\ Document
\ Book
\ TextFile
syn keyword framescriptStatement
\ nextgroup=framescriptPrintSubStatement skipwhite skipempty
\ Print
syn keyword framescriptPrintSubStatement
\ contained
\ Document
\ Book
syn keyword framescriptStatement
\ nextgroup=framescriptQuitSubStatement skipwhite skipempty
\ Quit
syn keyword framescriptQuitSubStatement
\ contained
\ Session
syn keyword framescriptStatement
\ nextgroup=framescriptRemoveSubStatement skipwhite skipempty
\ Remove
syn keyword framescriptRemoveSubStatement
\ contained
\ Attribute
\ CommandObject
syn keyword framescriptStatement
\ nextgroup=framescriptSaveSubStatement skipwhite skipempty
\ Save
syn keyword framescriptSaveSubStatement
\ contained
\ Document
\ Book
syn keyword framescriptStatement
\ nextgroup=framescriptSelectSubStatement skipwhite skipempty
\ Select
syn keyword framescriptSelectSubStatement
\ contained
\ TableCells
syn keyword framescriptStatement
\ nextgroup=framescriptStraddleSubStatement skipwhite skipempty
\ Straddle
syn keyword framescriptStraddleSubStatement
\ contained
\ TableCells
syn keyword framescriptStatement
\ nextgroup=framescriptUpdateSubStatement skipwhite skipempty
\ Update
syn keyword framescriptUpdateSubStatement
\ contained
\ ReDisplay
\ Formatting
\ Hyphenating
\ ResetEquationsSettings
\ ResetRefFrames
\ RestartPgfNums
\ TextInset
\ Variables
\ XRefs
\ Book
syn keyword framescriptStatement
\ nextgroup=framescriptWriteSubStatement skipwhite skipempty
\ Write
syn keyword framescriptUpdateSubStatement
\ contained
\ Console
\ Display
syn keyword framescriptRepeat
\ Loop
\ EndLoop
syn keyword framescriptConditional
\ If
\ ElseIf
\ Else
\ EndIf
syn keyword framescriptType
\ Local
\ GlobalVar
let b:framescript_minlines = exists("framescript_minlines")
\ ? framescript_minlines : 15
exec "syn sync ccomment framescriptComment minlines=" . b:framescript_minlines
hi def link framescriptTodo Todo
hi def link framescriptComment Comment
hi def link framescriptCommentStart framescriptComment
hi def link framescriptInclude Include
hi def link framescriptIncluded String
hi def link framescriptBoolean Boolean
hi def link framescriptNumber Number
hi def link framescriptInteger framescriptNumber
hi def link framescriptReal framescriptNumber
hi def link framescriptMetric framescriptNumber
hi def link framescriptCharacter framescriptNumber
hi def link framescriptString String
hi def link framescriptStringSpecialChar SpecialChar
hi def link framescriptConstant Constant
hi def link framescriptOperator None
hi def link framescriptSessionVariables PreProc
hi def link framescriptStructure Structure
hi def link framescriptStatement Statement
hi def link framescriptSubStatement Type
hi def link framescriptApplySubStatement framescriptSubStatement
hi def link framescriptClearSubStatement framescriptSubStatement
hi def link framescriptCloseSubStatement framescriptSubStatement
hi def link framescriptExecSubStatement framescriptSubStatement
hi def link framescriptExecuteSubStatement framescriptSubStatement
hi def link framescriptGenerateSubStatement framescriptSubStatement
hi def link framescriptGetSubStatement framescriptSubStatement
hi def link framescriptImportSubStatement framescriptSubStatement
hi def link framescriptInstallSubStatement framescriptSubStatement
hi def link framescriptNewSubStatement framescriptSubStatement
hi def link framescriptOpenSubStatement framescriptSubStatement
hi def link framescriptPrintSubStatement framescriptSubStatement
hi def link framescriptQuitSubStatement framescriptSubStatement
hi def link framescriptRemoveSubStatement framescriptSubStatement
hi def link framescriptSaveSubStatement framescriptSubStatement
hi def link framescriptSelectSubStatement framescriptSubStatement
hi def link framescriptStraddleSubStatement framescriptSubStatement
hi def link framescriptUpdateSubStatement framescriptSubStatement
hi def link framescriptRepeat Repeat
hi def link framescriptConditional Conditional
hi def link framescriptType Type
let b:current_syntax = "framescript"
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: indent(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
" Latest Revision: 2007-05-07
" indent_is_bsd: If exists, will change somewhat to match BSD implementation
"
" TODO: is the deny-all (a la lilo.vim nice or no?)...
@ -26,6 +26,20 @@ syn region indentComment start='/\*' end='\*/'
syn region indentComment start='//' skip='\\$' end='$'
\ contains=indentTodo,@Spell
syn match indentOptions '-\%(bli\|c\%([bl]i\|[dip]\)\=\|di\=\|ip\=\|lc\=\|pp\=i\|sbi\|ts\|-\%(brace-indent\|comment-indentation\|case-brace-indentation\|declaration-comment-column\|continuation-indentation\|case-indentation\|else-endif-column\|line-comments-indentation\|declaration-indentation\|indent-level\|parameter-indentation\|line-length\|comment-line-length\|paren-indentation\|preprocessor-indentation\|struct-brace-indentation\|tab-size\)\)'
\ nextgroup=indentNumber skipwhite skipnl
if !exists("indent_is_bsd")
syn match indentOptions '-i\|--indentation-level'
\ nextgroup=indentNumber skipwhite skipnl
endif
syn match indentNumber display contained '\d\+\>'
syn match indentOptions '-T'
\ nextgroup=indentIdent skipwhite skipnl
syn match indentIdent display contained '\h\w*\>'
syn keyword indentOptions -bacc --blank-lines-after-ifdefs
\ -bad --blank-lines-after-declarations
\ -badp --blank-lines-after-procedure-declarations
@ -41,8 +55,7 @@ syn keyword indentOptions -bacc --blank-lines-after-ifdefs
\ -br --braces-on-if-line
\ -brf --braces-on-func-def-line
\ -brs --braces-on-struct-decl-line
\ -bs --Bill-Shannon
\ -bs --blank-before-sizeof
\ -bs --Bill-Shannon --blank-before-sizeof
\ -c++ --c-plus-plus
\ -cdb --comment-delimiters-on-blank-lines
\ -cdw --cuddle-do-while
@ -53,12 +66,9 @@ syn keyword indentOptions -bacc --blank-lines-after-ifdefs
\ -fc1 --format-first-column-comments
\ -fca --format-all-comments
\ -gnu --gnu-style
\ -h --help
\ -h --usage
\ -h --help --usage
\ -hnl --honour-newlines
\ -kr --k-and-r-style
\ -kr --kernighan-and-ritchie
\ -kr --kernighan-and-ritchie-style
\ -kr --k-and-r-style --kernighan-and-ritchie --kernighan-and-ritchie-style
\ -lp --continue-at-parentheses
\ -lps --leave-preprocessor-space
\ -nbacc --no-blank-lines-after-ifdefs
@ -70,8 +80,7 @@ syn keyword indentOptions -bacc --blank-lines-after-ifdefs
\ -nbc --no-blank-lines-after-commas
\ -nbfda --dont-break-function-decl-args
\ -nbfde --dont-break-function-decl-args-end
\ -nbs --no-Bill-Shannon
\ -nbs --no-blank-before-sizeof
\ -nbs --no-Bill-Shannon --no-blank-before-sizeof
\ -ncdb --no-comment-delimiters-on-blank-lines
\ -ncdw --dont-cuddle-do-while
\ -nce --dont-cuddle-else
@ -81,11 +90,11 @@ syn keyword indentOptions -bacc --blank-lines-after-ifdefs
\ -nfc1 --dont-format-first-column-comments
\ -nfca --dont-format-comments
\ -nhnl --ignore-newlines
\ -nip --dont-indent-parameters
\ -nip --no-parameter-indentation
\ -nip --dont-indent-parameters --no-parameter-indentation
\ -nlp --dont-line-up-parentheses
\ -nlps --remove-preprocessor-space
\ -npcs --no-space-after-function-call-names
\ -npmt
\ -npro --ignore-profile
\ -nprs --no-space-after-parentheses
\ -npsl --dont-break-procedure-type
@ -99,10 +108,7 @@ syn keyword indentOptions -bacc --blank-lines-after-ifdefs
\ -nv --no-verbosity
\ -o --output
\ -o --output-file
\ -orig --berkeley
\ -orig --berkeley-style
\ -orig --original
\ -orig --original-style
\ -orig --berkeley --berkeley-style --original --original-style
\ -pcs --space-after-procedure-calls
\ -pmt --preserve-mtime
\ -prs --space-after-parentheses
@ -118,37 +124,6 @@ syn keyword indentOptions -bacc --blank-lines-after-ifdefs
\ -v --verbose
\ -version --version
syn keyword indentOptions -bli --brace-indent
\ -c --comment-indentation
\ -bli --brace-indent
\ -c --comment-indentation
\ -cbi --case-brace-indentation
\ -cd --declaration-comment-column
\ -ci --continuation-indentation
\ -cli --case-indentation
\ -cp --else-endif-column
\ -d --line-comments-indentation
\ -di --declaration-indentation
\ -i --indent-level
\ -ip --parameter-indentation
\ -l --line-length
\ -lc --comment-line-length
\ -pi --paren-indentation
\ -ppi --preprocessor-indentation
\ -sbi --struct-brace-indentation
\ -ts --tab-size
\ nextgroup=indenNumber skipwhite
if !exists("indent_is_bsd")
syn keyword indentOptions -i --indentation-level
\ nextgroup=indentNumber skipwhite
endif
syn match indentNumber display '\<\d\+\>'
syn keyword indentOptions -T nextgroup=indentIdent skipwhite
syn match indentIdent display '\<\h\w*\>'
if exists("indent_is_bsd")
syn keyword indentOptions -ip -nip -dj -ndj -ei -nei
endif

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: udev(8) rules file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
" Latest Revision: 2006-12-18
if exists("b:current_syntax")
finish
@ -10,21 +10,26 @@ endif
let s:cpo_save = &cpo
set cpo&vim
" TODO: Line continuations.
syn keyword udevrulesTodo contained TODO FIXME XXX NOTE
syn region udevrulesComment display oneline start='^\s*#' end='$'
\ contains=udevrulesTodo,@Spell
syn keyword udevrulesRuleKey BUS KERNEL SUBSYSTEM DRIVER ID RESULT
\ nextgroup=udevrulesRuleEq
syn keyword udevrulesRuleKey ACTION DEVPATH KERNEL SUBSYSTEM KERNELS
\ SUBSYSTEMS DRIVERS RESULT
\ nextgroup=udevrulesRuleTest
\ skipwhite
syn keyword udevrulesRuleKey SYSFS nextgroup=udevrulesSysFSPath
syn keyword udevrulesRuleKey ATTRS nextgroup=udevrulesAttrsPath
syn region udevrulesSysFSPath display transparent
syn region udevrulesAttrsPath display transparent
\ matchgroup=udevrulesDelimiter start='{'
\ matchgroup=udevrulesDelimiter end='}'
\ contains=udevrulesPath
\ nextgroup=udevrulesRuleEq
\ nextgroup=udevrulesRuleTest
\ skipwhite
syn keyword udevrulesRuleKey ENV nextgroup=udevrulesEnvVar
@ -32,16 +37,42 @@ syn region udevrulesEnvVar display transparent
\ matchgroup=udevrulesDelimiter start='{'
\ matchgroup=udevrulesDelimiter end='}'
\ contains=udevrulesVariable
\ nextgroup=udevrulesRuleEq
\ nextgroup=udevrulesRuleTest,udevrulesRuleEq
\ skipwhite
syn keyword udevrulesRuleKey PROGRAM
syn keyword udevrulesRuleKey PROGRAM RESULT
\ nextgroup=udevrulesEStringTest,udevrulesEStringEq
\ skipwhite
syn keyword udevrulesAssignKey NAME SYMLINK OWNER GROUP RUN
\ nextgroup=udevrulesEStringEq
\ skipwhite
syn keyword udevrulesAssignKey NAME SYMLINK OWNER GROUP
\ nextgroup=udevrulesEStringEq
syn keyword udevrulesAssignKey MODE
syn keyword udevrulesAssignKey MODE LABEL GOTO WAIT_FOR_SYSFS
\ nextgroup=udevrulesRuleEq
\ skipwhite
syn keyword udevrulesAssignKey ATTR nextgroup=udevrulesAttrsPath
syn region udevrulesAttrKey display transparent
\ matchgroup=udevrulesDelimiter start='{'
\ matchgroup=udevrulesDelimiter end='}'
\ contains=udevrulesKey
\ nextgroup=udevrulesRuleEq
\ skipwhite
syn keyword udevrulesAssignKey IMPORT nextgroup=udevrulesImport,
\ udevrulesEStringEq
\ skipwhite
syn region udevrulesImport display transparent
\ matchgroup=udevrulesDelimiter start='{'
\ matchgroup=udevrulesDelimiter end='}'
\ contains=udevrulesImportType
\ nextgroup=udevrulesEStringEq
\ skipwhite
syn keyword udevrulesImportType program file parent
syn keyword udevrulesAssignKey OPTIONS
\ nextgroup=udevrulesOptionsEq
@ -50,28 +81,48 @@ syn match udevrulesPath contained display '[^}]\+'
syn match udevrulesVariable contained display '[^}]\+'
syn match udevrulesRuleEq contained '[[:space:]=]'
syn match udevrulesRuleTest contained display '[=!:]='
\ nextgroup=udevrulesString skipwhite
syn match udevrulesEStringEq contained '[[:space:]=]'
syn match udevrulesEStringTest contained display '[=!+:]='
\ nextgroup=udevrulesEString skipwhite
syn match udevrulesOptionsEq contained '[[:space:]=]'
syn match udevrulesRuleEq contained display '+=\|=\ze[^=]'
\ nextgroup=udevrulesString skipwhite
syn match udevrulesEStringEq contained '+=\|=\ze[^=]'
\ nextgroup=udevrulesEString skipwhite
syn match udevrulesOptionsEq contained '+=\|=\ze[^=]'
\ nextgroup=udevrulesOptions skipwhite
syn region udevrulesEString contained display oneline start=+"+ end=+"+
\ contains=udevrulesStrEscapes
\ contains=udevrulesStrEscapes,udevrulesStrVars
syn match udevrulesStrEscapes contained '%[nkpMmbcNPe%]'
syn match udevrulesStrEscapes contained '%[knpbMmcPrN%]'
" TODO: This can actually stand alone (without {…}), so add a nextgroup here.
syn region udevrulesStrEscapes contained start='%c{' end='}'
\ contains=udevrulesStrNumber
syn region udevrulesStrEscapes contained start='%s{' end='}'
\ contains=udevrulesPath
syn region udevrulesStrEscapes contained start='%E{' end='}'
\ contains=udevrulesVariable
syn match udevrulesStrNumber contained '\d\++\='
syn match udevrulesStrVars contained display '$\%(kernel\|number\|devpath\|id\|major\|minor\|result\|parent\|root\|tempnode\)\>'
syn region udevrulesStrVars contained start='$attr{' end='}'
\ contains=udevrulesPath
syn region udevrulesStrVars contained start='$env{' end='}'
\ contains=udevrulesVariable
syn match udevrulesStrVars contained display '\$\$'
syn region udevrulesString contained display oneline start=+"+ end=+"+
\ contains=udevrulesPattern
@ -96,6 +147,7 @@ hi def link udevrulesDelimiter Delimiter
hi def link udevrulesAssignKey Identifier
hi def link udevrulesPath Identifier
hi def link udevrulesVariable Identifier
hi def link udevrulesAttrKey Identifier
" XXX: setting this to Operator makes for extremely intense highlighting.
hi def link udevrulesEq Normal
hi def link udevrulesRuleEq udevrulesEq
@ -104,12 +156,14 @@ hi def link udevrulesOptionsEq udevrulesEq
hi def link udevrulesEString udevrulesString
hi def link udevrulesStrEscapes SpecialChar
hi def link udevrulesStrNumber Number
hi def link udevrulesStrVars Identifier
hi def link udevrulesString String
hi def link udevrulesPattern SpecialChar
hi def link udevrulesPatRange SpecialChar
hi def link udevrulesOptions udevrulesString
hi def link udevrulesOption Type
hi def link udevrulesOptionSep Delimiter
hi def link udevrulesImportType Type
let b:current_syntax = "udevrules"