updated for version 7.0020

This commit is contained in:
Bram Moolenaar
2004-10-24 19:18:58 +00:00
parent 47136d70fa
commit 009b2592f7
33 changed files with 3218 additions and 1957 deletions

View File

@ -1,13 +1,16 @@
" Vim syntax file
" Language: Pascal
" Version: 2.7
" Last Change: 2003 May 11
" Version: 2.8
" Last Change: 2004/10/17 17:47:30
" Maintainer: Xavier Cr<43>gut <xavier.cregut@enseeiht.fr>
" Previous Maintainer: Mario Eusebio <bio@dq.fct.unl.pt>
" Contributors: Tim Chase <tchase@csc.com>, Stas Grabois <stsi@vtrails.com>,
" Contributors: Tim Chase <tchase@csc.com>,
" Stas Grabois <stsi@vtrails.com>,
" Mazen NEIFER <mazen.neifer.2001@supaero.fr>,
" Klaus Hast <Klaus.Hast@arcor.net>
" Klaus Hast <Klaus.Hast@arcor.net>,
" Austin Ziegler <austin@halostatue.ca>,
" Markus Koenig <markus@stber-koenig.de>
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@ -34,7 +37,20 @@ syn keyword pascalType array boolean char integer file pointer real set
syn keyword pascalType string text variant
syn keyword pascalTodo contained TODO
" 20011222az: Added new items.
syn keyword pascalTodo contained TODO FIXME XXX DEBUG NOTE
" 20010723az: When wanted, highlight the trailing whitespace -- this is
" based on c_space_errors; to enable, use "pascal_space_errors".
if exists("pascal_space_errors")
if !exists("pascal_no_trail_space_error")
syn match pascalSpaceError "\s\+$"
endif
if !exists("pascal_no_tab_space_error")
syn match pascalSpaceError " \+\t"me=e-1
endif
endif
" String
@ -93,8 +109,7 @@ if exists("pascal_no_tabs")
syn match pascalShowTab "\t"
endif
syn region pascalComment start="(\*" end="\*)" contains=pascalTodo
syn region pascalComment start="{" end="}" contains=pascalTodo
syn region pascalComment start="(\*\|{" end="\*)\|}" contains=pascalTodo,pascalSpaceError
if !exists("pascal_no_functions")
@ -113,7 +128,7 @@ if !exists("pascal_no_functions")
if exists("pascal_traditional")
" These functions do not seem to be defined in Turbo Pascal
syn keyword pascalFunction Get Page Put
syn keyword pascalFunction Get Page Put
endif
" ordinal functions
@ -129,9 +144,9 @@ if !exists("pascal_traditional")
syn keyword pascalStatement constructor destructor implementation inherited
syn keyword pascalStatement interface unit uses
syn keyword pascalModifier absolute assembler external far forward inline
syn keyword pascalModifier interrupt near virtual
syn keyword pascalAcces private public
syn keyword pascalStruct object
syn keyword pascalModifier interrupt near virtual
syn keyword pascalAcces private public
syn keyword pascalStruct object
syn keyword pascalOperator shl shr xor
syn region pascalPreProc start="(\*\$" end="\*)" contains=pascalTodo
@ -151,7 +166,7 @@ if !exists("pascal_traditional")
endif
if exists("pascal_fpc")
syn region pascalComment start="//" end="$"
syn region pascalComment start="//" end="$" contains=pascalTodo,pascalSpaceError
syn keyword pascalStatement fail otherwise operator
syn keyword pascalDirective popstack
syn keyword pascalPredefined self
@ -165,7 +180,7 @@ if !exists("pascal_traditional")
endif
if exists("pascal_delphi")
syn region pascalComment start="//" end="$" contains=pascalTodo
syn region pascalComment start="//" end="$" contains=pascalTodo,pascalSpaceError
syn keyword pascalType SmallInt Int64
syn keyword pascalType Real48 Currency
syn keyword pascalType AnsiChar WideChar
@ -176,7 +191,7 @@ if !exists("pascal_traditional")
syn keyword pascalStruct class dispinterface
syn keyword pascalException try except raise at on finally
syn keyword pascalStatement out
syn keyword pascalStatement library package
syn keyword pascalStatement library package
syn keyword pascalStatement initialization finalization uses exports
syn keyword pascalStatement property out resourcestring threadvar
syn keyword pascalModifier contains
@ -248,7 +263,7 @@ if !exists("pascal_traditional")
syn keyword pascalConstant LightCyan LightRed LightMagenta Yellow White
syn keyword pascalConstant Blink ScreenWidth ScreenHeight bw40
syn keyword pascalConstant co40 bw80 co80 mono
syn keyword pascalPredefined TextChar
syn keyword pascalPredefined TextChar
" DOS unit
syn keyword pascalFunction AddDisk DiskFree DiskSize DosExitCode DosVersion
@ -333,6 +348,7 @@ if version >= 508 || !exists("did_pascal_syn_inits")
HiLink pascalPredefined pascalStatement
HiLink pascalPreProc PreProc
HiLink pascalRepeat Repeat
HiLink pascalSpaceError Error
HiLink pascalStatement Statement
HiLink pascalString String
HiLink pascalStringEscape Special

91
runtime/syntax/tpp.vim Normal file
View File

@ -0,0 +1,91 @@
" Vim syntax file
" Language: tpp - Text Presentation Program
" Maintainer: Gerfried Fuchs <alfie@ist.org>
" Filenames: *.tpp
" Last Change: 13. October 2004
" URL: http://alfie.ist.org/projects/vim/syntax/tpp.vim
" License: BSD
"
" Comments are very welcome - but please make sure that you are commenting on
" the latest version of this file.
" SPAM is _NOT_ welcome - be ready to be reported!
" 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
if !exists("main_syntax")
let main_syntax = 'tpp'
endif
"" list of the legal switches/options
syn match tppAbstractOptionKey contained "^--\%(author\|title\|date\) *" nextgroup=tppValue
syn match tppPageLocalOptionKey contained "^--\%(heading\|center\|right\|sleep\|huge\|exec\) *" nextgroup=tppValue
syn match tppPageLocalSwitchKey contained "^--\%(horline\|-\|\%(begin\|end\)\%(\%(shell\)\?output\|slide\%(left\|right\|top\|bottom\)\)\|\%(bold\|rev\|ul\)\%(on\|off\)\|withborder\)"
syn match tppNewPageOptionKey contained "^--newpage *" nextgroup=tppValue
syn match tppColorOptionKey contained "^--\%(\%(bg\|fg\)\?color\) *"
syn match tppTimeOptionKey contained "^--sleep *"
syn match tppValue contained ".*"
syn match tppColor contained "\%(white\|yellow\|red\|green\|blue\|cyan\|magenta\|black\)"
syn match tppTime contained "\d\+"
syn region tppPageLocalSwitch start="^--" end="$" contains=tppPageLocalSwitchKey oneline
syn region tppColorOption start="^--\%(\%(bg\|fg\)\?color\)" end="$" contains=tppColorOptionKey,tppColor oneline
syn region tppTimeOption start="^--sleep" end="$" contains=tppTimeOptionKey,tppTime oneline
syn region tppNewPageOption start="^--newpage" end="$" contains=tppNewPageOptionKey oneline
syn region tppPageLocalOption start="^--\%(heading\|center\|right\|sleep\|huge\|exec\)" end="$" contains=tppPageLocalOptionKey oneline
syn region tppAbstractOption start="^--\%(author\|title\|date\)" end="$" contains=tppAbstractOptionKey oneline
if main_syntax != 'sh'
" shell command
if version < 600
syn include @tppShExec <sfile>:p:h/sh.vim
else
syn include @tppShExec syntax/sh.vim
endif
unlet b:current_syntax
syn region shExec matchgroup=tppPageLocalOptionKey start='^--exec *' keepend end='$' contains=@tppShExec
endif
" 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_tpp_syn_inits")
if version < 508
let did_tpp_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink tppAbstractOptionKey Special
HiLink tppPageLocalOptionKey Keyword
HiLink tppPageLocalSwitchKey Keyword
HiLink tppColorOptionKey Keyword
HiLink tppTimeOptionKey Comment
HiLink tppNewPageOptionKey PreProc
HiLink tppValue String
HiLink tppColor String
HiLink tppTime Number
HiLink tppAbstractOption Error
HiLink tppPageLocalOption Error
HiLink tppPageLocalSwitch Error
HiLink tppColorOption Error
HiLink tppNewPageOption Error
HiLink tppTimeOption Error
delcommand HiLink
endif
let b:current_syntax = "tpp"
" vim: ts=8 sw=2