updated for version 7.1a
This commit is contained in:
@ -1,287 +1,367 @@
|
||||
" Vim syntax file
|
||||
" Language: Ada (95)
|
||||
" Maintainer: David A. Wheeler <dwheeler@dwheeler.com>
|
||||
" URL: http://www.dwheeler.com/vim
|
||||
" Last Change: 2001-11-02
|
||||
"----------------------------------------------------------------------------
|
||||
" Description: Vim Ada syntax file
|
||||
" Language: Ada (2005)
|
||||
" $Id$
|
||||
" Copyright: Copyright (C) 2006 Martin Krischik
|
||||
" Maintainer: Martin Krischik
|
||||
" David A. Wheeler <dwheeler@dwheeler.com>
|
||||
" Simon Bradley <simon.bradley@pitechnology.com>
|
||||
" Contributors: Preben Randhol.
|
||||
" $Author$
|
||||
" $Date$
|
||||
" Version: 4.2
|
||||
" $Revision$
|
||||
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/syntax/ada.vim $
|
||||
" http://www.dwheeler.com/vim
|
||||
" History: 24.05.2006 MK Unified Headers
|
||||
" 26.05.2006 MK ' should not be in iskeyword.
|
||||
" 16.07.2006 MK Ada-Mode as vim-ball
|
||||
" 02.10.2006 MK Better folding.
|
||||
" 15.10.2006 MK Bram's suggestion for runtime integration
|
||||
" 05.11.2006 MK Spell check for comments and strings only
|
||||
" 05.11.2006 MK Bram suggested to save on spaces
|
||||
" Help Page: help ft-ada-syntax
|
||||
"------------------------------------------------------------------------------
|
||||
" The formal spec of Ada 2005 (ARM) is the "Ada 2005 Reference Manual".
|
||||
" For more Ada 2005 info, see http://www.gnuada.org and http://www.adapower.com.
|
||||
"
|
||||
" This vim syntax file works on vim 7.0 only and makes use of most of Voim 7.0
|
||||
" advanced features.
|
||||
"------------------------------------------------------------------------------
|
||||
|
||||
" Former Maintainer: Simon Bradley <simon.bradley@pitechnology.com>
|
||||
" (was <sib93@aber.ac.uk>)
|
||||
" Other contributors: Preben Randhol.
|
||||
" The formal spec of Ada95 (ARM) is the "Ada95 Reference Manual".
|
||||
" For more Ada95 info, see http://www.gnuada.org and http://www.adapower.com.
|
||||
|
||||
" This vim syntax file works on vim 5.6, 5.7, 5.8 and 6.x.
|
||||
" It implements Bram Moolenaar's April 25, 2001 recommendations to make
|
||||
" the syntax file maximally portable across different versions of vim.
|
||||
" If vim 6.0+ is available,
|
||||
" this syntax file takes advantage of the vim 6.0 advanced pattern-matching
|
||||
" functions to avoid highlighting uninteresting leading spaces in
|
||||
" some expressions containing "with" and "use".
|
||||
|
||||
" 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
|
||||
if exists("b:current_syntax") || version < 700
|
||||
finish
|
||||
endif
|
||||
|
||||
" Ada is entirely case-insensitive.
|
||||
syn case ignore
|
||||
let b:current_syntax = "ada"
|
||||
|
||||
" We don't need to look backwards to highlight correctly;
|
||||
" this speeds things up greatly.
|
||||
syn sync minlines=1 maxlines=1
|
||||
" Section: Ada is entirely case-insensitive. {{{1
|
||||
"
|
||||
syntax case ignore
|
||||
setlocal nosmartcase
|
||||
setlocal ignorecase
|
||||
|
||||
" Highlighting commands. There are 69 reserved words in total in Ada95.
|
||||
" Some keywords are used in more than one way. For example:
|
||||
" Section: Highlighting commands {{{1
|
||||
"
|
||||
" There are 72 reserved words in total in Ada2005. Some keywords are
|
||||
" used in more than one way. For example:
|
||||
" 1. "end" is a general keyword, but "end if" ends a Conditional.
|
||||
" 2. "then" is a conditional, but "and then" is an operator.
|
||||
"
|
||||
for b:Item in g:ada#Keywords
|
||||
" Standard Exceptions (including I/O).
|
||||
" We'll highlight the standard exceptions, similar to vim's Python mode.
|
||||
" It's possible to redefine the standard exceptions as something else,
|
||||
" but doing so is very bad practice, so simply highlighting them makes sense.
|
||||
if b:Item['kind'] == "x"
|
||||
execute "syntax keyword adaException " . b:Item['word']
|
||||
endif
|
||||
if b:Item['kind'] == "a"
|
||||
execute 'syntax match adaAttribute "\V' . b:Item['word'] . '"'
|
||||
endif
|
||||
" We don't normally highlight types in package Standard
|
||||
" (Integer, Character, Float, etc.). I don't think it looks good
|
||||
" with the other type keywords, and many Ada programs define
|
||||
" so many of their own types that it looks inconsistent.
|
||||
" However, if you want this highlighting, turn on "ada_standard_types".
|
||||
" For package Standard's definition, see ARM section A.1.
|
||||
if b:Item['kind'] == "t" && exists ("g:ada_standard_types")
|
||||
execute "syntax keyword adaBuiltinType " . b:Item['word']
|
||||
endif
|
||||
endfor
|
||||
|
||||
" Section: others {{{1
|
||||
"
|
||||
syntax keyword adaLabel others
|
||||
|
||||
" Standard Exceptions (including I/O).
|
||||
" We'll highlight the standard exceptions, similar to vim's Python mode.
|
||||
" It's possible to redefine the standard exceptions as something else,
|
||||
" but doing so is very bad practice, so simply highlighting them makes sense.
|
||||
syn keyword adaException Constraint_Error Program_Error Storage_Error
|
||||
syn keyword adaException Tasking_Error
|
||||
syn keyword adaException Status_Error Mode_Error Name_Error Use_Error
|
||||
syn keyword adaException Device_Error End_Error Data_Error Layout_Error
|
||||
syn keyword adaException Length_Error Pattern_Error Index_Error
|
||||
syn keyword adaException Translation_Error
|
||||
syn keyword adaException Time_Error Argument_Error
|
||||
syn keyword adaException Tag_Error
|
||||
syn keyword adaException Picture_Error
|
||||
" Interfaces
|
||||
syn keyword adaException Terminator_Error Conversion_Error
|
||||
syn keyword adaException Pointer_Error Dereference_Error Update_Error
|
||||
" This isn't in the Ada spec, but a GNAT extension.
|
||||
syn keyword adaException Assert_Failure
|
||||
" We don't list ALL exceptions defined in particular compilers (e.g., GNAT),
|
||||
" because it's quite reasonable to define those phrases as non-exceptions.
|
||||
" Section: Operatoren {{{1
|
||||
"
|
||||
syntax keyword adaOperator abs mod not rem xor
|
||||
syntax match adaOperator "\<and\>"
|
||||
syntax match adaOperator "\<and\s\+then\>"
|
||||
syntax match adaOperator "\<or\>"
|
||||
syntax match adaOperator "\<or\s\+else\>"
|
||||
syntax match adaOperator "[-+*/<>&]"
|
||||
syntax keyword adaOperator **
|
||||
syntax match adaOperator "[/<>]="
|
||||
syntax keyword adaOperator =>
|
||||
syntax match adaOperator "\.\."
|
||||
syntax match adaOperator "="
|
||||
|
||||
" Section: <> {{{1
|
||||
"
|
||||
" Handle the box, <>, specially:
|
||||
"
|
||||
syntax keyword adaSpecial <>
|
||||
|
||||
" We don't normally highlight types in package Standard
|
||||
" (Integer, Character, Float, etc.). I don't think it looks good
|
||||
" with the other type keywords, and many Ada programs define
|
||||
" so many of their own types that it looks inconsistent.
|
||||
" However, if you want this highlighting, turn on "ada_standard_types".
|
||||
" For package Standard's definition, see ARM section A.1.
|
||||
|
||||
if exists("ada_standard_types")
|
||||
syn keyword adaBuiltinType Boolean Integer Natural Positive Float
|
||||
syn keyword adaBuiltinType Character Wide_Character
|
||||
syn keyword adaBuiltinType String Wide_String
|
||||
syn keyword adaBuiltinType Duration
|
||||
" These aren't listed in ARM section A.1's code, but they're noted as
|
||||
" options in ARM sections 3.5.4 and 3.5.7:
|
||||
syn keyword adaBuiltinType Short_Integer Short_Short_Integer
|
||||
syn keyword adaBuiltinType Long_Integer Long_Long_Integer
|
||||
syn keyword adaBuiltinType Short_Float Short_Short_Float
|
||||
syn keyword adaBuiltinType Long_Float Long_Long_Float
|
||||
" Section: rainbow color {{{1
|
||||
"
|
||||
if exists("g:ada_rainbow_color")
|
||||
syntax match adaSpecial "[:;.,]"
|
||||
runtime plugin/Rainbow_Parenthsis.vim
|
||||
else
|
||||
syntax match adaSpecial "[:;().,]"
|
||||
endif
|
||||
|
||||
" There are MANY other predefined types; they've not been added, because
|
||||
" determining when they're a type requires context in general.
|
||||
" One potential addition would be Unbounded_String.
|
||||
|
||||
|
||||
syn keyword adaLabel others
|
||||
|
||||
syn keyword adaOperator abs mod not rem xor
|
||||
syn match adaOperator "\<and\>"
|
||||
syn match adaOperator "\<and\s\+then\>"
|
||||
syn match adaOperator "\<or\>"
|
||||
syn match adaOperator "\<or\s\+else\>"
|
||||
syn match adaOperator "[-+*/<>&]"
|
||||
syn keyword adaOperator **
|
||||
syn match adaOperator "[/<>]="
|
||||
syn keyword adaOperator =>
|
||||
syn match adaOperator "\.\."
|
||||
syn match adaOperator "="
|
||||
|
||||
" Section: := {{{1
|
||||
"
|
||||
" We won't map "adaAssignment" by default, but we need to map ":=" to
|
||||
" something or the "=" inside it will be mislabelled as an operator.
|
||||
" Note that in Ada, assignment (:=) is not considered an operator.
|
||||
syn match adaAssignment ":="
|
||||
"
|
||||
syntax match adaAssignment ":="
|
||||
|
||||
" Handle the box, <>, specially:
|
||||
syn keyword adaSpecial <>
|
||||
" Section: Numbers, including floating point, exponents, and alternate bases. {{{1
|
||||
"
|
||||
syntax match adaNumber "\<\d[0-9_]*\(\.\d[0-9_]*\)\=\([Ee][+-]\=\d[0-9_]*\)\=\>"
|
||||
syntax match adaNumber "\<\d\d\=#\x[0-9A-Fa-f_]*\(\.\x[0-9A-Fa-f_]*\)\=#\([Ee][+-]\=\d[0-9_]*\)\="
|
||||
|
||||
" Numbers, including floating point, exponents, and alternate bases.
|
||||
syn match adaNumber "\<\d[0-9_]*\(\.\d[0-9_]*\)\=\([Ee][+-]\=\d[0-9_]*\)\=\>"
|
||||
syn match adaNumber "\<\d\d\=#\x[0-9A-Fa-f_]*\(\.\x[0-9A-Fa-f_]*\)\=#\([Ee][+-]\=\d[0-9_]*\)\="
|
||||
" Section: Identify leading numeric signs {{{1
|
||||
"
|
||||
" In "A-5" the "-" is an operator, " but in "A:=-5" the "-" is a sign. This
|
||||
" handles "A3+-5" (etc.) correctly. " This assumes that if you put a
|
||||
" don't put a space after +/- when it's used " as an operator, you won't
|
||||
" put a space before it either -- which is true " in code I've seen.
|
||||
"
|
||||
syntax match adaSign "[[:space:]<>=(,|:;&*/+-][+-]\d"lc=1,hs=s+1,he=e-1,me=e-1
|
||||
|
||||
" Identify leading numeric signs. In "A-5" the "-" is an operator,
|
||||
" but in "A:=-5" the "-" is a sign. This handles "A3+-5" (etc.) correctly.
|
||||
" This assumes that if you put a don't put a space after +/- when it's used
|
||||
" as an operator, you won't put a space before it either -- which is true
|
||||
" in code I've seen.
|
||||
syn match adaSign "[[:space:]<>=(,|:;&*/+-][+-]\d"lc=1,hs=s+1,he=e-1,me=e-1
|
||||
|
||||
" Labels for the goto statement.
|
||||
syn region adaLabel start="<<" end=">>"
|
||||
" Section: Labels for the goto statement. {{{1
|
||||
"
|
||||
syntax region adaLabel start="<<" end=">>"
|
||||
|
||||
" Section: Boolean Constants {{{1
|
||||
" Boolean Constants.
|
||||
syn keyword adaBoolean true false
|
||||
syntax keyword adaBoolean true false
|
||||
|
||||
" Section: Warn C/C++ {{{1
|
||||
"
|
||||
" Warn people who try to use C/C++ notation erroneously:
|
||||
syn match adaError "//"
|
||||
syn match adaError "/\*"
|
||||
syn match adaError "=="
|
||||
"
|
||||
syntax match adaError "//"
|
||||
syntax match adaError "/\*"
|
||||
syntax match adaError "=="
|
||||
|
||||
|
||||
if exists("ada_space_errors")
|
||||
if !exists("ada_no_trail_space_error")
|
||||
syn match adaSpaceError excludenl "\s\+$"
|
||||
endif
|
||||
if !exists("ada_no_tab_space_error")
|
||||
syn match adaSpaceError " \+\t"me=e-1
|
||||
endif
|
||||
" Section: Space Errors {{{1
|
||||
"
|
||||
if exists("g:ada_space_errors")
|
||||
if !exists("g:ada_no_trail_space_error")
|
||||
syntax match adaSpaceError excludenl "\s\+$"
|
||||
endif
|
||||
if !exists("g:ada_no_tab_space_error")
|
||||
syntax match adaSpaceError " \+\t"me=e-1
|
||||
endif
|
||||
if !exists("g:ada_all_tab_usage")
|
||||
syntax match adaSpecial "\t"
|
||||
endif
|
||||
endif
|
||||
|
||||
" Section: end {{{1
|
||||
" Unless special ("end loop", "end if", etc.), "end" marks the end of a
|
||||
" begin, package, task etc. Assiging it to adaEnd.
|
||||
syn match adaEnd "\<end\>"
|
||||
syntax match adaEnd "\<end\>"
|
||||
|
||||
syn keyword adaPreproc pragma
|
||||
syntax keyword adaPreproc pragma
|
||||
|
||||
syn keyword adaRepeat exit for loop reverse while
|
||||
syn match adaRepeat "\<end\s\+loop\>"
|
||||
syntax keyword adaRepeat exit for loop reverse while
|
||||
syntax match adaRepeat "\<end\s\+loop\>"
|
||||
|
||||
syn keyword adaStatement accept delay goto raise requeue return
|
||||
syn keyword adaStatement terminate
|
||||
syn match adaStatement "\<abort\>"
|
||||
syntax keyword adaStatement accept delay goto raise requeue return
|
||||
syntax keyword adaStatement terminate
|
||||
syntax match adaStatement "\<abort\>"
|
||||
|
||||
" Handle Ada's record keywords.
|
||||
" Section: Handle Ada's record keywords. {{{1
|
||||
"
|
||||
" 'record' usually starts a structure, but "with null record;" does not,
|
||||
" and 'end record;' ends a structure. The ordering here is critical -
|
||||
" 'record;' matches a "with null record", so make it a keyword (this can
|
||||
" match when the 'with' or 'null' is on a previous line).
|
||||
" We see the "end" in "end record" before the word record, so we match that
|
||||
" pattern as adaStructure (and it won't match the "record;" pattern).
|
||||
syn match adaStructure "\<record\>"
|
||||
syn match adaStructure "\<end\s\+record\>"
|
||||
syn match adaKeyword "\<record;"me=e-1
|
||||
"
|
||||
syntax match adaStructure "\<record\>" contains=adaRecord
|
||||
syntax match adaStructure "\<end\s\+record\>" contains=adaRecord
|
||||
syntax match adaKeyword "\<record;"me=e-1
|
||||
|
||||
syn keyword adaStorageClass abstract access aliased array at constant delta
|
||||
syn keyword adaStorageClass digits limited of private range tagged
|
||||
syn keyword adaTypedef subtype type
|
||||
" Section: type classes {{{1
|
||||
"
|
||||
syntax keyword adaStorageClass abstract access aliased array at constant delta
|
||||
syntax keyword adaStorageClass digits limited of private range tagged
|
||||
syntax keyword adaStorageClass interface synchronized
|
||||
syntax keyword adaTypedef subtype type
|
||||
|
||||
" Conditionals. "abort" after "then" is a conditional of its own.
|
||||
syn match adaConditional "\<then\>"
|
||||
syn match adaConditional "\<then\s\+abort\>"
|
||||
syn match adaConditional "\<else\>"
|
||||
syn match adaConditional "\<end\s\+if\>"
|
||||
syn match adaConditional "\<end\s\+case\>"
|
||||
syn match adaConditional "\<end\s\+select\>"
|
||||
syn keyword adaConditional if case select
|
||||
syn keyword adaConditional elsif when
|
||||
" Section: Conditionals {{{1
|
||||
"
|
||||
" "abort" after "then" is a conditional of its own.
|
||||
"
|
||||
syntax match adaConditional "\<then\>"
|
||||
syntax match adaConditional "\<then\s\+abort\>"
|
||||
syntax match adaConditional "\<else\>"
|
||||
syntax match adaConditional "\<end\s\+if\>"
|
||||
syntax match adaConditional "\<end\s\+case\>"
|
||||
syntax match adaConditional "\<end\s\+select\>"
|
||||
syntax keyword adaConditional if case select
|
||||
syntax keyword adaConditional elsif when
|
||||
|
||||
syn keyword adaKeyword all do exception in is new null out
|
||||
syn keyword adaKeyword separate until
|
||||
" Section: other keywords {{{1
|
||||
syntax match adaKeyword "\<is\>" contains=adaRecord
|
||||
syntax keyword adaKeyword all do exception in new null out
|
||||
syntax keyword adaKeyword separate until overriding
|
||||
|
||||
" Section: begin keywords {{{1
|
||||
"
|
||||
" These keywords begin various constructs, and you _might_ want to
|
||||
" highlight them differently.
|
||||
syn keyword adaBegin begin body declare entry function generic
|
||||
syn keyword adaBegin package procedure protected renames task
|
||||
"
|
||||
syntax keyword adaBegin begin body declare entry generic
|
||||
syntax keyword adaBegin protected renames task
|
||||
|
||||
syntax match adaBegin "\<function\>" contains=adaFunction
|
||||
syntax match adaBegin "\<procedure\>" contains=adaProcedure
|
||||
syntax match adaBegin "\<package\>" contains=adaPackage
|
||||
|
||||
if exists("ada_with_gnat_project_files")
|
||||
syntax keyword adaBegin project
|
||||
endif
|
||||
|
||||
" Section: with, use {{{1
|
||||
"
|
||||
if exists("ada_withuse_ordinary")
|
||||
" Don't be fancy. Display "with" and "use" as ordinary keywords in all cases.
|
||||
syn keyword adaKeyword with use
|
||||
" Don't be fancy. Display "with" and "use" as ordinary keywords in all cases.
|
||||
syntax keyword adaKeyword with use
|
||||
else
|
||||
" Highlight "with" and "use" clauses like C's "#include" when they're used
|
||||
" to reference other compilation units; otherwise they're ordinary keywords.
|
||||
" If we have vim 6.0 or later, we'll use its advanced pattern-matching
|
||||
" capabilities so that we won't match leading spaces.
|
||||
syn match adaKeyword "\<with\>"
|
||||
syn match adaKeyword "\<use\>"
|
||||
if version < 600
|
||||
syn match adaBeginWith "^\s*\(\(with\(\s\+type\)\=\)\|\(use\)\)\>" contains=adaInc
|
||||
syn match adaSemiWith ";\s*\(\(with\(\s\+type\)\=\)\|\(use\)\)\>"lc=1 contains=adaInc
|
||||
else
|
||||
syn match adaBeginWith "^\s*\zs\(\(with\(\s\+type\)\=\)\|\(use\)\)\>" contains=adaInc
|
||||
syn match adaSemiWith ";\s*\zs\(\(with\(\s\+type\)\=\)\|\(use\)\)\>" contains=adaInc
|
||||
endif
|
||||
syn match adaInc "\<with\>" contained contains=NONE
|
||||
syn match adaInc "\<with\s\+type\>" contained contains=NONE
|
||||
syn match adaInc "\<use\>" contained contains=NONE
|
||||
" Recognize "with null record" as a keyword (even the "record").
|
||||
syn match adaKeyword "\<with\s\+null\s\+record\>"
|
||||
" Consider generic formal parameters of subprograms and packages as keywords.
|
||||
if version < 600
|
||||
syn match adaKeyword ";\s*with\s\+\(function\|procedure\|package\)\>"
|
||||
syn match adaKeyword "^\s*with\s\+\(function\|procedure\|package\)\>"
|
||||
else
|
||||
syn match adaKeyword ";\s*\zswith\s\+\(function\|procedure\|package\)\>"
|
||||
syn match adaKeyword "^\s*\zswith\s\+\(function\|procedure\|package\)\>"
|
||||
endif
|
||||
" Highlight "with" and "use" clauses like C's "#include" when they're used
|
||||
" to reference other compilation units; otherwise they're ordinary keywords.
|
||||
" If we have vim 6.0 or later, we'll use its advanced pattern-matching
|
||||
" capabilities so that we won't match leading spaces.
|
||||
syntax match adaKeyword "\<with\>"
|
||||
syntax match adaKeyword "\<use\>"
|
||||
syntax match adaBeginWith "^\s*\zs\(\(with\(\s\+type\)\=\)\|\(use\)\)\>" contains=adaInc
|
||||
syntax match adaSemiWith ";\s*\zs\(\(with\(\s\+type\)\=\)\|\(use\)\)\>" contains=adaInc
|
||||
syntax match adaInc "\<with\>" contained contains=NONE
|
||||
syntax match adaInc "\<with\s\+type\>" contained contains=NONE
|
||||
syntax match adaInc "\<use\>" contained contains=NONE
|
||||
" Recognize "with null record" as a keyword (even the "record").
|
||||
syntax match adaKeyword "\<with\s\+null\s\+record\>"
|
||||
" Consider generic formal parameters of subprograms and packages as keywords.
|
||||
syntax match adaKeyword ";\s*\zswith\s\+\(function\|procedure\|package\)\>"
|
||||
syntax match adaKeyword "^\s*\zswith\s\+\(function\|procedure\|package\)\>"
|
||||
endif
|
||||
|
||||
" Section: String and character constants. {{{1
|
||||
"
|
||||
syntax region adaString contains=@Spell start=+"+ skip=+""+ end=+"+
|
||||
syntax match adaCharacter "'.'"
|
||||
|
||||
" String and character constants.
|
||||
syn region adaString start=+"+ skip=+""+ end=+"+
|
||||
syn match adaCharacter "'.'"
|
||||
" Section: Todo (only highlighted in comments) {{{1
|
||||
"
|
||||
syntax keyword adaTodo contained TODO FIXME XXX NOTE
|
||||
|
||||
" Todo (only highlighted in comments)
|
||||
syn keyword adaTodo contained TODO FIXME XXX
|
||||
" Section: Comments. {{{1
|
||||
"
|
||||
syntax region adaComment
|
||||
\ oneline
|
||||
\ contains=adaTodo,adaLineError,@Spell
|
||||
\ start="--"
|
||||
\ end="$"
|
||||
|
||||
" Comments.
|
||||
syn region adaComment oneline contains=adaTodo start="--" end="$"
|
||||
" Section: line errors {{{1
|
||||
"
|
||||
" Note: Line errors have become quite slow with Vim 7.0
|
||||
"
|
||||
if exists("g:ada_line_errors")
|
||||
syntax match adaLineError "\(^.\{79}\)\@<=." contains=ALL containedin=ALL
|
||||
endif
|
||||
|
||||
" Section: syntax folding {{{1
|
||||
"
|
||||
" Syntax folding is very tricky - for now I still suggest to use
|
||||
" indent folding
|
||||
"
|
||||
if exists("g:ada_folding") && g:ada_folding[0] == 's'
|
||||
if stridx (g:ada_folding, 'p') >= 0
|
||||
syntax region adaPackage
|
||||
\ start="\(\<package\s\+body\>\|\<package\>\)\s*\z(\k*\)"
|
||||
\ end="end\s\+\z1\s*;"
|
||||
\ keepend extend transparent fold contains=ALL
|
||||
endif
|
||||
if stridx (g:ada_folding, 'f') >= 0
|
||||
syntax region adaProcedure
|
||||
\ start="\<procedure\>\s*\z(\k*\)"
|
||||
\ end="\<end\>\s\+\z1\s*;"
|
||||
\ keepend extend transparent fold contains=ALL
|
||||
syntax region adaFunction
|
||||
\ start="\<procedure\>\s*\z(\k*\)"
|
||||
\ end="end\s\+\z1\s*;"
|
||||
\ keepend extend transparent fold contains=ALL
|
||||
endif
|
||||
if stridx (g:ada_folding, 'f') >= 0
|
||||
syntax region adaRecord
|
||||
\ start="\<is\s\+record\>"
|
||||
\ end="\<end\s\+record\>"
|
||||
\ keepend extend transparent fold contains=ALL
|
||||
endif
|
||||
endif
|
||||
|
||||
" Section: The default methods for highlighting. Can be overridden later. {{{1
|
||||
"
|
||||
highlight def link adaCharacter Character
|
||||
highlight def link adaComment Comment
|
||||
highlight def link adaConditional Conditional
|
||||
highlight def link adaKeyword Keyword
|
||||
highlight def link adaLabel Label
|
||||
highlight def link adaNumber Number
|
||||
highlight def link adaSign Number
|
||||
highlight def link adaOperator Operator
|
||||
highlight def link adaPreproc PreProc
|
||||
highlight def link adaRepeat Repeat
|
||||
highlight def link adaSpecial Special
|
||||
highlight def link adaStatement Statement
|
||||
highlight def link adaString String
|
||||
highlight def link adaStructure Structure
|
||||
highlight def link adaTodo Todo
|
||||
highlight def link adaType Type
|
||||
highlight def link adaTypedef Typedef
|
||||
highlight def link adaStorageClass StorageClass
|
||||
highlight def link adaBoolean Boolean
|
||||
highlight def link adaException Exception
|
||||
highlight def link adaAttribute Tag
|
||||
highlight def link adaInc Include
|
||||
highlight def link adaError Error
|
||||
highlight def link adaSpaceError Error
|
||||
highlight def link adaLineError Error
|
||||
highlight def link adaBuiltinType Type
|
||||
highlight def link adaAssignment Special
|
||||
|
||||
" 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_ada_syn_inits")
|
||||
if version < 508
|
||||
let did_ada_syn_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
" The default methods for highlighting. Can be overridden later.
|
||||
HiLink adaCharacter Character
|
||||
HiLink adaComment Comment
|
||||
HiLink adaConditional Conditional
|
||||
HiLink adaKeyword Keyword
|
||||
HiLink adaLabel Label
|
||||
HiLink adaNumber Number
|
||||
HiLink adaSign Number
|
||||
HiLink adaOperator Operator
|
||||
HiLink adaPreproc PreProc
|
||||
HiLink adaRepeat Repeat
|
||||
HiLink adaSpecial Special
|
||||
HiLink adaStatement Statement
|
||||
HiLink adaString String
|
||||
HiLink adaStructure Structure
|
||||
HiLink adaTodo Todo
|
||||
HiLink adaType Type
|
||||
HiLink adaTypedef Typedef
|
||||
HiLink adaStorageClass StorageClass
|
||||
HiLink adaBoolean Boolean
|
||||
HiLink adaException Exception
|
||||
HiLink adaInc Include
|
||||
HiLink adaError Error
|
||||
HiLink adaSpaceError Error
|
||||
HiLink adaBuiltinType Type
|
||||
|
||||
if exists("ada_begin_preproc")
|
||||
" Subsection: Begin, End {{{2
|
||||
"
|
||||
if exists ("ada_begin_preproc")
|
||||
" This is the old default display:
|
||||
HiLink adaBegin PreProc
|
||||
HiLink adaEnd PreProc
|
||||
else
|
||||
highlight def link adaBegin PreProc
|
||||
highlight def link adaEnd PreProc
|
||||
else
|
||||
" This is the new default display:
|
||||
HiLink adaBegin Keyword
|
||||
HiLink adaEnd Keyword
|
||||
endif
|
||||
|
||||
delcommand HiLink
|
||||
highlight def link adaBegin Keyword
|
||||
highlight def link adaEnd Keyword
|
||||
endif
|
||||
|
||||
let b:current_syntax = "ada"
|
||||
|
||||
" vim: ts=8
|
||||
" Section: formatoptions {{{1
|
||||
"
|
||||
setlocal formatoptions+=ron
|
||||
|
||||
" Section: sync {{{1
|
||||
"
|
||||
" We don't need to look backwards to highlight correctly;
|
||||
" this speeds things up greatly.
|
||||
syntax sync minlines=1 maxlines=1
|
||||
|
||||
finish " 1}}}
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
" Copyright (C) 2006 Martin Krischik
|
||||
"
|
||||
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
|
||||
"------------------------------------------------------------------------------
|
||||
"vim: textwidth=78 nowrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
|
||||
"vim: foldmethod=marker
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
" Vim syntax file
|
||||
" Language: BibTeX Bibliography Style
|
||||
" Maintainer: Tim Pope <vim@rebelongto.us>
|
||||
" Last Change: 2006 Apr 27
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.info>
|
||||
" Filenames: *.bst
|
||||
" $Id$
|
||||
|
||||
@ -23,7 +22,11 @@ delcommand SetIsk
|
||||
|
||||
syn case ignore
|
||||
|
||||
syn region bstString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=bstField,bstType
|
||||
syn match bstString +"[^"]*\%("\|$\)+ contains=bstField,bstType,bstError
|
||||
" Highlight the last character of an unclosed string, but only when the cursor
|
||||
" is not beyond it (i.e., it is still being edited). Imperfect.
|
||||
syn match bstError '[^"]\%#\@!$' contained
|
||||
|
||||
syn match bstNumber "#-\=\d\+\>"
|
||||
syn keyword bstNumber entry.max$ global.max$
|
||||
syn match bstComment "%.*"
|
||||
@ -77,6 +80,7 @@ if version >= 508 || !exists("did_bst_syn_inits")
|
||||
HiLink bstNumber Number
|
||||
HiLink bstType Type
|
||||
HiLink bstIdentifier Identifier
|
||||
HiLink bstError Error
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
" Vim syntax file
|
||||
" Language: COBOL
|
||||
" Maintainers: Davyd Ondrejko <vondraco@columbus.rr.com>
|
||||
" Language: COBOL
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.info>
|
||||
" (formerly Davyd Ondrejko <vondraco@columbus.rr.com>)
|
||||
" (formerly Sitaram Chamarty <sitaram@diac.com> and
|
||||
" James Mitchell <james_mitchell@acm.org>)
|
||||
" Last change: 2001 Sep 02
|
||||
" $Id$
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@ -22,77 +23,97 @@ endif
|
||||
|
||||
syn case ignore
|
||||
|
||||
syn match cobolKeys "^\a\{1,6\}" contains=cobolReserved
|
||||
syn cluster cobolStart contains=cobolAreaA,cobolAreaB,cobolComment,cobolCompiler
|
||||
syn cluster cobolAreaA contains=cobolParagraph,cobolSection,cobolDivision
|
||||
"syn cluster cobolAreaB contains=
|
||||
syn cluster cobolAreaAB contains=cobolLine
|
||||
syn cluster cobolLine contains=cobolReserved
|
||||
syn match cobolMarker "^\%( \{,5\}[^ ]\)\@=.\{,6}" nextgroup=@cobolStart
|
||||
syn match cobolSpace "^ \{6\}" nextgroup=@cobolStart
|
||||
syn match cobolAreaA " \{1,4\}" contained nextgroup=@cobolAreaA,@cobolAreaAB
|
||||
syn match cobolAreaB " \{5,\}\|- *" contained nextgroup=@cobolAreaB,@cobolAreaAB
|
||||
syn match cobolComment "[/*C].*$" contained
|
||||
syn match cobolCompiler "$.*$" contained
|
||||
syn match cobolLine ".*$" contained contains=cobolReserved,@cobolLine
|
||||
|
||||
syn match cobolDivision "[A-Z][A-Z0-9-]*[A-Z0-9]\s\+DIVISION\."he=e-1 contained contains=cobolDivisionName
|
||||
syn keyword cobolDivisionName contained IDENTIFICATION ENVIRONMENT DATA PROCEDURE
|
||||
syn match cobolSection "[A-Z][A-Z0-9-]*[A-Z0-9]\s\+SECTION\."he=e-1 contained contains=cobolSectionName
|
||||
syn keyword cobolSectionName contained CONFIGURATION INPUT-OUTPUT FILE WORKING-STORAGE LOCAL-STORAGE LINKAGE
|
||||
syn match cobolParagraph "\a[A-Z0-9-]*[A-Z0-9]\.\|\d[A-Z0-9-]*[A-Z]\."he=e-1 contained contains=cobolParagraphName
|
||||
syn keyword cobolParagraphName contained PROGRAM-ID SOURCE-COMPUTER OBJECT-COMPUTER SPECIAL-NAMES FILE-CONTROL I-O-CONTROL
|
||||
|
||||
|
||||
"syn match cobolKeys "^\a\{1,6\}" contains=cobolReserved
|
||||
syn keyword cobolReserved contained ACCEPT ACCESS ADD ADDRESS ADVANCING AFTER ALPHABET ALPHABETIC
|
||||
syn keyword cobolReserved contained ALPHABETIC-LOWER ALPHABETIC-UPPER ALPHANUMERIC ALPHANUMERIC-EDITED ALS
|
||||
syn keyword cobolReserved contained ALTERNATE AND ANY ARE AREA AREAS ASCENDING ASSIGN AT AUTHOR BEFORE BINARY
|
||||
syn keyword cobolReserved contained BLANK BLOCK BOTTOM BY CANCEL CBLL CD CF CH CHARACTER CHARACTERS CLASS
|
||||
syn keyword cobolReserved contained CLOCK-UNITS CLOSE COBOL CODE CODE-SET COLLATING COLUMN COMMA COMMON
|
||||
syn keyword cobolReserved contained COMMUNICATIONS COMPUTATIONAL COMPUTE CONFIGURATION CONTENT CONTINUE
|
||||
syn keyword cobolReserved contained CONTROL CONVERTING CORR CORRESPONDING COUNT CURRENCY DATA DATE DATE-COMPILED
|
||||
syn keyword cobolReserved contained COMMUNICATIONS COMPUTATIONAL COMPUTE CONTENT CONTINUE
|
||||
syn keyword cobolReserved contained CONTROL CONVERTING CORR CORRESPONDING COUNT CURRENCY DATE DATE-COMPILED
|
||||
syn keyword cobolReserved contained DATE-WRITTEN DAY DAY-OF-WEEK DE DEBUG-CONTENTS DEBUG-ITEM DEBUG-LINE
|
||||
syn keyword cobolReserved contained DEBUG-NAME DEBUG-SUB-1 DEBUG-SUB-2 DEBUG-SUB-3 DEBUGGING DECIMAL-POINT
|
||||
syn keyword cobolReserved contained DELARATIVES DELETE DELIMITED DELIMITER DEPENDING DESCENDING DESTINATION
|
||||
syn keyword cobolReserved contained DETAIL DISABLE DISPLAY DIVIDE DIVISION DOWN DUPLICATES DYNAMIC EGI ELSE EMI
|
||||
syn keyword cobolReserved contained ENABLE END-ADD END-COMPUTE END-DELETE END-DIVIDE END-EVALUATE END-IF
|
||||
syn keyword cobolReserved contained END-MULTIPLY END-OF-PAGE END-PERFORM END-READ END-RECEIVE END-RETURN
|
||||
syn keyword cobolReserved contained END-MULTIPLY END-OF-PAGE END-READ END-RECEIVE END-RETURN
|
||||
syn keyword cobolReserved contained END-REWRITE END-SEARCH END-START END-STRING END-SUBTRACT END-UNSTRING
|
||||
syn keyword cobolReserved contained END-WRITE ENVIRONMENT EQUAL ERROR ESI EVALUATE EVERY EXCEPTION EXIT
|
||||
syn keyword cobolReserved contained EXTEND EXTERNAL FALSE FD FILE FILE-CONTROL FILLER FINAL FIRST FOOTING FOR FROM
|
||||
syn keyword cobolReserved contained END-WRITE EQUAL ERROR ESI EVALUATE EVERY EXCEPTION EXIT
|
||||
syn keyword cobolReserved contained EXTEND EXTERNAL FALSE FD FILLER FINAL FIRST FOOTING FOR FROM
|
||||
syn keyword cobolReserved contained GENERATE GIVING GLOBAL GREATER GROUP HEADING HIGH-VALUE HIGH-VALUES I-O
|
||||
syn keyword cobolReserved contained I-O-CONTROL IDENTIFICATION IN INDEX INDEXED INDICATE INITIAL INITIALIZE
|
||||
syn keyword cobolReserved contained INITIATE INPUT INPUT-OUTPUT INSPECT INSTALLATION INTO IS JUST
|
||||
syn keyword cobolReserved contained IN INDEX INDEXED INDICATE INITIAL INITIALIZE
|
||||
syn keyword cobolReserved contained INITIATE INPUT INSPECT INSTALLATION INTO IS JUST
|
||||
syn keyword cobolReserved contained JUSTIFIED KEY LABEL LAST LEADING LEFT LENGTH LOCK MEMORY
|
||||
syn keyword cobolReserved contained MERGE MESSAGE MODE MODULES MOVE MULTIPLE MULTIPLY NATIVE NEGATIVE NEXT NO NOT
|
||||
syn keyword cobolReserved contained NUMBER NUMERIC NUMERIC-EDITED OBJECT-COMPUTER OCCURS OF OFF OMITTED ON OPEN
|
||||
syn keyword cobolReserved contained NUMBER NUMERIC NUMERIC-EDITED OCCURS OF OFF OMITTED ON OPEN
|
||||
syn keyword cobolReserved contained OPTIONAL OR ORDER ORGANIZATION OTHER OUTPUT OVERFLOW PACKED-DECIMAL PADDING
|
||||
syn keyword cobolReserved contained PAGE PAGE-COUNTER PERFORM PF PH PIC PICTURE PLUS POINTER POSITION POSITIVE
|
||||
syn keyword cobolReserved contained PRINTING PROCEDURE PROCEDURES PROCEDD PROGRAM PROGRAM-ID PURGE QUEUE QUOTES
|
||||
syn keyword cobolReserved contained PRINTING PROCEDURES PROCEDD PROGRAM PURGE QUEUE QUOTES
|
||||
syn keyword cobolReserved contained RANDOM RD READ RECEIVE RECORD RECORDS REDEFINES REEL REFERENCE REFERENCES
|
||||
syn keyword cobolReserved contained RELATIVE RELEASE REMAINDER REMOVAL REPLACE REPLACING REPORT REPORTING
|
||||
syn keyword cobolReserved contained REPORTS RERUN RESERVE RESET RETURN RETURNING REVERSED REWIND REWRITE RF RH
|
||||
syn keyword cobolReserved contained RIGHT ROUNDED RUN SAME SD SEARCH SECTION SECURITY SEGMENT SEGMENT-LIMITED
|
||||
syn keyword cobolReserved contained SELECT SEND SENTENCE SEPARATE SEQUENCE SEQUENTIAL SET SIGN SIZE SORT
|
||||
syn keyword cobolReserved contained SORT-MERGE SOURCE SOURCE-COMPUTER SPECIAL-NAMES STANDARD
|
||||
syn keyword cobolReserved contained SORT-MERGE SOURCE STANDARD
|
||||
syn keyword cobolReserved contained STANDARD-1 STANDARD-2 START STATUS STOP STRING SUB-QUEUE-1 SUB-QUEUE-2
|
||||
syn keyword cobolReserved contained SUB-QUEUE-3 SUBTRACT SUM SUPPRESS SYMBOLIC SYNC SYNCHRONIZED TABLE TALLYING
|
||||
syn keyword cobolReserved contained TAPE TERMINAL TERMINATE TEST TEXT THAN THEN THROUGH THRU TIME TIMES TO TOP
|
||||
syn keyword cobolReserved contained TRAILING TRUE TYPE UNIT UNSTRING UNTIL UP UPON USAGE USE USING VALUE VALUES
|
||||
syn keyword cobolReserved contained VARYING WHEN WITH WORDS WORKING-STORAGE WRITE
|
||||
syn keyword cobolReserved contained VARYING WHEN WITH WORDS WRITE
|
||||
syn match cobolReserved contained "\<CONTAINS\>"
|
||||
syn match cobolReserved contained "\<\(IF\|INVALID\|END\|EOP\)\>"
|
||||
syn match cobolReserved contained "\<ALL\>"
|
||||
|
||||
syn cluster cobolLine add=cobolConstant,cobolNumber,cobolPic
|
||||
syn keyword cobolConstant SPACE SPACES NULL ZERO ZEROES ZEROS LOW-VALUE LOW-VALUES
|
||||
|
||||
syn match cobolMarker "^.\{6\}"
|
||||
syn match cobolBadLine "^.\{6\}[^ D\-*$/].*"hs=s+6
|
||||
|
||||
" If comment mark somehow gets into column past Column 7.
|
||||
syn match cobolBadLine "^.\{6\}\s\+\*.*"
|
||||
|
||||
syn match cobolNumber "\<-\=\d*\.\=\d\+\>" contains=cobolMarker,cobolComment
|
||||
syn match cobolPic "\<S*9\+\>" contains=cobolMarker,cobolComment
|
||||
syn match cobolPic "\<$*\.\=9\+\>" contains=cobolMarker,cobolComment
|
||||
syn match cobolPic "\<Z*\.\=9\+\>" contains=cobolMarker,cobolComment
|
||||
syn match cobolPic "\<V9\+\>" contains=cobolMarker,cobolComment
|
||||
syn match cobolPic "\<9\+V\>" contains=cobolMarker,cobolComment
|
||||
syn match cobolPic "\<-\+[Z9]\+\>" contains=cobolMarker,cobolComment
|
||||
syn match cobolTodo "todo" contained
|
||||
syn match cobolComment "^.\{6\}\*.*"hs=s+6 contains=cobolTodo,cobolMarker
|
||||
syn match cobolComment "^.\{6\}/.*"hs=s+6 contains=cobolTodo,cobolMarker
|
||||
syn match cobolComment "^.\{6\}C.*"hs=s+6 contains=cobolTodo,cobolMarker
|
||||
syn match cobolCompiler "^.\{6\}$.*"hs=s+6
|
||||
syn match cobolNumber "\<-\=\d*\.\=\d\+\>" contained
|
||||
syn match cobolPic "\<S*9\+\>" contained
|
||||
syn match cobolPic "\<$*\.\=9\+\>" contained
|
||||
syn match cobolPic "\<Z*\.\=9\+\>" contained
|
||||
syn match cobolPic "\<V9\+\>" contained
|
||||
syn match cobolPic "\<9\+V\>" contained
|
||||
syn match cobolPic "\<-\+[Z9]\+\>" contained
|
||||
syn match cobolTodo "todo" contained containedin=cobolComment
|
||||
|
||||
" For MicroFocus or other inline comments, include this line.
|
||||
" syn region cobolComment start="*>" end="$" contains=cobolTodo,cobolMarker
|
||||
|
||||
syn match cobolBadLine "[^ D\*$/-].*" contained
|
||||
" If comment mark somehow gets into column past Column 7.
|
||||
syn match cobolBadLine "\s\+\*.*" contained
|
||||
syn cluster cobolStart add=cobolBadLine
|
||||
|
||||
|
||||
syn keyword cobolGoTo GO GOTO
|
||||
syn keyword cobolCopy COPY
|
||||
|
||||
" cobolBAD: things that are BAD NEWS!
|
||||
syn keyword cobolBAD ALTER ENTER RENAMES
|
||||
|
||||
syn cluster cobolLine add=cobolGoTo,cobolCopy,cobolBAD,cobolWatch,cobolEXECs
|
||||
|
||||
" cobolWatch: things that are important when trying to understand a program
|
||||
syn keyword cobolWatch OCCURS DEPENDING VARYING BINARY COMP REDEFINES
|
||||
syn keyword cobolWatch REPLACING RUN
|
||||
@ -101,39 +122,38 @@ syn match cobolWatch "COMP-[123456XN]"
|
||||
syn keyword cobolEXECs EXEC END-EXEC
|
||||
|
||||
|
||||
syn match cobolDecl "^.\{6} \{1,4}\(0\=1\|77\|78\) "hs=s+7,he=e-1 contains=cobolMarker
|
||||
syn match cobolDecl "^.\{6} \+[1-4]\d "hs=s+7,he=e-1 contains=cobolMarker
|
||||
syn match cobolDecl "^.\{6} \+0\=[2-9] "hs=s+7,he=e-1 contains=cobolMarker
|
||||
syn match cobolDecl "^.\{6} \+66 "hs=s+7,he=e-1 contains=cobolMarker
|
||||
syn cluster cobolAreaA add=cobolDeclA
|
||||
syn cluster cobolAreaAB add=cobolDecl
|
||||
syn match cobolDeclA "\(0\=1\|77\|78\) " contained nextgroup=cobolLine
|
||||
syn match cobolDecl "[1-4]\d " contained nextgroup=cobolLine
|
||||
syn match cobolDecl "0\=[2-9] " contained nextgroup=cobolLine
|
||||
syn match cobolDecl "66 " contained nextgroup=cobolLine
|
||||
|
||||
syn match cobolWatch "^.\{6} \+88 "hs=s+7,he=e-1 contains=cobolMarker
|
||||
syn match cobolWatch "88 " contained nextgroup=cobolLine
|
||||
|
||||
syn match cobolBadID "\k\+-\($\|[^-A-Z0-9]\)"
|
||||
"syn match cobolBadID "\k\+-\($\|[^-A-Z0-9]\)" contained
|
||||
|
||||
syn keyword cobolCALLs CALL CANCEL GOBACK PERFORM INVOKE
|
||||
syn cluster cobolLine add=cobolCALLs,cobolString,cobolCondFlow
|
||||
syn keyword cobolCALLs CALL END-CALL CANCEL GOBACK PERFORM END-PERFORM INVOKE
|
||||
syn match cobolCALLs "EXIT \+PROGRAM"
|
||||
syn match cobolExtras /\<VALUE \+\d\+\./hs=s+6,he=e-1
|
||||
|
||||
syn match cobolString /"[^"]*\("\|$\)/
|
||||
syn match cobolString /'[^']*\('\|$\)/
|
||||
|
||||
syn region cobolLine start="^.\{6} " end="$" contains=ALL
|
||||
"syn region cobolLine start="^.\{6}[ D-]" end="$" contains=ALL
|
||||
syn match cobolIndicator "\%7c[D-]" contained
|
||||
|
||||
if exists("cobol_legacy_code")
|
||||
syn region cobolCondFlow contains=ALLBUT,cobolLine start="\<\(IF\|INVALID\|END\|EOP\)\>" skip=/\('\|"\)[^"]\{-}\("\|'\|$\)/ end="\." keepend
|
||||
endif
|
||||
|
||||
if ! exists("cobol_legacy_code")
|
||||
" catch junk in columns 1-6 for modern code
|
||||
syn match cobolBAD "^ \{0,5\}[^ ].*"
|
||||
syn region cobolCondFlow contains=ALLBUT,cobolLine start="\<\(IF\|INVALID\|END\|EOP\)\>" skip=/\('\|"\)[^"]\{-}\("\|'\|$\)/ end="\." keepend
|
||||
endif
|
||||
|
||||
" many legacy sources have junk in columns 1-6: must be before others
|
||||
" Stuff after column 72 is in error - must be after all other "match" entries
|
||||
if exists("cobol_legacy_code")
|
||||
syn match cobolBadLine "^.\{6}[^*/].\{66,\}"
|
||||
syn match cobolBadLine "\%73c.*" containedin=ALLBUT,cobolComment
|
||||
else
|
||||
syn match cobolBadLine "^.\{6}.\{67,\}"
|
||||
syn match cobolBadLine "\%73c.*" containedin=ALL
|
||||
endif
|
||||
|
||||
" Define the default highlighting.
|
||||
@ -150,7 +170,11 @@ if version >= 508 || !exists("did_cobol_syntax_inits")
|
||||
HiLink cobolBAD Error
|
||||
HiLink cobolBadID Error
|
||||
HiLink cobolBadLine Error
|
||||
HiLink cobolMarker Comment
|
||||
if exists("g:cobol_legacy_code")
|
||||
HiLink cobolMarker Comment
|
||||
else
|
||||
HiLink cobolMarker Error
|
||||
endif
|
||||
HiLink cobolCALLs Function
|
||||
HiLink cobolComment Comment
|
||||
HiLink cobolKeys Comment
|
||||
@ -158,6 +182,7 @@ if version >= 508 || !exists("did_cobol_syntax_inits")
|
||||
HiLink cobolCompiler PreProc
|
||||
HiLink cobolCondFlow Special
|
||||
HiLink cobolCopy PreProc
|
||||
HiLink cobolDeclA cobolDecl
|
||||
HiLink cobolDecl Type
|
||||
HiLink cobolExtras Special
|
||||
HiLink cobolGoTo Special
|
||||
@ -165,9 +190,16 @@ if version >= 508 || !exists("did_cobol_syntax_inits")
|
||||
HiLink cobolNumber Constant
|
||||
HiLink cobolPic Constant
|
||||
HiLink cobolReserved Statement
|
||||
HiLink cobolDivision Label
|
||||
HiLink cobolSection Label
|
||||
HiLink cobolParagraph Label
|
||||
HiLink cobolDivisionName Keyword
|
||||
HiLink cobolSectionName Keyword
|
||||
HiLink cobolParagraphName Keyword
|
||||
HiLink cobolString Constant
|
||||
HiLink cobolTodo Todo
|
||||
HiLink cobolWatch Special
|
||||
HiLink cobolIndicator Special
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
" Vim syntax file
|
||||
" Language: Configuration File (ini file) for MSDOS/MS Windows
|
||||
" Maintainer: Sean M. McKee <mckee@misslink.net>
|
||||
" Last Change: 2001 May 09
|
||||
" Version Info: @(#)dosini.vim 1.6 97/12/15 08:54:12
|
||||
" Version Info: @(#)dosini.vim 1.6 97/12/15 08:54:12
|
||||
" Author: Sean M. McKee <mckee@misslink.net>
|
||||
" Maintainer: Nima Talebi <nima@it.net.au>
|
||||
" Last Change: Mon, 26 Jun 2006 22:07:28 +1000
|
||||
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@ -16,7 +18,7 @@ endif
|
||||
syn case ignore
|
||||
|
||||
syn match dosiniLabel "^.\{-}="
|
||||
syn region dosiniHeader start="\[" end="\]"
|
||||
syn region dosiniHeader start="^\[" end="\]"
|
||||
syn match dosiniComment "^;.*$"
|
||||
|
||||
" Define the default highlighting.
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
" DoxyGen syntax hilighting extension for c/c++/idl/java
|
||||
" Language: doxygen on top of c, cpp, idl, java
|
||||
" Maintainer: Michael Geddes <michaelrgeddes@optushome.com.au>
|
||||
" Maintainer: Michael Geddes <vimmer@frog.wheelycreek.net>
|
||||
" Author: Michael Geddes
|
||||
" Last Change: 12 December 2005
|
||||
" Version: 1.15
|
||||
" Last Change: April 2007
|
||||
" Version: 1.20
|
||||
"
|
||||
" Copyright 2004 Michael Geddes
|
||||
" Copyright 2004-2006 Michael Geddes
|
||||
" Please feel free to use, modify & distribute all or part of this script,
|
||||
" providing this copyright message remains.
|
||||
" I would appreciate being acknowledged in any derived scripts, and would
|
||||
@ -13,26 +13,27 @@
|
||||
|
||||
" NOTE: Comments welcome!
|
||||
"
|
||||
" There are two variables that control the syntax hilighting produced by this
|
||||
" There are two variables that control the syntax highlighting produced by this
|
||||
" script:
|
||||
" doxygen_enhanced_colour - Use the (non-standard) original colours designed for this hilighting.
|
||||
" doxygen_enhanced_colour - Use the (non-standard) original colours designed
|
||||
" for this highlighting.
|
||||
" doxygen_my_rendering - Disable the HTML bold/italic/underline rendering.
|
||||
"
|
||||
" A brief description without '.' or '!' will cause the end comment
|
||||
" character to be marked as an error. You can define the colour of this using
|
||||
" the highlight doxygenErrorComment.
|
||||
" A \link without an \endlink will cause an error hilight on the end-comment.
|
||||
" A \link without an \endlink will cause an error highlight on the end-comment.
|
||||
" This is defined by doxygenLinkError
|
||||
"
|
||||
" The variable g:doxygen_codeword_font can be set to the guifont for marking \c
|
||||
" words - a 'typewriter' like font normally. Spaces must be escaped. It can
|
||||
" also be set to any hilight attribute. Alternatively, a hilight for doxygenCodeWord
|
||||
" also be set to any highlight attribute. Alternatively, a highlight for doxygenCodeWord
|
||||
" can be used to override it.
|
||||
"
|
||||
" By default, hilighting is done assumng you have the JAVADOC_AUTOBRIEF
|
||||
" setting tunred on in your Doxygen configuration. If you don't, you
|
||||
" By default, highlighting is done assumng you have the JAVADOC_AUTOBRIEF
|
||||
" setting turned on in your Doxygen configuration. If you don't, you
|
||||
" can set the variable g:doxygen_javadoc_autobrief to 0 to have the
|
||||
" hilighting more accurately reflect the way Doxygen will interpret your
|
||||
" highlighting more accurately reflect the way Doxygen will interpret your
|
||||
" comments.
|
||||
"
|
||||
" Special thanks to: Wu Yongwei, Toby Allsopp
|
||||
@ -55,13 +56,13 @@ try
|
||||
"
|
||||
|
||||
" C/C++ Style line comments
|
||||
syn region doxygenComment start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contains=doxygenSyncStart,doxygenStart,doxygenTODO keepend
|
||||
syn region doxygenCommentL start=+//[/!]<\@!+me=e-1 end=+$+ contains=doxygenStartL keepend skipwhite skipnl nextgroup=doxygenComment2
|
||||
syn region doxygenCommentL start=+//[/!]<+me=e-2 end=+$+ contains=doxygenStartL keepend skipwhite skipnl
|
||||
syn region doxygenCommentL start=+//@\ze[{}]+ end=+$+ contains=doxygenGroupDefine,doxygenGroupDefineSpecial
|
||||
syn region doxygenComment start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contains=doxygenSyncStart,doxygenStart,doxygenTODO keepend fold
|
||||
syn region doxygenCommentL start=+//[/!]<\@!+me=e-1 end=+$+ contains=doxygenStartL keepend skipwhite skipnl nextgroup=doxygenComment2 fold
|
||||
syn region doxygenCommentL start=+//[/!]<+me=e-2 end=+$+ contains=doxygenStartL keepend skipwhite skipnl fold
|
||||
syn region doxygenCommentL start=+//@\ze[{}]+ end=+$+ contains=doxygenGroupDefine,doxygenGroupDefineSpecial fold
|
||||
|
||||
" Single line brief followed by multiline comment.
|
||||
syn region doxygenComment2 start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contained contains=doxygenSyncStart2,doxygenStart2,doxygenTODO keepend
|
||||
syn region doxygenComment2 start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contained contains=doxygenSyncStart2,doxygenStart2,doxygenTODO keepend fold
|
||||
" This helps with sync-ing as for some reason, syncing behaves differently to a normal region, and the start pattern does not get matched.
|
||||
syn match doxygenSyncStart2 +[^*/]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenStartSpecial,doxygenSkipComment,doxygenStartSkip2 skipwhite skipnl
|
||||
|
||||
@ -70,46 +71,56 @@ try
|
||||
syn match doxygenStartSkip2 +^\s*\*$+ contained nextgroup=doxygenBody,doxygenStartSpecial,,doxygenStartSkip skipwhite skipnl
|
||||
syn match doxygenStart2 +/\*[*!]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenStartSpecial,doxygenStartSkip2 skipwhite skipnl
|
||||
|
||||
|
||||
" Match the Starting pattern (effectively creating the start of a BNF)
|
||||
if !exists('g:doxygen_javadoc_autobrief') || g:doxygen_javadoc_autobrief
|
||||
syn match doxygenStart +/\*[*!]+ contained nextgroup=doxygenBrief,doxygenPrev,doxygenFindBriefSpecial,doxygenStartSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl
|
||||
syn match doxygenStartL +//[/!]+ contained nextgroup=doxygenPrevL,doxygenBriefL,doxygenSpecial skipwhite
|
||||
" Match the first sentence as a brief comment
|
||||
if ! exists('g:doxygen_end_punctuation')
|
||||
let g:doxygen_end_punctuation='[.]'
|
||||
endif
|
||||
|
||||
exe 'syn region doxygenBrief contained start=+[\\@]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]+ start=+\(^\s*\)\@<!\*/\@!+ start=+\<\k+ skip=+'.doxygen_end_punctuation.'\S\@=+ end=+'.doxygen_end_punctuation.'+ end=+\(\s*\(\n\s*\*\=\s*\)[@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\@=+ contains=doxygenSmallSpecial,doxygenContinueComment,doxygenBriefEndComment,doxygenFindBriefSpecial,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenHyperLink,doxygenHashLink,@Spell skipnl nextgroup=doxygenBody'
|
||||
|
||||
syn match doxygenBriefEndComment +\*/+ contained
|
||||
|
||||
exe 'syn region doxygenBriefL start=+@\k\@!\|[\\@]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@]+ start=+\<+ skip=+'.doxygen_end_punctuation.'\S+ end=+'.doxygen_end_punctuation.'\|$+ contained contains=doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell keepend'
|
||||
syn match doxygenPrevL +<+ contained nextgroup=doxygenBriefL,doxygenSpecial skipwhite
|
||||
else
|
||||
syn match doxygenStart +/\*[*!]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenFindBriefSpecial,doxygenStartSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl
|
||||
syn match doxygenStartL +//[/!]+ contained nextgroup=doxygenPrevL,doxygenLine,doxygenSpecial skipwhite
|
||||
syn region doxygenLine start=+@\k\@!\|[\\@]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@<]+ start=+\<+ end='$' contained contains=doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell keepend
|
||||
syn match doxygenPrevL +<+ contained nextgroup=doxygenLine,doxygenSpecial skipwhite
|
||||
|
||||
endif
|
||||
syn match doxygenStartL +//[/!]+ contained nextgroup=doxygenPrevL,doxygenBriefL,doxygenSpecial skipwhite
|
||||
|
||||
" This helps with sync-ing as for some reason, syncing behaves differently to a normal region, and the start pattern does not get matched.
|
||||
syn match doxygenSyncStart +\ze[^*/]+ contained nextgroup=doxygenBrief,doxygenPrev,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl
|
||||
|
||||
" Match the first sentence as a brief comment
|
||||
if ! exists('g:doxygen_end_punctuation')
|
||||
let g:doxygen_end_punctuation='[.]'
|
||||
endif
|
||||
exe 'syn region doxygenBrief contained start=+[\\@]\([pcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]+ start=+\(^\s*\)\@<!\*/\@!+ start=+\<\k+ skip=+'.doxygen_end_punctuation.'\S+ end=+'.doxygen_end_punctuation.'+ end=+\(\s*\(\n\s*\*\=\s*\)[@\\]\([pcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\@=+ contains=doxygenSmallSpecial,doxygenContinueComment,doxygenBriefEndComment,doxygenFindBriefSpecial,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenOtherLink,doxygenHyperLink,doxygenHashLink skipnl nextgroup=doxygenBody'
|
||||
|
||||
syn match doxygenBriefEndComment +\*/+ contained
|
||||
|
||||
exe 'syn region doxygenBriefL start=+@\k\@!\|[\\@]\([pcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@]+ start=+\<+ skip=+'.doxygen_end_punctuation.'\S+ end=+'.doxygen_end_punctuation.'\|$+ contained contains=doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup keepend'
|
||||
|
||||
syn region doxygenBriefLine contained start=+\<\k+ end=+\(\n\s*\*\=\s*\([@\\]\([pcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ contains=doxygenContinueComment,doxygenFindBriefSpecial,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenOtherLink,doxygenHyperLink,doxygenHashLink skipwhite keepend
|
||||
syn region doxygenBriefLine contained start=+\<\k+ end=+\(\n\s*\*\=\s*\([@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ contains=doxygenContinueComment,doxygenFindBriefSpecial,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenHyperLink,doxygenHashLink skipwhite keepend
|
||||
|
||||
" Match a '<' for applying a comment to the previous element.
|
||||
syn match doxygenPrev +<+ contained nextgroup=doxygenBrief,doxygenSpecial,doxygenStartSkip skipwhite
|
||||
syn match doxygenPrevL +<+ contained nextgroup=doxygenBriefL,doxygenSpecial skipwhite
|
||||
syn match doxygenPrev +<+ contained nextgroup=doxygenBrief,doxygenBody,doxygenSpecial,doxygenStartSkip skipwhite
|
||||
|
||||
" These are anti-doxygen comments. If there are more than two asterisks or 3 '/'s
|
||||
if exists("c_comment_strings")
|
||||
" These are anti-Doxygen comments. If there are more than two asterisks or 3 '/'s
|
||||
" then turn the comments back into normal C comments.
|
||||
syn region cComment start="/\*\*\*" end="\*/" contains=@cCommentGroup,cCommentString,cCharacter,cNumbersCom,cSpaceError
|
||||
syn region cCommentL start="////" skip="\\$" end="$" contains=@cCommentGroup,cComment2String,cCharacter,cNumbersCom,cSpaceError
|
||||
else
|
||||
syn region cComment start="/\*\*\*" end="\*/" contains=@cCommentGroup,cSpaceError
|
||||
syn region cCommentL start="////" skip="\\$" end="$" contains=@cCommentGroup,cSpaceError
|
||||
endif
|
||||
|
||||
" Special commands at the start of the area: starting with '@' or '\'
|
||||
syn region doxygenStartSpecial contained start=+[@\\]\([pcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!+ end=+$+ end=+\*/+me=s-1,he=s-1 contains=doxygenSpecial nextgroup=doxygenSkipComment skipnl keepend
|
||||
syn region doxygenStartSpecial contained start=+[@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!+ end=+$+ end=+\*/+me=s-1,he=s-1 contains=doxygenSpecial nextgroup=doxygenSkipComment skipnl keepend
|
||||
syn match doxygenSkipComment contained +^\s*\*/\@!+ nextgroup=doxygenBrief,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenPage skipwhite
|
||||
|
||||
"syn region doxygenBodyBit contained start=+$+
|
||||
|
||||
" The main body of a doxygen comment.
|
||||
syn region doxygenBody contained start=+.\|$+ matchgroup=doxygenEndComment end=+\*/+re=e-2,me=e-2 contains=doxygenContinueComment,doxygenTODO,doxygenSpecial,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup
|
||||
syn region doxygenBody contained start=+\(/\*[*!]\)\@<!<\|[^<]\|$+ matchgroup=doxygenEndComment end=+\*/+re=e-2,me=e-2 contains=doxygenContinueComment,doxygenTODO,doxygenSpecial,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell
|
||||
|
||||
" These allow the skipping of comment continuation '*' characters.
|
||||
syn match doxygenContinueComment contained +^\s*\*/\@!\s*+
|
||||
@ -133,7 +144,7 @@ try
|
||||
"
|
||||
" syn match doxygenBriefLine contained
|
||||
syn match doxygenBriefSpecial contained +[@\\]+ nextgroup=doxygenBriefWord skipwhite
|
||||
syn region doxygenFindBriefSpecial start=+[@\\]brief\>+ end=+\(\n\s*\*\=\s*\([@\\]\([pcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ keepend contains=doxygenBriefSpecial nextgroup=doxygenBody keepend skipwhite skipnl contained
|
||||
syn region doxygenFindBriefSpecial start=+[@\\]brief\>+ end=+\(\n\s*\*\=\s*\([@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ keepend contains=doxygenBriefSpecial nextgroup=doxygenBody keepend skipwhite skipnl contained
|
||||
|
||||
|
||||
" Create the single word matching special identifiers.
|
||||
@ -142,7 +153,7 @@ try
|
||||
|
||||
let mx='[-:0-9A-Za-z_%=&+*/!~>|]\@<!\([-0-9A-Za-z_%=+*/!~>|#]\+[-0-9A-Za-z_%=+*/!~>|]\@!\|\\[\\<>&.]@\|[.,][0-9a-zA-Z_]\@=\|::\|([^)]*)\|&[0-9a-zA-Z]\{2,7};\)\+'
|
||||
exe 'syn region doxygenSpecial'.a:name.'Word contained start=+'.a:kword.'+ end=+\(\_s\+'.mx.'\)\@<=[-a-zA-Z_0-9+*/^%|~!=&\\]\@!+ skipwhite contains=doxygenContinueComment,doxygen'.a:name.'Word'
|
||||
exe 'syn match doxygen'.a:name.'Word contained "\_s\@<='.mx.'" contains=doxygenHtmlSpecial keepend'
|
||||
exe 'syn match doxygen'.a:name.'Word contained "\_s\@<='.mx.'" contains=doxygenHtmlSpecial,@Spell keepend'
|
||||
endfun
|
||||
call s:DxyCreateSmallSpecial('p', 'Code')
|
||||
call s:DxyCreateSmallSpecial('c', 'Code')
|
||||
@ -153,10 +164,10 @@ try
|
||||
call s:DxyCreateSmallSpecial('ref', 'Ref')
|
||||
delfun s:DxyCreateSmallSpecial
|
||||
|
||||
syn match doxygenSmallSpecial contained +[@\\]\(\<[pcbea]\>\|\<em\>\|\<ref\>\|\<link\>\|f\$\|[$\\&<>#]\)\@=+ nextgroup=doxygenOtherLink,doxygenHyperLink,doxygenHashLink,doxygenFormula,doxygenSymbol,doxygenSpecial.*Word
|
||||
syn match doxygenSmallSpecial contained +[@\\]\(\<[npcbea]\>\|\<em\>\|\<ref\>\|\<link\>\|f\$\|[$\\&<>#]\)\@=+ nextgroup=doxygenOtherLink,doxygenHyperLink,doxygenHashLink,doxygenFormula,doxygenSymbol,doxygenSpecial.*Word
|
||||
|
||||
" Now for special characters
|
||||
syn match doxygenSpecial contained +[@\\]\(\<[pcbea]\>\|\<em\>\|\<ref\|\<link\>\>\|\<f\$\|[$\\&<>#]\)\@!+ nextgroup=doxygenParam,doxygenRetval,doxygenBriefWord,doxygenBold,doxygenBOther,doxygenOther,doxygenOtherTODO,doxygenOtherWARN,doxygenOtherBUG,doxygenPage,doxygenGroupDefine,doxygenCodeRegion,doxygenVerbatimRegion,doxygenDotRegion
|
||||
syn match doxygenSpecial contained +[@\\]\(\<[npcbea]\>\|\<em\>\|\<ref\|\<link\>\>\|\<f\$\|[$\\&<>#]\)\@!+ nextgroup=doxygenParam,doxygenRetval,doxygenBriefWord,doxygenBold,doxygenBOther,doxygenOther,doxygenOtherTODO,doxygenOtherWARN,doxygenOtherBUG,doxygenPage,doxygenGroupDefine,doxygenCodeRegion,doxygenVerbatimRegion,doxygenDotRegion
|
||||
" doxygenOtherLink,doxygenSymbol,doxygenFormula,doxygenErrorSpecial,doxygenSpecial.*Word
|
||||
"
|
||||
syn match doxygenGroupDefine contained +@\@<=[{}]+
|
||||
@ -164,8 +175,8 @@ try
|
||||
|
||||
syn match doxygenErrorSpecial contained +\s+
|
||||
|
||||
" Match Parmaters and retvals (hilighting the first word as special).
|
||||
syn match doxygenParamDirection contained +\[\(\<in\>\|\<out\>\|,\)\+\]+ nextgroup=doxygenParamName skipwhite
|
||||
" Match parameters and retvals (highlighting the first word as special).
|
||||
syn match doxygenParamDirection contained "\v\[(\s*in>((]\s*\[|\s*,\s*)out>)=|out>((]\s*\[|\s*,\s*)in>)=)\]" nextgroup=doxygenParamName skipwhite
|
||||
syn keyword doxygenParam contained param nextgroup=doxygenParamName,doxygenParamDirection skipwhite
|
||||
syn match doxygenParamName contained +[A-Za-z0-9_:]\++ nextgroup=doxygenSpecialMultilineDesc skipwhite
|
||||
syn keyword doxygenRetval contained retval throw exception nextgroup=doxygenParamName skipwhite
|
||||
@ -179,10 +190,10 @@ try
|
||||
\ xmlonly endxmlonly
|
||||
\ nextgroup=doxygenSpecialOnelineDesc
|
||||
|
||||
syn region doxygenCodeRegion contained matchgroup=doxygenOther start=+\<code\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<endcode\>+ contains=doxygenCodeRegionSpecial,doxygenContinueComment,doxygenErrorComment
|
||||
syn region doxygenCodeRegion contained matchgroup=doxygenOther start=+\<code\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<endcode\>+ contains=doxygenCodeRegionSpecial,doxygenContinueComment,doxygenErrorComment,@NoSpell
|
||||
syn match doxygenCodeRegionSpecial contained +[\\@]\(endcode\>\)\@=+
|
||||
|
||||
syn region doxygenVerbatimRegion contained matchgroup=doxygenOther start=+\<verbatim\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<endverbatim\>+ contains=doxygenVerbatimRegionSpecial,doxygenContinueComment,doxygenErrorComment
|
||||
syn region doxygenVerbatimRegion contained matchgroup=doxygenOther start=+\<verbatim\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<endverbatim\>+ contains=doxygenVerbatimRegionSpecial,doxygenContinueComment,doxygenErrorComment,@NoSpell
|
||||
syn match doxygenVerbatimRegionSpecial contained +[\\@]\(endverbatim\>\)\@=+
|
||||
|
||||
if exists('b:current_syntax')
|
||||
@ -199,7 +210,7 @@ try
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
|
||||
syn region doxygenDotRegion contained matchgroup=doxygenOther start=+\<dot\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<enddot\>+ contains=doxygenDotRegionSpecial,doxygenErrorComment,doxygenContinueComment,@Dotx
|
||||
syn region doxygenDotRegion contained matchgroup=doxygenOther start=+\<dot\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<enddot\>+ contains=doxygenDotRegionSpecial,doxygenErrorComment,doxygenContinueComment,@NoSpell,@Dotx
|
||||
syn match doxygenDotRegionSpecial contained +[\\@]\(enddot\>\)\@=+
|
||||
|
||||
" Match single line identifiers.
|
||||
@ -210,13 +221,13 @@ try
|
||||
syn keyword doxygenOther contained par nextgroup=doxygenHeaderLine
|
||||
syn region doxygenHeaderLine start=+.+ end=+^+ contained skipwhite nextgroup=doxygenSpecialMultilineDesc
|
||||
|
||||
syn keyword doxygenOther contained arg author date deprecated li return see invariant note post pre remarks since test nextgroup=doxygenSpecialMultilineDesc
|
||||
syn keyword doxygenOther contained arg author date deprecated li return returns see invariant note post pre remarks since test nextgroup=doxygenSpecialMultilineDesc
|
||||
syn keyword doxygenOtherTODO contained todo attention nextgroup=doxygenSpecialMultilineDesc
|
||||
syn keyword doxygenOtherWARN contained warning nextgroup=doxygenSpecialMultilineDesc
|
||||
syn keyword doxygenOtherBUG contained bug nextgroup=doxygenSpecialMultilineDesc
|
||||
|
||||
" Handle \link, \endlink, hilighting the link-to and the link text bits separately.
|
||||
syn region doxygenOtherLink matchgroup=doxygenOther start=+link+ end=+[\@]\@<=endlink\>+ contained contains=doxygenLinkWord,doxygenContinueComment,doxygenLinkError,doxygenEndlinkSpecial
|
||||
" Handle \link, \endlink, highlighting the link-to and the link text bits separately.
|
||||
syn region doxygenOtherLink matchgroup=doxygenOther start=+\<link\>+ end=+[\@]\@<=endlink\>+ contained contains=doxygenLinkWord,doxygenContinueComment,doxygenLinkError,doxygenEndlinkSpecial
|
||||
syn match doxygenEndlinkSpecial contained +[\\@]\zeendlink\>+
|
||||
|
||||
syn match doxygenLinkWord "[_a-zA-Z:#()][_a-z0-9A-Z:#()]*\>" contained skipnl nextgroup=doxygenLinkRest,doxygenContinueLinkComment
|
||||
@ -232,12 +243,12 @@ try
|
||||
syn match doxygenPage "[\\@]page\>"me=s+1 contained skipwhite nextgroup=doxygenPagePage
|
||||
syn keyword doxygenPagePage page contained skipwhite nextgroup=doxygenPageIdent
|
||||
syn region doxygenPageDesc start=+.\++ end=+$+ contained skipwhite contains=doxygenSmallSpecial,@doxygenHtmlGroup keepend skipwhite skipnl nextgroup=doxygenBody
|
||||
syn match doxygenPageIdent "\<[a-zA-Z0-9]\+\>" contained nextgroup=doxygenPageDesc
|
||||
syn match doxygenPageIdent "\<[a-zA-Z_0-9]\+\>" contained nextgroup=doxygenPageDesc
|
||||
|
||||
" Handle section
|
||||
syn keyword doxygenOther defgroup section subsection subsubsection weakgroup contained skipwhite nextgroup=doxygenSpecialIdent
|
||||
syn region doxygenSpecialSectionDesc start=+.\++ end=+$+ contained skipwhite contains=doxygenSmallSpecial,@doxygenHtmlGroup keepend skipwhite skipnl nextgroup=doxygenContinueComment
|
||||
syn match doxygenSpecialIdent "\<[a-zA-Z0-9]\+\>" contained nextgroup=doxygenSpecialSectionDesc
|
||||
syn match doxygenSpecialIdent "\<[a-zA-Z_0-9]\+\>" contained nextgroup=doxygenSpecialSectionDesc
|
||||
|
||||
" Does the one-line description for the one-line type identifiers.
|
||||
syn region doxygenSpecialTypeOnelineDesc start=+.\++ end=+$+ contained skipwhite contains=doxygenSmallSpecial,@doxygenHtmlGroup keepend
|
||||
@ -246,7 +257,7 @@ try
|
||||
" Handle the multiline description for the multiline type identifiers.
|
||||
" Continue until an 'empty' line (can contain a '*' continuation) or until the
|
||||
" next whole-line @ command \ command.
|
||||
syn region doxygenSpecialMultilineDesc start=+.\++ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([pcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ contained contains=doxygenSpecialContinueComment,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup skipwhite keepend
|
||||
syn region doxygenSpecialMultilineDesc start=+.\++ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([npcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ contained contains=doxygenSpecialContinueComment,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell skipwhite keepend
|
||||
syn match doxygenSpecialContinueComment contained +^\s*\*/\@!\s*+ nextgroup=doxygenSpecial skipwhite
|
||||
|
||||
" Handle special cases 'bold' and 'group'
|
||||
@ -257,7 +268,7 @@ try
|
||||
syn keyword doxygenGroupName contained +\k\++ nextgroup=doxygenSpecialOnelineDesc skipwhite
|
||||
|
||||
" Handle special symbol identifiers @$, @\, @$ etc
|
||||
syn match doxygenSymbol contained +[$\\&<>#]+
|
||||
syn match doxygenSymbol contained +[$\\&<>#n]+
|
||||
|
||||
" Simplistic handling of formula regions
|
||||
syn region doxygenFormula contained matchgroup=doxygenFormulaEnds start=+f\$+ end=+[@\\]f\$+ contains=doxygenFormulaSpecial,doxygenFormulaOperator
|
||||
@ -289,37 +300,37 @@ try
|
||||
syn region doxygenHtmlLink contained start=+<[aA]\>\s*\(\n\s*\*\s*\)\=\(\(name\|href\)=\("[^"]*"\|'[^']*'\)\)\=\s*>+ end=+</[aA]>+me=e-4 contains=@doxygenHtmlTop
|
||||
hi link doxygenHtmlLink Underlined
|
||||
|
||||
syn region doxygenHtmlBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlBoldUnderline,doxygenHtmlBoldItalic
|
||||
syn region doxygenHtmlBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop,doxygenHtmlBoldUnderline,doxygenHtmlBoldItalic
|
||||
syn region doxygenHtmlBoldUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlBoldUnderlineItalic
|
||||
syn region doxygenHtmlBoldItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlBoldItalicUnderline
|
||||
syn region doxygenHtmlBoldItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop,doxygenHtmlBoldItalicUnderline
|
||||
syn region doxygenHtmlBoldUnderlineItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop
|
||||
syn region doxygenHtmlBoldUnderlineItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop
|
||||
syn region doxygenHtmlBoldItalicUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlBoldUnderlineItalic
|
||||
syn region doxygenHtmlBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlBoldUnderline,doxygenHtmlBoldItalic,@Spell
|
||||
syn region doxygenHtmlBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop,doxygenHtmlBoldUnderline,doxygenHtmlBoldItalic,@Spell
|
||||
syn region doxygenHtmlBoldUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlBoldUnderlineItalic,@Spell
|
||||
syn region doxygenHtmlBoldItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlBoldItalicUnderline,@Spell
|
||||
syn region doxygenHtmlBoldItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop,doxygenHtmlBoldItalicUnderline,@Spell
|
||||
syn region doxygenHtmlBoldUnderlineItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop,@Spell
|
||||
syn region doxygenHtmlBoldUnderlineItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop,@Spell
|
||||
syn region doxygenHtmlBoldItalicUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlBoldUnderlineItalic,@Spell
|
||||
|
||||
syn region doxygenHtmlUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlUnderlineBold,doxygenHtmlUnderlineItalic
|
||||
syn region doxygenHtmlUnderlineBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlUnderlineBoldItalic
|
||||
syn region doxygenHtmlUnderlineBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop,doxygenHtmlUnderlineBoldItalic
|
||||
syn region doxygenHtmlUnderlineItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop,htmUnderlineItalicBold
|
||||
syn region doxygenHtmlUnderlineItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop,htmUnderlineItalicBold
|
||||
syn region doxygenHtmlUnderlineItalicBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop
|
||||
syn region doxygenHtmlUnderlineItalicBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop
|
||||
syn region doxygenHtmlUnderlineBoldItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop
|
||||
syn region doxygenHtmlUnderlineBoldItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop
|
||||
syn region doxygenHtmlUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlUnderlineBold,doxygenHtmlUnderlineItalic,@Spell
|
||||
syn region doxygenHtmlUnderlineBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlUnderlineBoldItalic,@Spell
|
||||
syn region doxygenHtmlUnderlineBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop,doxygenHtmlUnderlineBoldItalic,@Spell
|
||||
syn region doxygenHtmlUnderlineItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop,htmUnderlineItalicBold,@Spell
|
||||
syn region doxygenHtmlUnderlineItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop,htmUnderlineItalicBold,@Spell
|
||||
syn region doxygenHtmlUnderlineItalicBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop,@Spell
|
||||
syn region doxygenHtmlUnderlineItalicBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop,@Spell
|
||||
syn region doxygenHtmlUnderlineBoldItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop,@Spell
|
||||
syn region doxygenHtmlUnderlineBoldItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop,@Spell
|
||||
|
||||
syn region doxygenHtmlItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlItalicBold,doxygenHtmlItalicUnderline
|
||||
syn region doxygenHtmlItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop
|
||||
syn region doxygenHtmlItalicBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlItalicBoldUnderline
|
||||
syn region doxygenHtmlItalicBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop,doxygenHtmlItalicBoldUnderline
|
||||
syn region doxygenHtmlItalicBoldUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop
|
||||
syn region doxygenHtmlItalicUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlItalicUnderlineBold
|
||||
syn region doxygenHtmlItalicUnderlineBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop
|
||||
syn region doxygenHtmlItalicUnderlineBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop
|
||||
syn region doxygenHtmlItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlItalicBold,doxygenHtmlItalicUnderline,@Spell
|
||||
syn region doxygenHtmlItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop,@Spell
|
||||
syn region doxygenHtmlItalicBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlItalicBoldUnderline,@Spell
|
||||
syn region doxygenHtmlItalicBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop,doxygenHtmlItalicBoldUnderline,@Spell
|
||||
syn region doxygenHtmlItalicBoldUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop,@Spell
|
||||
syn region doxygenHtmlItalicUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlItalicUnderlineBold,@Spell
|
||||
syn region doxygenHtmlItalicUnderlineBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop,@Spell
|
||||
syn region doxygenHtmlItalicUnderlineBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop,@Spell
|
||||
|
||||
syn region doxygenHtmlCode contained start="\c<code\>" end="\c</code>"me=e-7 contains=@doxygenHtmlTop
|
||||
syn region doxygenHtmlCode contained start="\c<code\>" end="\c</code>"me=e-7 contains=@doxygenHtmlTop,@NoSpell
|
||||
|
||||
" Prevent the doxygen contained matches from leaking into the c groups.
|
||||
" Prevent the doxygen contained matches from leaking into the c/rc groups.
|
||||
syn cluster cParenGroup add=doxygen.*
|
||||
syn cluster cParenGroup remove=doxygenComment,doxygenCommentL
|
||||
syn cluster cPreProcGroup add=doxygen.*
|
||||
@ -389,10 +400,16 @@ try
|
||||
endif
|
||||
|
||||
elseif has('gui_win32') || has('gui_win16') || has('gui_win95')
|
||||
if &guifont == ''
|
||||
let font='font=Lucida_Console:h10'
|
||||
|
||||
if exists('g:doxygen_use_bitsream_vera') && g:doxygen_use_bitsream_vera
|
||||
let font_base='Bitstream_Vera_Sans_Mono'
|
||||
else
|
||||
let font='font='.substitute(&guifont, '^[^:]*', 'Lucida_Console','')
|
||||
let font_base='Lucida_Console'
|
||||
endif
|
||||
if &guifont == ''
|
||||
let font='font='.font_base.':h10'
|
||||
else
|
||||
let font='font='.matchstr(substitute(&guifont, '^[^:]*', font_base,''),'[^,]*')
|
||||
endif
|
||||
elseif has('gui_athena') || has('gui_gtk') || &guifont=~'^\(-[^-]\+\)\{14}'
|
||||
if &guifont == ''
|
||||
@ -458,6 +475,7 @@ try
|
||||
|
||||
|
||||
SynLink doxygenBody Comment
|
||||
SynLink doxygenLine doxygenBody
|
||||
SynLink doxygenTODO Todo
|
||||
SynLink doxygenOtherTODO Todo
|
||||
SynLink doxygenOtherWARN Todo
|
||||
@ -473,6 +491,7 @@ try
|
||||
SynLink doxygenEndlinkSpecial doxygenSpecial
|
||||
SynLink doxygenCodeRegionSpecial doxygenSpecial
|
||||
SynLink doxygenVerbatimRegionSpecial doxygenSpecial
|
||||
SynLink doxygenDotRegionSpecial doxygenSpecial
|
||||
SynLink doxygenGroupDefine doxygenParam
|
||||
|
||||
SynLink doxygenSpecialMultilineDesc doxygenSpecialOnelineDesc
|
||||
|
||||
252
runtime/syntax/freebasic.vim
Normal file
252
runtime/syntax/freebasic.vim
Normal file
@ -0,0 +1,252 @@
|
||||
" Vim syntax file
|
||||
" Language: FreeBasic
|
||||
" Maintainer: Mark Manning <markem@airmail.net>
|
||||
" Updated: 10/22/2006
|
||||
"
|
||||
" Description:
|
||||
"
|
||||
" Based originally on the work done by Allan Kelly <Allan.Kelly@ed.ac.uk>
|
||||
" Updated by Mark Manning <markem@airmail.net>
|
||||
" Applied FreeBasic support to the already excellent support
|
||||
" for standard basic syntax (like QB).
|
||||
"
|
||||
" First version based on Micro$soft QBASIC circa
|
||||
" 1989, as documented in 'Learn BASIC Now' by
|
||||
" Halvorson&Rygmyr. Microsoft Press 1989. This syntax file
|
||||
" not a complete implementation yet. Send suggestions to
|
||||
" the maintainer.
|
||||
"
|
||||
" Quit when a (custom) syntax file was already loaded (Taken from c.vim)
|
||||
"
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
"
|
||||
" Be sure to turn on the "case ignore" since current versions
|
||||
" of freebasic support both upper as well as lowercase
|
||||
" letters. - MEM 10/1/2006
|
||||
"
|
||||
syn case ignore
|
||||
"
|
||||
" This list of keywords is taken directly from the FreeBasic
|
||||
" user's guide as presented by the FreeBasic online site.
|
||||
"
|
||||
syn keyword freebasicArrays ERASE LBOUND REDIM PRESERVE UBOUND
|
||||
|
||||
syn keyword freebasicBitManipulation BIT BITRESET BITSET HIBYTE HIWORD LOBYTE LOWORD SHL SHR
|
||||
|
||||
syn keyword freebasicCompilerSwitches DEFBYTE DEFDBL DEFINT DEFLNG DEFLNGINT DEFSHORT DEFSNG DEFSTR
|
||||
syn keyword freebasicCompilerSwitches DEFUBYTE DEFUINT DEFULNGINT DEFUSHORT
|
||||
syn match freebasicCompilerSwitches "\<option\s+\(BASE\|BYVAL\|DYNAMIC\|ESCAPE\|EXPLICIT\|NOKEYWORD\)\>"
|
||||
syn match freebasicCompilerSwitches "\<option\s+\(PRIVATE\|STATIC\)\>"
|
||||
|
||||
syn region freebasicConditional start="\son\s+" skip=".*" end="gosub"
|
||||
syn region freebasicConditional start="\son\s+" skip=".*" end="goto"
|
||||
syn match freebasicConditional "\<select\s+case\>"
|
||||
syn keyword freebasicConditional if iif then case else elseif with
|
||||
|
||||
syn match freebasicConsole "\<open\s+\(CONS\|ERR\|PIPE\|SCRN\)\>"
|
||||
syn keyword freebasicConsole BEEP CLS CSRLIN LOCATE PRINT POS SPC TAB VIEW WIDTH
|
||||
|
||||
syn keyword freebasicDataTypes BYTE AS DIM CONST DOUBLE ENUM INTEGER LONG LONGINT SHARED SHORT STRING
|
||||
syn keyword freebasicDataTypes SINGLE TYPE UBYTE UINTEGER ULONGINT UNION UNSIGNED USHORT WSTRING ZSTRING
|
||||
|
||||
syn keyword freebasicDateTime DATE DATEADD DATEDIFF DATEPART DATESERIAL DATEVALUE DAY HOUR MINUTE
|
||||
syn keyword freebasicDateTime MONTH MONTHNAME NOW SECOND SETDATE SETTIME TIME TIMESERIAL TIMEVALUE
|
||||
syn keyword freebasicDateTime TIMER YEAR WEEKDAY WEEKDAYNAME
|
||||
|
||||
syn keyword freebasicDebug ASSERT STOP
|
||||
|
||||
syn keyword freebasicErrorHandling ERR ERL ERROR LOCAL RESUME
|
||||
syn match freebasicErrorHandling "\<resume\s+next\>"
|
||||
syn match freebasicErrorHandling "\<on\s+error\>"
|
||||
|
||||
syn match freebasicFiles "\<get\s+#\>"
|
||||
syn match freebasicFiles "\<input\s+#\>"
|
||||
syn match freebasicFiles "\<line\s+input\s+#\>"
|
||||
syn match freebasicFiles "\<put\s+#\>"
|
||||
syn keyword freebasicFiles ACCESS APPEND BINARY BLOAD BSAVE CLOSE EOF FREEFILE INPUT LOC
|
||||
syn keyword freebasicFiles LOCK LOF OPEN OUTPUT RANDOM RESET SEEK UNLOCK WRITE
|
||||
|
||||
syn keyword freebasicFunctions ALIAS ANY BYREF BYVAL CALL CDECL CONSTRUCTOR DESTRUCTOR
|
||||
syn keyword freebasicFunctions DECLARE FUNCTION LIB OVERLOAD PASCAL STATIC SUB STDCALL
|
||||
syn keyword freebasicFunctions VA_ARG VA_FIRST VA_NEXT
|
||||
|
||||
syn match freebasicGraphics "\<palette\s+get\>"
|
||||
syn keyword freebasicGraphics ALPHA CIRCLE CLS COLOR CUSTOM DRAW FLIP GET
|
||||
syn keyword freebasicGraphics IMAGECREATE IMAGEDESTROY LINE PAINT PALETTE PCOPY PMAP POINT
|
||||
syn keyword freebasicGraphics PRESET PSET PUT RGB RGBA SCREEN SCREENCOPY SCREENINFO SCREENLIST
|
||||
syn keyword freebasicGraphics SCREENLOCK SCREENPTR SCREENRES SCREENSET SCREENSYNC SCREENUNLOCK
|
||||
syn keyword freebasicGraphics TRANS USING VIEW WINDOW
|
||||
|
||||
syn match freebasicHardware "\<open\s+com\>"
|
||||
syn keyword freebasicHardware INP OUT WAIT LPT LPOS LPRINT
|
||||
|
||||
syn keyword freebasicLogical AND EQV IMP OR NOT XOR
|
||||
|
||||
syn keyword freebasicMath ABS ACOS ASIN ATAN2 ATN COS EXP FIX INT LOG MOD RANDOMIZE
|
||||
syn keyword freebasicMath RND SGN SIN SQR TAN
|
||||
|
||||
syn keyword freebasicMemory ALLOCATE CALLOCATE CLEAR DEALLOCATE FIELD FRE PEEK POKE REALLOCATE
|
||||
|
||||
syn keyword freebasicMisc ASM DATA LET TO READ RESTORE SIZEOF SWAP OFFSETOF
|
||||
|
||||
syn keyword freebasicModularizing CHAIN COMMON EXPORT EXTERN DYLIBFREE DYLIBLOAD DYLIBSYMBOL
|
||||
syn keyword freebasicModularizing PRIVATE PUBLIC
|
||||
|
||||
syn keyword freebasicMultithreading MUTEXCREATE MUTEXDESTROY MUTEXLOCK MUTEXUNLOCK THREADCREATE THREADWAIT
|
||||
|
||||
syn keyword freebasicShell CHDIR DIR COMMAND ENVIRON EXEC EXEPATH KILL NAME MKDIR RMDIR RUN
|
||||
|
||||
syn keyword freebasicEnviron SHELL SYSTEM WINDOWTITLE POINTERS
|
||||
|
||||
syn keyword freebasicLoops FOR LOOP WHILE WEND DO CONTINUE STEP UNTIL next
|
||||
|
||||
syn match freebasicInclude "\<#\s*\(inclib\|include\)\>"
|
||||
syn match freebasicInclude "\<\$\s*include\>"
|
||||
|
||||
syn keyword freebasicPointer PROCPTR PTR SADD STRPTR VARPTR
|
||||
|
||||
syn keyword freebasicPredefined __DATE__ __FB_DOS__ __FB_LINUX__ __FB_MAIN__ __FB_MIN_VERSION__
|
||||
syn keyword freebasicPredefined __FB_SIGNATURE__ __FB_VERSION__ __FB_WIN32__ __FB_VER_MAJOR__
|
||||
syn keyword freebasicPredefined __FB_VER_MINOR__ __FB_VER_PATCH__ __FILE__ __FUNCTION__
|
||||
syn keyword freebasicPredefined __LINE__ __TIME__
|
||||
|
||||
syn match freebasicPreProcessor "\<^#\s*\(define\|undef\)\>"
|
||||
syn match freebasicPreProcessor "\<^#\s*\(ifdef\|ifndef\|else\|elseif\|endif\|if\)\>"
|
||||
syn match freebasicPreProcessor "\<#\s*error\>"
|
||||
syn match freebasicPreProcessor "\<#\s*\(print\|dynamic\|static\)\>"
|
||||
syn keyword freebasicPreProcessor DEFINED ONCE
|
||||
|
||||
syn keyword freebasicProgramFlow END EXIT GOSUB GOTO
|
||||
syn keyword freebasicProgramFlow IS RETURN SCOPE SLEEP
|
||||
|
||||
syn keyword freebasicString INSTR LCASE LEFT LEN LSET LTRIM MID RIGHT RSET RTRIM
|
||||
syn keyword freebasicString SPACE STRING TRIM UCASE ASC BIN CHR CVD CVI CVL CVLONGINT
|
||||
syn keyword freebasicString CVS CVSHORT FORMAT HEX MKD MKI MKL MKLONGINT MKS MKSHORT
|
||||
syn keyword freebasicString OCT STR VAL VALLNG VALINT VALUINT VALULNG
|
||||
|
||||
syn keyword freebasicTypeCasting CAST CBYTE CDBL CINT CLNG CLNGINT CPTR CSHORT CSIGN CSNG
|
||||
syn keyword freebasicTypeCasting CUBYTE CUINT CULNGINT CUNSG CURDIR CUSHORT
|
||||
|
||||
syn match freebasicUserInput "\<line\s+input\>"
|
||||
syn keyword freebasicUserInput GETJOYSTICK GETKEY GETMOUSE INKEY INPUT MULTIKEY SETMOUSE
|
||||
"
|
||||
" Do the Basic variables names first. This is because it
|
||||
" is the most inclusive of the tests. Later on we change
|
||||
" this so the identifiers are split up into the various
|
||||
" types of identifiers like functions, basic commands and
|
||||
" such. MEM 9/9/2006
|
||||
"
|
||||
syn match freebasicIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>"
|
||||
syn match freebasicGenericFunction "\<[a-zA-Z_][a-zA-Z0-9_]*\>\s*("me=e-1,he=e-1
|
||||
"
|
||||
" Function list
|
||||
"
|
||||
syn keyword freebasicTodo contained TODO
|
||||
"
|
||||
" Catch errors caused by wrong parenthesis
|
||||
"
|
||||
syn region freebasicParen transparent start='(' end=')' contains=ALLBUT,@freebasicParenGroup
|
||||
syn match freebasicParenError ")"
|
||||
syn match freebasicInParen contained "[{}]"
|
||||
syn cluster freebasicParenGroup contains=freebasicParenError,freebasicSpecial,freebasicTodo,freebasicUserCont,freebasicUserLabel,freebasicBitField
|
||||
"
|
||||
" Integer number, or floating point number without a dot and with "f".
|
||||
"
|
||||
syn region freebasicHex start="&h" end="\W"
|
||||
syn region freebasicHexError start="&h\x*[g-zG-Z]" end="\W"
|
||||
syn match freebasicInteger "\<\d\+\(u\=l\=\|lu\|f\)\>"
|
||||
"
|
||||
" Floating point number, with dot, optional exponent
|
||||
"
|
||||
syn match freebasicFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>"
|
||||
"
|
||||
" Floating point number, starting with a dot, optional exponent
|
||||
"
|
||||
syn match freebasicFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
|
||||
"
|
||||
" Floating point number, without dot, with exponent
|
||||
"
|
||||
syn match freebasicFloat "\<\d\+e[-+]\=\d\+[fl]\=\>"
|
||||
"
|
||||
" Hex number
|
||||
"
|
||||
syn case match
|
||||
syn match freebasicOctal "\<0\o*\>"
|
||||
syn match freebasicOctalError "\<0\o*[89]"
|
||||
"
|
||||
" String and Character contstants
|
||||
"
|
||||
syn region freebasicString start='"' end='"' contains=freebasicSpecial,freebasicTodo
|
||||
syn region freebasicString start="'" end="'" contains=freebasicSpecial,freebasicTodo
|
||||
"
|
||||
" Comments
|
||||
"
|
||||
syn match freebasicSpecial contained "\\."
|
||||
syn region freebasicComment start="^rem" end="$" contains=freebasicSpecial,freebasicTodo
|
||||
syn region freebasicComment start=":\s*rem" end="$" contains=freebasicSpecial,freebasicTodo
|
||||
syn region freebasicComment start="\s*'" end="$" contains=freebasicSpecial,freebasicTodo
|
||||
syn region freebasicComment start="^'" end="$" contains=freebasicSpecial,freebasicTodo
|
||||
"
|
||||
" Now do the comments and labels
|
||||
"
|
||||
syn match freebasicLabel "^\d"
|
||||
syn match freebasicLabel "\<^\w+:\>"
|
||||
syn region freebasicLineNumber start="^\d" end="\s"
|
||||
"
|
||||
" Create the clusters
|
||||
"
|
||||
syn cluster freebasicNumber contains=freebasicHex,freebasicOctal,freebasicInteger,freebasicFloat
|
||||
syn cluster freebasicError contains=freebasicHexError,freebasicOctalError
|
||||
"
|
||||
" Used with OPEN statement
|
||||
"
|
||||
syn match freebasicFilenumber "#\d\+"
|
||||
syn match freebasicMathOperator "[\+\-\=\|\*\/\>\<\%\()[\]]" contains=freebasicParen
|
||||
"
|
||||
" The default methods for highlighting. Can be overridden later
|
||||
"
|
||||
hi def link freebasicArrays StorageClass
|
||||
hi def link freebasicBitManipulation Operator
|
||||
hi def link freebasicCompilerSwitches PreCondit
|
||||
hi def link freebasicConsole Special
|
||||
hi def link freebasicDataTypes Type
|
||||
hi def link freebasicDateTime Type
|
||||
hi def link freebasicDebug Special
|
||||
hi def link freebasicErrorHandling Special
|
||||
hi def link freebasicFiles Special
|
||||
hi def link freebasicFunctions Function
|
||||
hi def link freebasicGraphics Function
|
||||
hi def link freebasicHardware Special
|
||||
hi def link freebasicLogical Conditional
|
||||
hi def link freebasicMath Function
|
||||
hi def link freebasicMemory Function
|
||||
hi def link freebasicMisc Special
|
||||
hi def link freebasicModularizing Special
|
||||
hi def link freebasicMultithreading Special
|
||||
hi def link freebasicShell Special
|
||||
hi def link freebasicEnviron Special
|
||||
hi def link freebasicPointer Special
|
||||
hi def link freebasicPredefined PreProc
|
||||
hi def link freebasicPreProcessor PreProc
|
||||
hi def link freebasicProgramFlow Statement
|
||||
hi def link freebasicString String
|
||||
hi def link freebasicTypeCasting Type
|
||||
hi def link freebasicUserInput Statement
|
||||
hi def link freebasicComment Comment
|
||||
hi def link freebasicConditional Conditional
|
||||
hi def link freebasicError Error
|
||||
hi def link freebasicIdentifier Identifier
|
||||
hi def link freebasicInclude Include
|
||||
hi def link freebasicGenericFunction Function
|
||||
hi def link freebasicLabel Label
|
||||
hi def link freebasicLineNumber Label
|
||||
hi def link freebasicMathOperator Operator
|
||||
hi def link freebasicNumber Number
|
||||
hi def link freebasicSpecial Special
|
||||
hi def link freebasicTodo Todo
|
||||
|
||||
let b:current_syntax = "freebasic"
|
||||
|
||||
" vim: ts=8
|
||||
@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim help file
|
||||
" Maintainer: Bram Moolenaar (Bram@vim.org)
|
||||
" Last Change: 2006 Apr 13
|
||||
" Last Change: 2006 May 13
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
" Language: HTML
|
||||
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" URL: http://www.fleiner.com/vim/syntax/html.vim
|
||||
" Last Change: 2006 April 13
|
||||
" Last Change: 2006 Jun 19
|
||||
|
||||
" Please check :help html.vim for some comments and a description of the options
|
||||
|
||||
@ -24,6 +24,7 @@ else
|
||||
command! -nargs=+ HtmlHiLink hi def link <args>
|
||||
endif
|
||||
|
||||
syntax spell toplevel
|
||||
|
||||
syn case ignore
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Django HTML template
|
||||
" Maintainer: Dave Hodder <dmh@dmh.org.uk>
|
||||
" Last Change: 2006 Mar 06
|
||||
" Last Change: 2007 Jan 26
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@ -24,7 +24,11 @@ else
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
|
||||
syntax cluster htmlPreproc add=djangoPlaceHolder
|
||||
syntax cluster htmlString add=djangoPlaceHolder
|
||||
syn cluster djangoBlocks add=djangoTagBlock,djangoVarBlock,djangoComment,djangoComBlock
|
||||
|
||||
syn region djangoTagBlock start="{%" end="%}" contains=djangoStatement,djangoFilter,djangoArgument,djangoTagError display containedin=ALLBUT,@djangoBlocks
|
||||
syn region djangoVarBlock start="{{" end="}}" contains=djangoFilter,djangoArgument,djangoVarError display containedin=ALLBUT,@djangoBlocks
|
||||
syn region djangoComment start="{%\s*comment\s*%}" end="{%\s*endcomment\s*%}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks
|
||||
syn region djangoComBlock start="{#" end="#}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks
|
||||
|
||||
let b:current_syntax = "htmldjango"
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Lisp
|
||||
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Last Change: Oct 12, 2005
|
||||
" Version: 17a
|
||||
" Last Change: Apr 12, 2007
|
||||
" Version: 19
|
||||
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
|
||||
"
|
||||
" Thanks to F Xavier Noria for a list of 978 Common Lisp symbols
|
||||
@ -34,6 +34,8 @@ else
|
||||
syn cluster lispListCluster contains=@lispBaseListCluster,lispString
|
||||
endif
|
||||
|
||||
syn case ignore
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Lists: {{{1
|
||||
syn match lispSymbol contained ![^()'`,"; \t]\+!
|
||||
@ -436,7 +438,7 @@ syn keyword lispVar *gensym-counter* *print-miser-width* *trace-output*
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Strings: {{{1
|
||||
syn region lispString start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||
syn region lispString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell
|
||||
if exists("g:lisp_instring")
|
||||
syn region lispInString keepend matchgroup=Delimiter start=+"(+rs=s+1 skip=+|.\{-}|+ matchgroup=Delimiter end=+)"+ contains=@lispBaseListCluster,lispInStringString
|
||||
syn region lispInStringString start=+\\"+ skip=+\\\\+ end=+\\"+ contained
|
||||
@ -454,14 +456,15 @@ syn keyword lispDecl do* flet multiple-value-bind
|
||||
" Numbers: supporting integers and floating point numbers {{{1
|
||||
syn match lispNumber "-\=\(\.\d\+\|\d\+\(\.\d*\)\=\)\(e[-+]\=\d\+\)\="
|
||||
|
||||
syn match lispSpecial "\*[a-zA-Z_][a-zA-Z_0-9-]*\*"
|
||||
syn match lispSpecial "\*\w[a-z_0-9-]*\*"
|
||||
syn match lispSpecial !#|[^()'`,"; \t]\+|#!
|
||||
syn match lispSpecial !#x[0-9a-fA-F]\+!
|
||||
syn match lispSpecial !#o[0-7]\+!
|
||||
syn match lispSpecial !#x\x\+!
|
||||
syn match lispSpecial !#o\o\+!
|
||||
syn match lispSpecial !#b[01]\+!
|
||||
syn match lispSpecial !#\\[ -\~]!
|
||||
syn match lispSpecial !#\\[ -}\~]!
|
||||
syn match lispSpecial !#[':][^()'`,"; \t]\+!
|
||||
syn match lispSpecial !#([^()'`,"; \t]\+)!
|
||||
syn match lispSpecial !#\\\%(Space\|Newline\|Tab\|Page\|Rubout\|Linefeed\|Return\|Backspace\)!
|
||||
|
||||
syn match lispConcat "\s\.\s"
|
||||
syn match lispParenError ")"
|
||||
@ -471,9 +474,7 @@ syn match lispParenError ")"
|
||||
syn cluster lispCommentGroup contains=lispTodo,@Spell
|
||||
syn match lispComment ";.*$" contains=@lispCommentGroup
|
||||
syn region lispCommentRegion start="#|" end="|#" contains=lispCommentRegion,@lispCommentGroup
|
||||
syn case ignore
|
||||
syn keyword lispTodo contained combak combak: todo todo:
|
||||
syn case match
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Synchronization: {{{1
|
||||
|
||||
@ -22,13 +22,15 @@ syn cluster mailQuoteExps contains=mailQuoteExp1,mailQuoteExp2,mailQuoteExp3,mai
|
||||
syn case match
|
||||
" For "From " matching case is required. The "From " is not matched in quoted
|
||||
" emails
|
||||
syn region mailHeader contains=@mailHeaderFields,@NoSpell start="^From " skip="^\s" end="\v^[-A-Za-z0-9]*([^-A-Za-z0-9:]|$)"me=s-1
|
||||
" According to RFC 2822 any printable ASCII character can appear in a field
|
||||
" name, except ':'.
|
||||
syn region mailHeader contains=@mailHeaderFields,@NoSpell start="^From " skip="^\s" end="\v^[!-9;-~]*([^!-~]|$)"me=s-1
|
||||
syn match mailHeaderKey contained contains=mailEmail,@NoSpell "^From\s.*$"
|
||||
|
||||
syn case ignore
|
||||
" Nothing else depends on case. Headers in properly quoted (with "> " or ">")
|
||||
" emails are matched
|
||||
syn region mailHeader keepend contains=@mailHeaderFields,@mailQuoteExps,@NoSpell start="^\z(\(> \?\)*\)\v(newsgroups|from|((in-)?reply-)?to|b?cc|subject|return-path|received|date|replied):" skip="^\z1\s" end="\v^\z1[-a-z0-9]*([^-a-z0-9:]|$)"me=s-1 end="\v^\z1@!"me=s-1 end="\v^\z1(\> ?)+"me=s-1
|
||||
syn region mailHeader keepend contains=@mailHeaderFields,@mailQuoteExps,@NoSpell start="^\z(\(> \?\)*\)\v(newsgroups|from|((in-)?reply-)?to|b?cc|subject|return-path|received|date|replied):" skip="^\z1\s" end="\v^\z1[!-9;-~]*([^!-~]|$)"me=s-1 end="\v^\z1@!"me=s-1 end="\v^\z1(\> ?)+"me=s-1
|
||||
|
||||
syn region mailHeaderKey contained contains=mailHeaderEmail,mailEmail,@mailQuoteExps,@NoSpell start="\v(^(\> ?)*)@<=(to|b?cc):" skip=",$" end="$"
|
||||
syn match mailHeaderKey contained contains=mailHeaderEmail,mailEmail,@NoSpell "\v(^(\> ?)*)@<=(from|reply-to):.*$"
|
||||
|
||||
59
runtime/syntax/messages.vim
Normal file
59
runtime/syntax/messages.vim
Normal file
@ -0,0 +1,59 @@
|
||||
" Vim syntax file
|
||||
" Language: /var/log/messages file
|
||||
" Maintainer: Yakov Lerner <iler.ml@gmail.com>
|
||||
" Latest Revision: 2006-06-19
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
syn match messagesBegin display '^' nextgroup=messagesDate
|
||||
|
||||
syn match messagesDate contained display '\a\a\a [ 0-9]\d *'
|
||||
\ nextgroup=messagesHour
|
||||
|
||||
syn match messagesHour contained display '\d\d:\d\d:\d\d\s*'
|
||||
\ nextgroup=messagesHost
|
||||
|
||||
syn match messagesHost contained display '\S*\s*'
|
||||
\ nextgroup=messagesLabel
|
||||
|
||||
syn match messagesLabel contained display '\s*[^:]*:\s*'
|
||||
\ nextgroup=messagesText contains=messagesKernel,messagesPID
|
||||
|
||||
syn match messagesPID contained display '\[\zs\d\+\ze\]'
|
||||
|
||||
syn match messagesKernel contained display 'kernel:'
|
||||
|
||||
|
||||
syn match messagesIP '\d\+\.\d\+\.\d\+\.\d\+'
|
||||
|
||||
syn match messagesURL '\w\+://\S\+'
|
||||
|
||||
syn match messagesText contained display '.*'
|
||||
\ contains=messagesNumber,messagesIP,messagesURL,messagesError
|
||||
|
||||
syn match messagesNumber contained '0x[0-9a-fA-F]*\|\[<[0-9a-f]\+>\]\|\<\d[0-9a-fA-F]*'
|
||||
|
||||
syn match messagesError contained '\c.*\<\(FATAL\|ERROR\|ERRORS\|FAILED\|FAILURE\).*'
|
||||
|
||||
|
||||
hi def link messagesDate Constant
|
||||
hi def link messagesHour Type
|
||||
hi def link messagesHost Identifier
|
||||
hi def link messagesLabel Operator
|
||||
hi def link messagesPID Constant
|
||||
hi def link messagesKernel Special
|
||||
hi def link messagesError ErrorMsg
|
||||
hi def link messagesIP Constant
|
||||
hi def link messagesURL Underlined
|
||||
hi def link messagesText Normal
|
||||
hi def link messagesNumber Number
|
||||
|
||||
let b:current_syntax = "messages"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@ -1,129 +1,254 @@
|
||||
" Created : Wed 26 Apr 2006 01:20:53 AM CDT
|
||||
" Modified : Thu 27 Apr 2006 02:29:25 PM CDT
|
||||
" Modified : Mon 20 Nov 2006 12:14:16 AM PST
|
||||
" Author : Gautam Iyer <gi1242@users.sourceforge.net>
|
||||
" Description : Syntax file for mrxvtrc
|
||||
" Description : Vim syntax file for mrxvtrc (for mrxvt-0.5.0 and up)
|
||||
|
||||
" Quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Define options.
|
||||
let s:boolOpts = '(highlightTabOnBell|syncTabTitle|hideTabbar|autohideTabbar|bottomTabbar|hideButtons|syncTabIcon|veryBoldFont|maximized|fullscreen|reverseVideo|loginShell|jumpScroll|scrollBar|scrollbarRight|scrollbarFloating|scrollTtyOutputInhibit|scrollTtyKeypress|scrollWithBuffer|transparent|transparentForce|transparentScrollbar|transparentMenubar|transparentTabbar|tabUsePixmap|utmpInhibit|visualBell|mapAlert|meta8|mouseWheelScrollPage|multibyte_cursor|tripleclickwords|showMenu|xft|xftNomFont|xftSlowOutput|xftAntialias|xftHinting|xftAutoHint|xftGlobalAdvance|tabShell|cmdAllTabs|cmdInitTabs|protectSecondary|thai|borderLess|overrideRedirect|holdExit|broadcast|smartResize|smoothResize|pointerBlank|cursorBlink|noSysConfig|disableMacros|linuxHomeEndKey|sessionMgt)'
|
||||
|
||||
let s:colorOpts = '(vt\d+.(foreground|background)|background|foreground|ufBackground|textShadow|i?tab(Foreground|Background)|color([0-9]|1[0-5]|BD|UL|RV)|(scroll|trough|highlight|cursor|pointer|border|tint)Color|cursorColor2)'
|
||||
|
||||
let s:numOpts = '(vt\d+.saveLines|maxTabWidth|minVisibleTabs|saveLines|scrollbarThickness|xftmSize|xftSize|desktop|externalBorder|internalBorder|lineSpace|pointerBlankDelay|cursorBlinkInterval|initTermNumber|shading|backgroundFade|bgRefreshInterval|fading|opacity|opacityDegree|xftPSize)'
|
||||
|
||||
let s:strOpts = '(vt\d+\.(tabTitle|command)|tabTitle|termName|title|clientName|iconName|bellCommand|holdExitText|backspaceKey|deleteKey|printPipe|cutChars|answerbackString|smClientID|geometry|confFileSave|path|boldFont|m?font[1-5]?|xftFont|xftmFont|xftPFont|inputMethod|greektoggle_key|menu|menubarPixmap|vt\d+\.Pixmap|Pixmap|scrollbarPixmap|tabbarPixmap|appIcon|multichar_encoding)'
|
||||
|
||||
syn case match
|
||||
|
||||
syn match mrxvtrcComment contains=@Spell '^\s*!.*$'
|
||||
syn match mrxvtrcComment '\v^\s*!\s*\w+[.*]\w+.*:.*'
|
||||
" Errors
|
||||
syn match mrxvtrcError contained '\v\S+'
|
||||
|
||||
" Comments
|
||||
syn match mrxvtrcComment contains=@Spell '^\s*[!#].*$'
|
||||
syn match mrxvtrcComment '\v^\s*[#!]\s*\w+[.*]\w+.*:.*'
|
||||
|
||||
"
|
||||
" Generic options (string / color / number / boolean)
|
||||
" Options.
|
||||
"
|
||||
syn match mrxvtrcOptErr '\v^\s*\w+[.*]?.{-}(:|$)'
|
||||
exec 'syn match mrxvtrcBoolOpts nextgroup=mrxvtrcBoolVal,mrxvtrcValErr'
|
||||
\ '"\v^\w+[.*]'.s:boolOpts.':\s*"'
|
||||
exec 'syn match mrxvtrcNumOpts nextgroup=mrxvtrcNumVal,mrxvtrcValErr'
|
||||
\ '"\v^\w+[.*]'.s:numOpts.':\s*"'
|
||||
exec 'syn match mrxvtrcColorOpts nextgroup=mrxvtrcColorVal'
|
||||
\ '"\v^\w+[.*]'.s:colorOpts.':\s*"'
|
||||
exec 'syn match mrxvtrcStrOpts nextgroup=mrxvtrcStrVal,mrxvtrcValErr'
|
||||
\ '"\v^\w+[.*]'.s:strOpts.':\s*"'
|
||||
syn match mrxvtrcClass '\v^\s*\w+[.*]'
|
||||
\ nextgroup=mrxvtrcOptions,mrxvtrcProfile,@mrxvtrcPOpts,mrxvtrcError
|
||||
|
||||
" Boolean options
|
||||
syn keyword mrxvtrcOptions contained nextgroup=mrxvtrcBColon,mrxvtrcError
|
||||
\ highlightTabOnBell syncTabTitle hideTabbar
|
||||
\ autohideTabbar bottomTabbar hideButtons
|
||||
\ syncTabIcon veryBoldFont maximized
|
||||
\ fullscreen reverseVideo loginShell
|
||||
\ jumpScroll scrollBar scrollbarRight
|
||||
\ scrollbarFloating scrollTtyOutputInhibit
|
||||
\ scrollTtyKeypress scrollWithBuffer
|
||||
\ transparentForce transparentScrollbar
|
||||
\ transparentMenubar transparentTabbar
|
||||
\ tabUsePixmap utmpInhibit visualBell mapAlert
|
||||
\ meta8 mouseWheelScrollPage multibyte_cursor
|
||||
\ tripleclickwords showMenu xft xftNomFont
|
||||
\ xftSlowOutput xftAntialias xftHinting
|
||||
\ xftAutoHint xftGlobalAdvance cmdAllTabs
|
||||
\ protectSecondary thai borderLess
|
||||
\ overrideRedirect broadcast
|
||||
\ smartResize smoothResize pointerBlank
|
||||
\ cursorBlink noSysConfig disableMacros
|
||||
\ linuxHomeEndKey sessionMgt
|
||||
syn match mrxvtrcOptions contained nextgroup=mrxvtrcBColon,mrxvtrcError
|
||||
\ '\v<transparent>'
|
||||
syn match mrxvtrcBColon contained skipwhite
|
||||
\ nextgroup=mrxvtrcBoolVal,mrxvtrcError ':'
|
||||
syn case ignore
|
||||
|
||||
syn match mrxvtrcValErr contained '\v.+$'
|
||||
syn keyword mrxvtrcBoolVal contained 0 1 yes no on off true false
|
||||
syn match mrxvtrcStrVal contained '\v.+$'
|
||||
syn match mrxvtrcColorVal contained '\v#[0-9a-f]{6}\s*$'
|
||||
syn match mrxvtrcNumVal contained '\v[+-]?(0[0-7]+|\d+|0x[0-9a-f]+)$'
|
||||
|
||||
syn keyword mrxvtrcBoolVal contained skipwhite nextgroup=mrxvtrcError
|
||||
\ 0 1 yes no on off true false
|
||||
syn case match
|
||||
|
||||
"
|
||||
" Options with special values
|
||||
"
|
||||
syn match mrxvtrcOptions nextgroup=mrxvtrcSBstyle,mrxvtrcValErr
|
||||
\ '\v^\w+[.*]scrollbarStyle:\s*'
|
||||
syn keyword mrxvtrcSBstyle contained plain xterm rxvt next sgi
|
||||
" Color options
|
||||
syn keyword mrxvtrcOptions contained nextgroup=mrxvtrcCColon,mrxvtrcError
|
||||
\ ufBackground textShadow tabForeground
|
||||
\ itabForeground tabBackground itabBackground
|
||||
\ scrollColor troughColor highlightColor
|
||||
\ cursorColor cursorColor2 pointerColor
|
||||
\ borderColor tintColor
|
||||
syn match mrxvtrcOptions contained nextgroup=mrxvtrcCColon,mrxvtrcError
|
||||
\ '\v<color([0-9]|1[0-5]|BD|UL|RV)>'
|
||||
syn match mrxvtrcCColon contained skipwhite
|
||||
\ nextgroup=mrxvtrcColorVal ':'
|
||||
syn match mrxvtrcColorVal contained skipwhite nextgroup=mrxvtrcError
|
||||
\ '\v#[0-9a-fA-F]{6}'
|
||||
|
||||
syn match mrxvtrcOptions nextgroup=mrxvtrcSBalign,mrxvtrcValErr
|
||||
\ '\v^\w+[.*]scrollbarAlign:\s*'
|
||||
syn keyword mrxvtrcSBalign contained top bottom
|
||||
" Numeric options
|
||||
syn keyword mrxvtrcOptions contained nextgroup=mrxvtrcNColon,mrxvtrcError
|
||||
\ maxTabWidth minVisibleTabs
|
||||
\ scrollbarThickness xftmSize xftSize desktop
|
||||
\ externalBorder internalBorder lineSpace
|
||||
\ pointerBlankDelay cursorBlinkInterval
|
||||
\ shading backgroundFade bgRefreshInterval
|
||||
\ fading focusDelay opacity opacityDegree
|
||||
\ xftPSize
|
||||
syn match mrxvtrcNColon contained skipwhite
|
||||
\ nextgroup=mrxvtrcNumVal,mrxvtrcError ':'
|
||||
syn match mrxvtrcNumVal contained skipwhite nextgroup=mrxvtrcError
|
||||
\ '\v[+-]?<(0[0-7]+|\d+|0x[0-9a-f]+)>'
|
||||
|
||||
syn match mrxvtrcOptions nextgroup=mrxvtrcTSmode,mrxvtrcValErr
|
||||
\ '\v^\w+[.*]textShadowMode:\s*'
|
||||
syn keyword mrxvtrcTSmode contained
|
||||
" String options
|
||||
syn keyword mrxvtrcOptions contained nextgroup=mrxvtrcSColon,mrxvtrcError
|
||||
\ tabTitle termName title clientName iconName
|
||||
\ bellCommand backspaceKey deleteKey
|
||||
\ printPipe cutChars answerbackString
|
||||
\ smClientID geometry path boldFont xftFont
|
||||
\ xftmFont xftPFont inputMethod
|
||||
\ greektoggle_key menu menubarPixmap
|
||||
\ scrollbarPixmap tabbarPixmap appIcon
|
||||
\ multichar_encoding initProfileList
|
||||
\ winTitleFormat
|
||||
syn match mrxvtrcOptions contained nextgroup=mrxvtrcSColon,mrxvtrcError
|
||||
\ '\v<m?font[1-5]?>'
|
||||
syn match mrxvtrcSColon contained skipwhite nextgroup=mrxvtrcStrVal ':'
|
||||
syn match mrxvtrcStrVal contained '\v\S.*'
|
||||
|
||||
" Profile options
|
||||
syn cluster mrxvtrcPOpts contains=mrxvtrcPSOpts,mrxvtrcPCOpts,mrxvtrcPNOpts
|
||||
syn match mrxvtrcProfile contained nextgroup=@mrxvtrcPOpts,mrxvtrcError
|
||||
\ '\vprofile\d+\.'
|
||||
syn keyword mrxvtrcPSOpts contained nextgroup=mrxvtrcSColon,mrxvtrcError
|
||||
\ tabTitle command holdExitText holdExitTitle
|
||||
\ Pixmap workingDirectory titleFormat
|
||||
syn keyword mrxvtrcPCOpts contained nextgroup=mrxvtrcCColon,mrxvtrcError
|
||||
\ background foreground
|
||||
syn keyword mrxvtrcPNOpts contained nextgroup=mrxvtrcNColon,mrxvtrcError
|
||||
\ holdExit saveLines
|
||||
|
||||
" scrollbarStyle
|
||||
syn match mrxvtrcOptions contained skipwhite
|
||||
\ nextgroup=mrxvtrcSBstyle,mrxvtrcError
|
||||
\ '\v<scrollbarStyle:'
|
||||
syn keyword mrxvtrcSBstyle contained skipwhite nextgroup=mrxvtrcError
|
||||
\ plain xterm rxvt next sgi
|
||||
|
||||
" scrollbarAlign
|
||||
syn match mrxvtrcOptions contained skipwhite
|
||||
\ nextgroup=mrxvtrcSBalign,mrxvtrcError
|
||||
\ '\v<scrollbarAlign:'
|
||||
syn keyword mrxvtrcSBalign contained skipwhite nextgroup=mrxvtrcError
|
||||
\ top bottom
|
||||
|
||||
" textShadowMode
|
||||
syn match mrxvtrcOptions contained skipwhite
|
||||
\ nextgroup=mrxvtrcTSmode,mrxvtrcError
|
||||
\ '\v<textShadowMode:'
|
||||
syn keyword mrxvtrcTSmode contained skipwhite nextgroup=mrxvtrcError
|
||||
\ none top bottom left right topleft topright
|
||||
\ botleft botright
|
||||
|
||||
syn match mrxvtrcOptions nextgroup=mrxvtrcGrkKbd,mrxvtrcValErr
|
||||
\ '\v^\w+[.*]greek_keyboard:\s*'
|
||||
syn keyword mrxvtrcGrkKbd contained iso ibm
|
||||
" greek_keyboard
|
||||
syn match mrxvtrcOptions contained skipwhite
|
||||
\ nextgroup=mrxvtrcGrkKbd,mrxvtrcError
|
||||
\ '\v<greek_keyboard:'
|
||||
syn keyword mrxvtrcGrkKbd contained skipwhite nextgroup=mrxvtrcError
|
||||
\ iso ibm
|
||||
|
||||
syn match mrxvtrcOptions nextgroup=mrxvtrcXftWt,mrxvtrcValErr
|
||||
\ '\v^\w+[.*]xftWeight:\s*'
|
||||
syn keyword mrxvtrcXftWt contained light medium bold
|
||||
" xftWeight
|
||||
syn match mrxvtrcOptions contained skipwhite
|
||||
\ nextgroup=mrxvtrcXftWt,mrxvtrcError
|
||||
\ '\v<(xftWeight|xftBoldWeight):'
|
||||
syn keyword mrxvtrcXftWt contained skipwhite nextgroup=mrxvtrcError
|
||||
\ light medium demibold bold black
|
||||
|
||||
syn match mrxvtrcOptions nextgroup=mrxvtrcXftSl,mrxvtrcValErr
|
||||
\ '\v^\w+[.*]xftSlant:\s*'
|
||||
syn keyword mrxvtrcXftSl contained roman italic oblique
|
||||
" xftSlant
|
||||
syn match mrxvtrcOptions contained skipwhite
|
||||
\ nextgroup=mrxvtrcXftSl,mrxvtrcError
|
||||
\ '\v<xftSlant:'
|
||||
syn keyword mrxvtrcXftSl contained skipwhite nextgroup=mrxvtrcError
|
||||
\ roman italic oblique
|
||||
|
||||
syn match mrxvtrcOptions nextgroup=mrxvtrcXftWd,mrxvtrcValErr
|
||||
\ '\v^\w+[.*]xftWidth:\s*'
|
||||
syn keyword mrxvtrcXftWd contained
|
||||
" xftWidth
|
||||
syn match mrxvtrcOptions contained skipwhite
|
||||
\ nextgroup=mrxvtrcXftWd,mrxvtrcError
|
||||
\ '\v<xftWidth:'
|
||||
syn keyword mrxvtrcXftWd contained skipwhite nextgroup=mrxvtrcError
|
||||
\ ultracondensed ultraexpanded
|
||||
\ condensed expanded normal
|
||||
|
||||
syn match mrxvtrcOptions nextgroup=mrxvtrcXftHt,mrxvtrcValErr
|
||||
\ '\v^\w+[.*]xftRGBA:\s*'
|
||||
syn keyword mrxvtrcXftHt contained rgb bgr vrgb vbgr none
|
||||
" xftRGBA
|
||||
syn match mrxvtrcOptions contained skipwhite
|
||||
\ nextgroup=mrxvtrcXftHt,mrxvtrcError
|
||||
\ '\v<xftRGBA:'
|
||||
syn keyword mrxvtrcXftHt contained skipwhite nextgroup=mrxvtrcError
|
||||
\ rgb bgr vrgb vbgr none
|
||||
|
||||
syn match mrxvtrcOptions nextgroup=mrxvtrcPedit,mrxvtrcValErr
|
||||
\ '\v^\w+[.*]preeditType:\s*'
|
||||
syn keyword mrxvtrcPedit contained OverTheSpot OffTheSpot Root
|
||||
" preeditType
|
||||
syn match mrxvtrcOptions contained skipwhite
|
||||
\ nextgroup=mrxvtrcPedit,mrxvtrcError
|
||||
\ '\v<preeditType:'
|
||||
syn keyword mrxvtrcPedit contained skipwhite nextgroup=mrxvtrcError
|
||||
\ OverTheSpot OffTheSpot Root
|
||||
|
||||
syn match mrxvtrcOptions nextgroup=mrxvtrcMod,mrxvtrcValErr
|
||||
\ '\v^\w+[.*]modifier:\s*'
|
||||
syn keyword mrxvtrcMod contained
|
||||
" modifier
|
||||
syn match mrxvtrcOptions contained skipwhite
|
||||
\ nextgroup=mrxvtrcMod,mrxvtrcError
|
||||
\ '\v<modifier:'
|
||||
syn keyword mrxvtrcMod contained skipwhite nextgroup=mrxvtrcError
|
||||
\ alt meta hyper super mod1 mod2 mod3 mod4 mod5
|
||||
|
||||
syn match mrxvtrcOptions nextgroup=mrxvtrcSelSty,mrxvtrcValErr
|
||||
\ '\v^\w+[.*]selectStyle:\s*'
|
||||
syn keyword mrxvtrcSelSty contained old oldword
|
||||
" selectStyle
|
||||
syn match mrxvtrcOptions contained skipwhite
|
||||
\ nextgroup=mrxvtrcSelSty,mrxvtrcError
|
||||
\ '\v<selectStyle:'
|
||||
syn keyword mrxvtrcSelSty contained skipwhite nextgroup=mrxvtrcError
|
||||
\ old oldword
|
||||
|
||||
|
||||
"
|
||||
" Macros
|
||||
"
|
||||
syn match mrxvtrcOptions nextgroup=mrxvtrcMacro,mrxvtrcValErr
|
||||
\ '\v\c^\w+[.*]macro.(primary\+)?((ctrl|alt|meta|shift)\+)*\w+:\s*'
|
||||
syn keyword mrxvtrcMacro contained nextgroup=mrxvtrcMacroArg
|
||||
\ Dummy Esc Str NewTab Close GotoTab MoveTab
|
||||
\ Scroll Copy Paste ToggleSubwin ResizeFont
|
||||
\ ToggleVeryBold ToggleTransparency
|
||||
\ ToggleBroadcast ToggleHold SetTitle
|
||||
\ PrintScreen SaveConfig ToggleMacros
|
||||
syn match mrxvtrcMacroArg contained '.\+$'
|
||||
syn keyword mrxvtrcOptions contained nextgroup=mrxvtrcKey,mrxvtrcError
|
||||
\ macro
|
||||
syn case ignore
|
||||
syn match mrxvtrcKey contained skipwhite
|
||||
\ nextgroup=mrxvtrcMacro,mrxvtrcError
|
||||
\ '\v\.((primary|add|ctrl|alt|meta|shift)\+)*\w+:'
|
||||
syn case match
|
||||
|
||||
" Macros without arguments
|
||||
syn keyword mrxvtrcMacro contained skipwhite nextgroup=mrxvtrcError
|
||||
\ Dummy Copy Paste ToggleVeryBold
|
||||
\ ToggleTransparency ToggleBroadcast
|
||||
\ ToggleHold SetTitle ToggleMacros
|
||||
\ ToggleFullscreen
|
||||
|
||||
unlet s:strOpts s:boolOpts s:colorOpts s:numOpts
|
||||
" Macros with a string argument
|
||||
syn keyword mrxvtrcMacro contained skipwhite nextgroup=mrxvtrcStrVal
|
||||
\ Esc Str Exec Scroll PrintScreen SaveConfig
|
||||
|
||||
" Macros with a numeric argument
|
||||
syn keyword mrxvtrcMacro contained skipwhite
|
||||
\ nextgroup=mrxvtrcNumVal,mrxvtrcError
|
||||
\ Close GotoTab MoveTab ResizeFont
|
||||
|
||||
" NewTab macro
|
||||
syn keyword mrxvtrcMacro contained skipwhite
|
||||
\ nextgroup=mrxvtrcTitle,mrxvtrcShell,mrxvtrcCmd
|
||||
\ NewTab
|
||||
syn region mrxvtrcTitle contained oneline skipwhite
|
||||
\ nextgroup=mrxvtrcShell,mrxvtrcCmd
|
||||
\ start='"' end='"'
|
||||
syn match mrxvtrcShell contained nextgroup=mrxvtrcCmd '!'
|
||||
syn match mrxvtrcCmd contained '\v[^!" \t].*'
|
||||
|
||||
" ToggleSubwin macro
|
||||
syn keyword mrxvtrcMacro contained skipwhite
|
||||
\ nextgroup=mrxvtrcSubwin,mrxvtrcError
|
||||
\ ToggleSubwin
|
||||
syn match mrxvtrcSubwin contained skipwhite nextgroup=mrxvtrcError
|
||||
\ '\v[-+]?[bmst]>'
|
||||
|
||||
"
|
||||
" Highlighting groups
|
||||
"
|
||||
hi def link mrxvtrcError Error
|
||||
hi def link mrxvtrcComment Comment
|
||||
|
||||
hi def link mrxvtrcBoolOpts Statement
|
||||
hi def link mrxvtrcColorOpts mrxvtrcBoolOpts
|
||||
hi def link mrxvtrcNumOpts mrxvtrcBoolOpts
|
||||
hi def link mrxvtrcStrOpts mrxvtrcBoolOpts
|
||||
hi def link mrxvtrcOptions mrxvtrcBoolOpts
|
||||
hi def link mrxvtrcClass Statement
|
||||
hi def link mrxvtrcOptions mrxvtrcClass
|
||||
hi def link mrxvtrcBColon mrxvtrcClass
|
||||
hi def link mrxvtrcCColon mrxvtrcClass
|
||||
hi def link mrxvtrcNColon mrxvtrcClass
|
||||
hi def link mrxvtrcSColon mrxvtrcClass
|
||||
hi def link mrxvtrcProfile mrxvtrcClass
|
||||
hi def link mrxvtrcPSOpts mrxvtrcClass
|
||||
hi def link mrxvtrcPCOpts mrxvtrcClass
|
||||
hi def link mrxvtrcPNOpts mrxvtrcClass
|
||||
|
||||
hi def link mrxvtrcBoolVal Boolean
|
||||
hi def link mrxvtrcStrVal String
|
||||
@ -143,9 +268,10 @@ hi def link mrxvtrcMod mrxvtrcStrVal
|
||||
hi def link mrxvtrcSelSty mrxvtrcStrVal
|
||||
|
||||
hi def link mrxvtrcMacro Identifier
|
||||
hi def link mrxvtrcMacroArg String
|
||||
|
||||
hi def link mrxvtrcOptErr Error
|
||||
hi def link mrxvtrcValErr Error
|
||||
hi def link mrxvtrcKey mrxvtrcClass
|
||||
hi def link mrxvtrcTitle mrxvtrcStrVal
|
||||
hi def link mrxvtrcShell Special
|
||||
hi def link mrxvtrcCmd PreProc
|
||||
hi def link mrxvtrcSubwin mrxvtrcStrVal
|
||||
|
||||
let b:current_syntax = "mrxvtrc"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Perl POD format
|
||||
" Maintainer: Scott Bigham <dsb@killerbunnies.org>
|
||||
" Last Change: 2005 Jul 05
|
||||
" Last Change: 2007 Jan 21
|
||||
|
||||
" To add embedded POD documentation highlighting to your syntax file, add
|
||||
" the commands:
|
||||
@ -53,6 +53,7 @@ syn match podSpecial "[$@%]\I\i*\(::\I\i*\)*\>" contains=@NoSpell
|
||||
|
||||
" Special formatting sequences
|
||||
syn region podFormat start="[IBSCLFX]<[^<]"me=e-1 end=">" oneline contains=podFormat,@NoSpell
|
||||
syn region podFormat start="[IBSCLFX]<<\s" end="\s>>" oneline contains=podFormat,@NoSpell
|
||||
syn match podFormat "Z<>"
|
||||
syn match podFormat "E<\(\d\+\|\I\i*\)>" contains=podEscape,podEscape2,@NoSpell
|
||||
syn match podEscape "\I\i*>"me=e-1 contained contains=@NoSpell
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Python
|
||||
" Maintainer: Neil Schemenauer <nas@python.ca>
|
||||
" Updated: 2002-10-18
|
||||
" Updated: 2006-10-15
|
||||
" Added Python 2.4 features 2006 May 4 (Dmitry Vasiliev)
|
||||
"
|
||||
" Options to control Python syntax highlighting:
|
||||
@ -40,7 +40,7 @@ endif
|
||||
syn keyword pythonStatement break continue del
|
||||
syn keyword pythonStatement except exec finally
|
||||
syn keyword pythonStatement pass print raise
|
||||
syn keyword pythonStatement return try
|
||||
syn keyword pythonStatement return try with
|
||||
syn keyword pythonStatement global assert
|
||||
syn keyword pythonStatement lambda yield
|
||||
syn keyword pythonStatement def class nextgroup=pythonFunction skipwhite
|
||||
@ -50,21 +50,21 @@ syn keyword pythonConditional if elif else
|
||||
syn keyword pythonOperator and in is not or
|
||||
" AS will be a keyword in Python 3
|
||||
syn keyword pythonPreCondit import from as
|
||||
syn match pythonComment "#.*$" contains=pythonTodo
|
||||
syn match pythonComment "#.*$" contains=pythonTodo,@Spell
|
||||
syn keyword pythonTodo TODO FIXME XXX contained
|
||||
|
||||
" Decorators (new in Python 2.4)
|
||||
syn match pythonDecorator "@" display nextgroup=pythonFunction skipwhite
|
||||
|
||||
" strings
|
||||
syn region pythonString matchgroup=Normal start=+[uU]\='+ end=+'+ skip=+\\\\\|\\'+ contains=pythonEscape
|
||||
syn region pythonString matchgroup=Normal start=+[uU]\="+ end=+"+ skip=+\\\\\|\\"+ contains=pythonEscape
|
||||
syn region pythonString matchgroup=Normal start=+[uU]\="""+ end=+"""+ contains=pythonEscape
|
||||
syn region pythonString matchgroup=Normal start=+[uU]\='''+ end=+'''+ contains=pythonEscape
|
||||
syn region pythonRawString matchgroup=Normal start=+[uU]\=[rR]'+ end=+'+ skip=+\\\\\|\\'+
|
||||
syn region pythonRawString matchgroup=Normal start=+[uU]\=[rR]"+ end=+"+ skip=+\\\\\|\\"+
|
||||
syn region pythonRawString matchgroup=Normal start=+[uU]\=[rR]"""+ end=+"""+
|
||||
syn region pythonRawString matchgroup=Normal start=+[uU]\=[rR]'''+ end=+'''+
|
||||
syn region pythonString matchgroup=Normal start=+[uU]\='+ end=+'+ skip=+\\\\\|\\'+ contains=pythonEscape,@Spell
|
||||
syn region pythonString matchgroup=Normal start=+[uU]\="+ end=+"+ skip=+\\\\\|\\"+ contains=pythonEscape,@Spell
|
||||
syn region pythonString matchgroup=Normal start=+[uU]\="""+ end=+"""+ contains=pythonEscape,@Spell
|
||||
syn region pythonString matchgroup=Normal start=+[uU]\='''+ end=+'''+ contains=pythonEscape,@Spell
|
||||
syn region pythonRawString matchgroup=Normal start=+[uU]\=[rR]'+ end=+'+ skip=+\\\\\|\\'+ contains=@Spell
|
||||
syn region pythonRawString matchgroup=Normal start=+[uU]\=[rR]"+ end=+"+ skip=+\\\\\|\\"+ contains=@Spell
|
||||
syn region pythonRawString matchgroup=Normal start=+[uU]\=[rR]"""+ end=+"""+ contains=@Spell
|
||||
syn region pythonRawString matchgroup=Normal start=+[uU]\=[rR]'''+ end=+'''+ contains=@Spell
|
||||
syn match pythonEscape +\\[abfnrtv'"\\]+ contained
|
||||
syn match pythonEscape "\\\o\{1,3}" contained
|
||||
syn match pythonEscape "\\x\x\{2}" contained
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
" Vim syntax file
|
||||
" Language: TCL/TK
|
||||
" Maintainer: Dean Copsey <copsey@cs.ucdavis.edu>
|
||||
" Maintainer: Brett Cannon <brett@python.org>
|
||||
" (previously Dean Copsey <copsey@cs.ucdavis.edu>)
|
||||
" (previously Matt Neumann <mattneu@purpleturtle.com>)
|
||||
" (previously Allan Kelly <allan@fruitloaf.co.uk>)
|
||||
" Original: Robin Becker <robin@jessikat.demon.co.uk>
|
||||
" Last Change: 2004 May 16
|
||||
" Last Change: 2006 Nov 17
|
||||
"
|
||||
" Keywords TODO: format clock click anchor
|
||||
|
||||
@ -17,9 +18,16 @@ elseif exists("b:current_syntax")
|
||||
endif
|
||||
|
||||
" A bunch of useful keywords
|
||||
syn keyword tclStatement proc global return lindex
|
||||
syn keyword tclStatement llength lappend lreplace lrange list concat incr
|
||||
syn keyword tclStatement upvar set
|
||||
syn keyword tclStatement tell socket subst open eof pwd glob list exec pid
|
||||
syn keyword tclStatement auto_load_index time unknown eval lrange fblocked
|
||||
syn keyword tclStatement lsearch auto_import gets lappend proc variable llength
|
||||
syn keyword tclStatement auto_execok return linsert error catch clock info
|
||||
syn keyword tclStatement split array fconfigure concat join lreplace source
|
||||
syn keyword tclStatement fcopy global auto_qualify update close cd auto_load
|
||||
syn keyword tclStatement file append format read package set binary namespace
|
||||
syn keyword tclStatement scan trace seek flush after vwait uplevel lset rename
|
||||
syn keyword tclStatement fileevent regexp upvar unset encoding expr load regsub
|
||||
syn keyword tclStatement interp exit puts incr lindex lsort tclLog string
|
||||
syn keyword tclLabel case default
|
||||
syn keyword tclConditional if then else elseif switch
|
||||
syn keyword tclRepeat while for foreach break continue
|
||||
|
||||
@ -1,118 +1,194 @@
|
||||
" Vim syntax file
|
||||
" Language: Z shell (zsh)
|
||||
" Maintainer: Felix von Leitner <leitner@math.fu-berlin.de>
|
||||
" Heavily based on sh.vim by Lennart Schultz
|
||||
" Last Change: 2003 May 11
|
||||
" Language: Zsh shell script
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2006-08-06
|
||||
|
||||
" 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")
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" String and Character contstants
|
||||
" Highlight special characters (those which have a backslash) differently
|
||||
syn match zshSpecial "\\\d\d\d\|\\[abcfnrtv\\']"
|
||||
syn region zshSinglequote start=+'+ skip=+\\'+ end=+'+
|
||||
" A bunch of useful zsh keywords
|
||||
" syn keyword zshFunction function
|
||||
syn keyword zshStatement bg break cd chdir continue echo eval exec
|
||||
syn keyword zshStatement exit export fg getopts hash jobs kill
|
||||
syn keyword zshStatement pwd read readonly return set zshift function
|
||||
syn keyword zshStatement stop suspend test times trap type ulimit
|
||||
syn keyword zshStatement umask unset wait setopt compctl source
|
||||
syn keyword zshStatement whence disown shift which unhash unalias
|
||||
syn keyword zshStatement alias functions unfunction getln disable
|
||||
syn keyword zshStatement vared getopt enable unsetopt autoload
|
||||
syn keyword zshStatement bindkey pushln command limit unlimit fc
|
||||
syn keyword zshStatement print builtin noglob sched r time
|
||||
syn keyword zshStatement typeset declare local integer
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
syn keyword zshConditional if else esac case then elif fi in
|
||||
syn keyword zshRepeat while for do done
|
||||
setlocal iskeyword=@,48-57,_,-
|
||||
|
||||
" Following is worth to notice: command substitution, file redirection and functions (so these features turns red)
|
||||
syn match zshFunctionName "\h\w*\s*()"
|
||||
syn region zshCommandSub start=+`+ skip=+\\`+ end=+`+
|
||||
" contains=ALLBUT,zshFunction
|
||||
syn match zshRedir "\d\=\(<\|<<\|>\|>>\)\(|\|&\d\)\="
|
||||
syn keyword zshTodo contained TODO FIXME XXX NOTE
|
||||
|
||||
syn keyword zshTodo contained TODO
|
||||
syn region zshComment display oneline start='\%(^\|\s\)#' end='$'
|
||||
\ contains=zshTodo,@Spell
|
||||
|
||||
syn keyword zshShellVariables USER LOGNAME HOME PATH CDPATH SHELL
|
||||
syn keyword zshShellVariables LC_TYPE LC_MESSAGE MAIL MAILCHECK
|
||||
syn keyword zshShellVariables PS1 PS2 IFS EGID EUID ERRNO GID UID
|
||||
syn keyword zshShellVariables HOST LINENO MACHTYPE OLDPWD OPTARG
|
||||
syn keyword zshShellVariables OPTIND OSTYPE PPID PWD RANDOM SECONDS
|
||||
syn keyword zshShellVariables SHLVL TTY signals TTYIDLE USERNAME
|
||||
syn keyword zshShellVariables VENDOR ZSH_NAME ZSH_VERSION ARGV0
|
||||
syn keyword zshShellVariables BAUD COLUMNS cdpath DIRSTACKSIZE
|
||||
syn keyword zshShellVariables FCEDIT fignore fpath histchars HISTCHARS
|
||||
syn keyword zshShellVariables HISTFILE HISTSIZE KEYTIMEOUT LANG
|
||||
syn keyword zshShellVariables LC_ALL LC_COLLATE LC_CTYPE LC_MESSAGES
|
||||
syn keyword zshShellVariables LC_TIME LINES LISTMAX LOGCHECK mailpath
|
||||
syn keyword zshShellVariables MAILPATH MANPATH manpath module_path
|
||||
syn keyword zshShellVariables MODULE_PATH NULLCMD path POSTEDIT
|
||||
syn keyword zshShellVariables PS3 PS4 PROMPT PROMPT2 PROMPT3 PROMPT4
|
||||
syn keyword zshShellVariables psvar PSVAR prompt READNULLCMD
|
||||
syn keyword zshShellVariables REPORTTIME RPROMPT RPS1 SAVEHIST
|
||||
syn keyword zshShellVariables SPROMPT STTY TIMEFMT TMOUT TMPPREFIX
|
||||
syn keyword zshShellVariables watch WATCH WATCHFMT WORDCHARS ZDOTDIR
|
||||
syn match zshSpecialShellVar "\$[-#@*$?!0-9]"
|
||||
syn keyword zshSetVariables ignoreeof noclobber
|
||||
syn region zshDerefOpr start="\${" end="}" contains=zshShellVariables
|
||||
syn match zshDerefIdentifier "\$[a-zA-Z_][a-zA-Z0-9_]*\>"
|
||||
syn match zshOperator "[][}{&;|)(]"
|
||||
syn match zshPreProc '^\%1l#\%(!\|compdef\|autoload\).*$'
|
||||
|
||||
syn match zshQuoted '\\.'
|
||||
syn region zshString matchgroup=zshStringDelimiter start=+"+ end=+"+
|
||||
\ contains=zshQuoted,@zshDerefs,@zshSubst
|
||||
syn region zshString matchgroup=zshStringDelimiter start=+'+ end=+'+
|
||||
" XXX: This should probably be more precise, but Zsh seems a bit confused about it itself
|
||||
syn region zshPOSIXString matchgroup=zshStringDelimiter start=+\$'+
|
||||
\ end=+'+ contains=zshQuoted
|
||||
syn match zshJobSpec '%\(\d\+\|?\=\w\+\|[%+-]\)'
|
||||
|
||||
syn keyword zshPrecommand noglob nocorrect exec command builtin - time
|
||||
|
||||
syn match zshNumber "-\=\<\d\+\>"
|
||||
syn match zshComment "#.*$" contains=zshNumber,zshTodo
|
||||
syn keyword zshDelimiter do done
|
||||
|
||||
syn keyword zshConditional if then elif else fi case in esac select
|
||||
|
||||
syn match zshTestOpr "-\<[oeaznlg][tfqet]\=\>\|!\==\|-\<[b-gkLprsStuwjxOG]\>"
|
||||
"syn region zshTest start="\[" skip="\\$" end="\]" contains=zshString,zshTestOpr,zshDerefIdentifier,zshDerefOpr
|
||||
syn region zshString start=+"+ skip=+\\"+ end=+"+ contains=zshSpecial,zshOperator,zshDerefIdentifier,zshDerefOpr,zshSpecialShellVar,zshSinglequote,zshCommandSub
|
||||
syn keyword zshRepeat for while until repeat foreach
|
||||
|
||||
" 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_zsh_syntax_inits")
|
||||
if version < 508
|
||||
let did_zsh_syntax_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
syn keyword zshException always
|
||||
|
||||
HiLink zshSinglequote zshString
|
||||
HiLink zshConditional zshStatement
|
||||
HiLink zshRepeat zshStatement
|
||||
HiLink zshFunctionName zshFunction
|
||||
HiLink zshCommandSub zshOperator
|
||||
HiLink zshRedir zshOperator
|
||||
HiLink zshSetVariables zshShellVariables
|
||||
HiLink zshSpecialShellVar zshShellVariables
|
||||
HiLink zshTestOpr zshOperator
|
||||
HiLink zshDerefOpr zshSpecial
|
||||
HiLink zshDerefIdentifier zshShellVariables
|
||||
HiLink zshOperator Operator
|
||||
HiLink zshStatement Statement
|
||||
HiLink zshNumber Number
|
||||
HiLink zshString String
|
||||
HiLink zshComment Comment
|
||||
HiLink zshSpecial Special
|
||||
HiLink zshTodo Todo
|
||||
HiLink zshShellVariables Special
|
||||
" hi zshOperator term=underline ctermfg=6 guifg=Purple gui=bold
|
||||
" hi zshShellVariables term=underline ctermfg=2 guifg=SeaGreen gui=bold
|
||||
" hi zshFunction term=bold ctermbg=1 guifg=Red
|
||||
syn keyword zshKeyword function nextgroup=zshKSHFunction skipwhite
|
||||
|
||||
delcommand HiLink
|
||||
syn match zshKSHFunction contained '\k\+'
|
||||
syn match zshFunction '^\s*\k\+\ze\s*()'
|
||||
|
||||
syn match zshOperator '||\|&&\|;\|&!\='
|
||||
|
||||
syn match zshRedir '\d\=\(<\|<>\|<<<\|<&\s*[0-9p-]\=\)'
|
||||
syn match zshRedir '\d\=\(>\|>>\|>&\s*[0-9p-]\=\|&>\|>>&\|&>>\)[|!]\='
|
||||
syn match zshRedir '|&\='
|
||||
|
||||
syn region zshHereDoc matchgroup=zshRedir start='<<\s*\z(\S*\)'
|
||||
\ end='^\z1\>' contains=@zshSubst
|
||||
syn region zshHereDoc matchgroup=zshRedir start='<<-\s*\z(\S*\)'
|
||||
\ end='^\s*\z1\>' contains=@zshSubst
|
||||
syn region zshHereDoc matchgroup=zshRedir
|
||||
\ start=+<<\s*\(["']\)\z(\S*\)\1+ end='^\z1\>'
|
||||
syn region zshHereDoc matchgroup=zshRedir
|
||||
\ start=+<<-\s*\(["']\)\z(\S*\)\1+
|
||||
\ end='^\s*\z1\>'
|
||||
|
||||
syn match zshVariable '\<\h\w*\ze+\=='
|
||||
" XXX: how safe is this?
|
||||
syn region zshVariable oneline
|
||||
\ start='\$\@<!\<\h\w*\[' end='\]\ze+\=='
|
||||
\ contains=@zshSubst
|
||||
|
||||
syn cluster zshDerefs contains=zshShortDeref,zshLongDeref,zshDeref
|
||||
|
||||
if !exists("g:zsh_syntax_variables")
|
||||
let s:zsh_syntax_variables = 'all'
|
||||
else
|
||||
let s:zsh_syntax_variables = g:zsh_syntax_variables
|
||||
endif
|
||||
|
||||
if s:zsh_syntax_variables =~ 'short\|all'
|
||||
syn match zshShortDeref '\$[!#$*@?_-]\w\@!'
|
||||
syn match zshShortDeref '\$[=^~]*[#+]*\d\+\>'
|
||||
endif
|
||||
|
||||
if s:zsh_syntax_variables =~ 'long\|all'
|
||||
syn match zshLongDeref '\$\%(ARGC\|argv\|status\|pipestatus\|CPUTYPE\|EGID\|EUID\|ERRNO\|GID\|HOST\|LINENO\|LOGNAME\)'
|
||||
syn match zshLongDeref '\$\%(MACHTYPE\|OLDPWD OPTARG\|OPTIND\|OSTYPE\|PPID\|PWD\|RANDOM\|SECONDS\|SHLVL\|signals\)'
|
||||
syn match zshLongDeref '\$\%(TRY_BLOCK_ERROR\|TTY\|TTYIDLE\|UID\|USERNAME\|VENDOR\|ZSH_NAME\|ZSH_VERSION\|REPLY\|reply\|TERM\)'
|
||||
endif
|
||||
|
||||
if s:zsh_syntax_variables =~ 'all'
|
||||
syn match zshDeref '\$[=^~]*[#+]*\h\w*\>'
|
||||
else
|
||||
syn match zshDeref transparent '\$[=^~]*[#+]*\h\w*\>'
|
||||
endif
|
||||
|
||||
syn match zshCommands '\%(^\|\s\)[.:]\ze\s'
|
||||
syn keyword zshCommands alias autoload bg bindkey break bye cap cd
|
||||
\ chdir clone comparguments compcall compctl
|
||||
\ compdescribe compfiles compgroups compquote
|
||||
\ comptags comptry compvalues continue dirs
|
||||
\ disable disown echo echotc echoti emulate
|
||||
\ enable eval exec exit export false fc fg
|
||||
\ functions getcap getln getopts hash history
|
||||
\ jobs kill let limit log logout popd print
|
||||
\ printf pushd pushln pwd r read readonly
|
||||
\ rehash return sched set setcap setopt shift
|
||||
\ source stat suspend test times trap true
|
||||
\ ttyctl type ulimit umask unalias unfunction
|
||||
\ unhash unlimit unset unsetopt vared wait
|
||||
\ whence where which zcompile zformat zftp zle
|
||||
\ zmodload zparseopts zprof zpty zregexparse
|
||||
\ zsocket zstyle ztcp
|
||||
|
||||
syn keyword zshTypes float integer local typeset declare
|
||||
|
||||
" XXX: this may be too much
|
||||
" syn match zshSwitches '\s\zs--\=[a-zA-Z0-9-]\+'
|
||||
|
||||
syn match zshNumber '[+-]\=\<\d\+\>'
|
||||
syn match zshNumber '[+-]\=\<0x\x\+\>'
|
||||
syn match zshNumber '[+-]\=\<0\o\+\>'
|
||||
syn match zshNumber '[+-]\=\d\+#[-+]\=\w\+\>'
|
||||
syn match zshNumber '[+-]\=\d\+\.\d\+\>'
|
||||
|
||||
syn cluster zshSubst contains=zshSubst,zshOldSubst,zshMathSubst
|
||||
syn region zshSubst matchgroup=zshSubstDelim transparent
|
||||
\ start='\$(' skip='\\)' end=')' contains=TOP
|
||||
syn region zshParentheses transparent start='(' skip='\\)' end=')'
|
||||
syn region zshMathSubst matchgroup=zshSubstDelim transparent
|
||||
\ start='\$((' skip='\\)'
|
||||
\ matchgroup=zshSubstDelim end='))'
|
||||
\ contains=zshParentheses,@zshSubst,zshNumber,
|
||||
\ @zshDerefs,zshString
|
||||
syn region zshBrackets contained transparent start='{' skip='\\}'
|
||||
\ end='}'
|
||||
syn region zshSubst matchgroup=zshSubstDelim start='\${' skip='\\}'
|
||||
\ end='}' contains=@zshSubst,zshBrackets,zshQuoted
|
||||
syn region zshOldSubst matchgroup=zshSubstDelim start=+`+ skip=+\\`+
|
||||
\ end=+`+ contains=TOP,zshOldSubst
|
||||
|
||||
hi def link zshTodo Todo
|
||||
hi def link zshComment Comment
|
||||
hi def link zshPreProc PreProc
|
||||
hi def link zshQuoted SpecialChar
|
||||
hi def link zshString String
|
||||
hi def link zshStringDelimiter zshString
|
||||
hi def link zshPOSIXString zshString
|
||||
hi def link zshJobSpec Special
|
||||
hi def link zshPrecommand Special
|
||||
hi def link zshDelimiter Keyword
|
||||
hi def link zshConditional Conditional
|
||||
hi def link zshException Exception
|
||||
hi def link zshRepeat Repeat
|
||||
hi def link zshKeyword Keyword
|
||||
hi def link zshFunction None
|
||||
hi def link zshKSHFunction zshFunction
|
||||
hi def link zshHereDoc String
|
||||
if 0
|
||||
hi def link zshOperator Operator
|
||||
else
|
||||
hi def link zshOperator None
|
||||
endif
|
||||
if 1
|
||||
hi def link zshRedir Operator
|
||||
else
|
||||
hi def link zshRedir None
|
||||
endif
|
||||
hi def link zshVariable None
|
||||
hi def link zshDereferencing PreProc
|
||||
if s:zsh_syntax_variables =~ 'short\|all'
|
||||
hi def link zshShortDeref zshDereferencing
|
||||
else
|
||||
hi def link zshShortDeref None
|
||||
endif
|
||||
if s:zsh_syntax_variables =~ 'long\|all'
|
||||
hi def link zshLongDeref zshDereferencing
|
||||
else
|
||||
hi def link zshLongDeref None
|
||||
endif
|
||||
if s:zsh_syntax_variables =~ 'all'
|
||||
hi def link zshDeref zshDereferencing
|
||||
else
|
||||
hi def link zshDeref None
|
||||
endif
|
||||
hi def link zshCommands Keyword
|
||||
hi def link zshTypes Type
|
||||
hi def link zshSwitches Special
|
||||
hi def link zshNumber Number
|
||||
hi def link zshSubst PreProc
|
||||
hi def link zshMathSubst zshSubst
|
||||
hi def link zshOldSubst zshSubst
|
||||
hi def link zshSubstDelim zshSubst
|
||||
|
||||
let b:current_syntax = "zsh"
|
||||
|
||||
" vim: ts=8
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
Reference in New Issue
Block a user