code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
" Vim syntax file " Language: limits(5) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword limitsTodo contained TODO FIXME XXX NOTE syn region limitsComment display oneline start='^\s*#' end='$' \ contains=limitsTodo,@Spell syn match limitsBegin display '^' \ nextgroup=limitsUser,limitsDefault,limitsComment \ skipwhite syn match limitsUser contained '[^ \t#*]\+' \ nextgroup=limitsLimit,limitsDeLimit skipwhite syn match limitsDefault contained '*' \ nextgroup=limitsLimit,limitsDeLimit skipwhite syn match limitsLimit contained '[ACDFMNRSTUKLP]' nextgroup=limitsNumber syn match limitsDeLimit contained '-' syn match limitsNumber contained '\d\+\>' nextgroup=limitsLimit skipwhite hi def link limitsTodo Todo hi def link limitsComment Comment hi def link limitsUser Keyword hi def link limitsDefault Macro hi def link limitsLimit Identifier hi def link limitsDeLimit Special hi def link limitsNumber Number let b:current_syntax = "limits" let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/syntax/limits.vim
Vim Script
gpl2
1,305
" Vim syntax file " Language: fdcc or locale files " Maintainer: Dwayne Bailey <dwayne@translate.org.za> " Last Change: 2004 May 16 " Remarks: FDCC (Formal Definitions of Cultural Conventions) see ISO TR 14652 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif syn sync minlines=150 setlocal iskeyword+=- " Numbers syn match fdccNumber /[0-9]*/ contained " Unicode codings and strings syn match fdccUnicodeInValid /<[^<]*>/ contained syn match fdccUnicodeValid /<U[0-9A-F][0-9A-F][0-9A-F][0-9A-F]>/ contained syn region fdccString start=/"/ end=/"/ contains=fdccUnicodeInValid,fdccUnicodeValid " Valid LC_ Keywords syn keyword fdccKeyword escape_char comment_char syn keyword fdccKeywordIdentification title source address contact email tel fax language territory revision date category syn keyword fdccKeywordCtype copy space translit_start include translit_end outdigit class syn keyword fdccKeywordCollate copy script order_start order_end collating-symbol reorder-after reorder-end collating-element symbol-equivalence syn keyword fdccKeywordMonetary copy int_curr_symbol currency_symbol mon_decimal_point mon_thousands_sep mon_grouping positive_sign negative_sign int_frac_digits frac_digits p_cs_precedes p_sep_by_space n_cs_precedes n_sep_by_space p_sign_posn n_sign_posn int_p_cs_precedes int_p_sep_by_space int_n_cs_precedes int_n_sep_by_space int_p_sign_posn int_n_sign_posn syn keyword fdccKeywordNumeric copy decimal_point thousands_sep grouping syn keyword fdccKeywordTime copy abday day abmon mon d_t_fmt d_fmt t_fmt am_pm t_fmt_ampm date_fmt era_d_fmt first_weekday first_workday week cal_direction time_zone era alt_digits era_d_t_fmt syn keyword fdccKeywordMessages copy yesexpr noexpr yesstr nostr syn keyword fdccKeywordPaper copy height width syn keyword fdccKeywordTelephone copy tel_int_fmt int_prefix tel_dom_fmt int_select syn keyword fdccKeywordMeasurement copy measurement syn keyword fdccKeywordName copy name_fmt name_gen name_mr name_mrs name_miss name_ms syn keyword fdccKeywordAddress copy postal_fmt country_name country_post country_ab2 country_ab3 country_num country_car country_isbn lang_name lang_ab lang_term lang_lib " Comments syn keyword fdccTodo TODO FIXME contained syn match fdccVariable /%[a-zA-Z]/ contained syn match fdccComment /[#%].*/ contains=fdccTodo,fdccVariable " LC_ Groups syn region fdccBlank matchgroup=fdccLCIdentification start=/^LC_IDENTIFICATION$/ end=/^END LC_IDENTIFICATION$/ contains=fdccKeywordIdentification,fdccString,fdccComment syn region fdccBlank matchgroup=fdccLCCtype start=/^LC_CTYPE$/ end=/^END LC_CTYPE$/ contains=fdccKeywordCtype,fdccString,fdccComment,fdccUnicodeInValid,fdccUnicodeValid syn region fdccBlank matchgroup=fdccLCCollate start=/^LC_COLLATE$/ end=/^END LC_COLLATE$/ contains=fdccKeywordCollate,fdccString,fdccComment,fdccUnicodeInValid,fdccUnicodeValid syn region fdccBlank matchgroup=fdccLCMonetary start=/^LC_MONETARY$/ end=/^END LC_MONETARY$/ contains=fdccKeywordMonetary,fdccString,fdccComment,fdccNumber syn region fdccBlank matchgroup=fdccLCNumeric start=/^LC_NUMERIC$/ end=/^END LC_NUMERIC$/ contains=fdccKeywordNumeric,fdccString,fdccComment,fdccNumber syn region fdccBlank matchgroup=fdccLCTime start=/^LC_TIME$/ end=/^END LC_TIME$/ contains=fdccKeywordTime,fdccString,fdccComment,fdccNumber syn region fdccBlank matchgroup=fdccLCMessages start=/^LC_MESSAGES$/ end=/^END LC_MESSAGES$/ contains=fdccKeywordMessages,fdccString,fdccComment syn region fdccBlank matchgroup=fdccLCPaper start=/^LC_PAPER$/ end=/^END LC_PAPER$/ contains=fdccKeywordPaper,fdccString,fdccComment,fdccNumber syn region fdccBlank matchgroup=fdccLCTelephone start=/^LC_TELEPHONE$/ end=/^END LC_TELEPHONE$/ contains=fdccKeywordTelephone,fdccString,fdccComment syn region fdccBlank matchgroup=fdccLCMeasurement start=/^LC_MEASUREMENT$/ end=/^END LC_MEASUREMENT$/ contains=fdccKeywordMeasurement,fdccString,fdccComment,fdccNumber syn region fdccBlank matchgroup=fdccLCName start=/^LC_NAME$/ end=/^END LC_NAME$/ contains=fdccKeywordName,fdccString,fdccComment syn region fdccBlank matchgroup=fdccLCAddress start=/^LC_ADDRESS$/ end=/^END LC_ADDRESS$/ contains=fdccKeywordAddress,fdccString,fdccComment,fdccNumber " 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_fdcc_syn_inits") if version < 508 let did_fdcc_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink fdccBlank Blank HiLink fdccTodo Todo HiLink fdccComment Comment HiLink fdccVariable Type HiLink fdccLCIdentification Statement HiLink fdccLCCtype Statement HiLink fdccLCCollate Statement HiLink fdccLCMonetary Statement HiLink fdccLCNumeric Statement HiLink fdccLCTime Statement HiLink fdccLCMessages Statement HiLink fdccLCPaper Statement HiLink fdccLCTelephone Statement HiLink fdccLCMeasurement Statement HiLink fdccLCName Statement HiLink fdccLCAddress Statement HiLink fdccUnicodeInValid Error HiLink fdccUnicodeValid String HiLink fdccString String HiLink fdccNumber Blank HiLink fdccKeywordIdentification fdccKeyword HiLink fdccKeywordCtype fdccKeyword HiLink fdccKeywordCollate fdccKeyword HiLink fdccKeywordMonetary fdccKeyword HiLink fdccKeywordNumeric fdccKeyword HiLink fdccKeywordTime fdccKeyword HiLink fdccKeywordMessages fdccKeyword HiLink fdccKeywordPaper fdccKeyword HiLink fdccKeywordTelephone fdccKeyword HiLink fdccKeywordMeasurement fdccKeyword HiLink fdccKeywordName fdccKeyword HiLink fdccKeywordAddress fdccKeyword HiLink fdccKeyword Identifier delcommand HiLink endif let b:current_syntax = "fdcc" " vim: ts=8
zyz2011-vim
runtime/syntax/fdcc.vim
Vim Script
gpl2
5,961
" Vim syntax file " Language: SNOBOL4 " Maintainer: Rafal Sulejman <rms@poczta.onet.pl> " Site: http://rms.republika.pl/vim/syntax/snobol4.vim " Last change: 2006 may 10 " Changes: " - strict snobol4 mode (set snobol4_strict_mode to activate) " - incorrect HL of dots in strings corrected " - incorrect HL of dot-variables in parens corrected " - one character labels weren't displayed correctly. " - nonexistent Snobol4 keywords displayed as errors. " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif syntax case ignore " Snobol4 keywords syn keyword snobol4Keyword any apply arb arbno arg array syn keyword snobol4Keyword break syn keyword snobol4Keyword char clear code collect convert copy syn keyword snobol4Keyword data datatype date define detach differ dump dupl syn keyword snobol4Keyword endfile eq eval syn keyword snobol4Keyword field syn keyword snobol4Keyword ge gt ident syn keyword snobol4Keyword input integer item syn keyword snobol4Keyword le len lgt local lpad lt syn keyword snobol4Keyword ne notany syn keyword snobol4Keyword opsyn output syn keyword snobol4Keyword pos prototype syn keyword snobol4Keyword remdr replace rpad rpos rtab rewind syn keyword snobol4Keyword size span stoptr syn keyword snobol4Keyword tab table time trace trim terminal syn keyword snobol4Keyword unload syn keyword snobol4Keyword value " CSNOBOL keywords syn keyword snobol4ExtKeyword breakx syn keyword snobol4ExtKeyword char chop syn keyword snobol4ExtKeyword date delete syn keyword snobol4ExtKeyword exp syn keyword snobol4ExtKeyword freeze function syn keyword snobol4ExtKeyword host syn keyword snobol4ExtKeyword io_findunit syn keyword snobol4ExtKeyword label lpad leq lge lle llt lne log syn keyword snobol4ExtKeyword ord syn keyword snobol4ExtKeyword reverse rpad rsort rename syn keyword snobol4ExtKeyword serv_listen sset set sort sqrt substr syn keyword snobol4ExtKeyword thaw syn keyword snobol4ExtKeyword vdiffer syn region snobol4String matchgroup=Quote start=+"+ end=+"+ syn region snobol4String matchgroup=Quote start=+'+ end=+'+ syn match snobol4BogusStatement "^-[^ ][^ ]*" syn match snobol4Statement "^-\(include\|copy\|module\|line\|plusopts\|case\|error\|noerrors\|list\|unlist\|execute\|noexecute\|copy\)" syn match snobol4Constant /"[^a-z"']\.[a-z][a-z0-9\-]*"/hs=s+1 syn region snobol4Goto start=":[sf]\{0,1}(" end=")\|$\|;" contains=ALLBUT,snobol4ParenError syn match snobol4Number "\<\d*\(\.\d\d*\)*\>" syn match snobol4BogusSysVar "&\w\{1,}" syn match snobol4SysVar "&\(abort\|alphabet\|anchor\|arb\|bal\|case\|code\|dump\|errlimit\|errtext\|errtype\|fail\|fence\|fnclevel\|ftrace\|fullscan\|input\|lastno\|lcase\|maxlngth\|output\|parm\|rem\|rtntype\|stcount\|stfcount\|stlimit\|stno\|succeed\|trace\|trim\|ucase\)" syn match snobol4ExtSysVar "&\(gtrace\|line\|file\|lastline\|lastfile\)" syn match snobol4Label "\(^\|;\)[^-\.\+ \t\*\.]\{1,}[^ \t\*\;]*" syn match snobol4Comment "\(^\|;\)\([\*\|!;#].*$\)" " Parens matching syn cluster snobol4ParenGroup contains=snobol4ParenError syn region snobol4Paren transparent start='(' end=')' contains=ALLBUT,@snobol4ParenGroup,snobol4ErrInBracket syn match snobol4ParenError display "[\])]" syn match snobol4ErrInParen display contained "[\]{}]\|<%\|%>" syn region snobol4Bracket transparent start='\[\|<:' end=']\|:>' contains=ALLBUT,@snobol4ParenGroup,snobol4ErrInParen syn match snobol4ErrInBracket display contained "[){}]\|<%\|%>" " optional shell shebang line " syn match snobol4Comment "^\#\!.*$" " 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_snobol4_syntax_inits") if version < 508 let did_snobol4_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink snobol4Constant Constant HiLink snobol4Label Label HiLink snobol4Goto Repeat HiLink snobol4Conditional Conditional HiLink snobol4Repeat Repeat HiLink snobol4Number Number HiLink snobol4Error Error HiLink snobol4Statement PreProc HiLink snobol4BogusStatement snobol4Error HiLink snobol4String String HiLink snobol4Comment Comment HiLink snobol4Special Special HiLink snobol4Todo Todo HiLink snobol4Keyword Keyword HiLink snobol4Function Function HiLink snobol4MathsOperator Operator HiLink snobol4ParenError snobol4Error HiLink snobol4ErrInParen snobol4Error HiLink snobol4ErrInBracket snobol4Error HiLink snobol4SysVar Keyword HiLink snobol4BogusSysVar snobol4Error if exists("snobol4_strict_mode") HiLink snobol4ExtSysVar WarningMsg HiLink snobol4ExtKeyword WarningMsg else HiLink snobol4ExtSysVar snobol4SysVar HiLink snobol4ExtKeyword snobol4Keyword endif delcommand HiLink endif let b:current_syntax = "snobol4" " vim: ts=8
zyz2011-vim
runtime/syntax/snobol4.vim
Vim Script
gpl2
5,609
" Vim syntax file " Language: Sieve filtering language input file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2007-10-25 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword sieveTodo contained TODO FIXME XXX NOTE syn region sieveComment start='/\*' end='\*/' contains=sieveTodo,@Spell syn region sieveComment display oneline start='#' end='$' \ contains=sieveTodo,@Spell syn case ignore syn match sieveTag display ':\h\w*' syn match sieveNumber display '\<\d\+[KMG]\=\>' syn match sieveSpecial display '\\["\\]' syn region sieveString start=+"+ skip=+\\\\\|\\"+ end=+"+ \ contains=sieveSpecial syn region sieveString start='text:' end='\n.\n' syn keyword sieveConditional if elsif else syn keyword sieveTest address allof anyof envelope exists false header \ not size true syn keyword sievePreProc require stop syn keyword sieveAction reject fileinto redirect keep discard syn keyword sieveKeyword vacation syn case match hi def link sieveTodo Todo hi def link sieveComment Comment hi def link sieveTag Type hi def link sieveNumber Number hi def link sieveSpecial Special hi def link sieveString String hi def link sieveConditional Conditional hi def link sieveTest Keyword hi def link sievePreProc PreProc hi def link sieveAction Function hi def link sieveKeyword Keyword let b:current_syntax = "sieve" let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/syntax/sieve.vim
Vim Script
gpl2
1,659
" Vim syntax file " Language: automake Makefile.am " Maintainer: Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> " Former Maintainer: John Williams <jrw@pobox.com> " Last Change: 2011-06-13 " URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/automake.vim " " XXX This file is in need of a new maintainer, Debian VIM Maintainers maintain " it only because patches have been submitted for it by Debian users and the " former maintainer was MIA (Missing In Action), taking over its " maintenance was thus the only way to include those patches. " If you care about this file, and have time to maintain it please do so! " " This script adds support for automake's Makefile.am format. It highlights " Makefile variables significant to automake as well as highlighting " autoconf-style @variable@ substitutions . Subsitutions are marked as errors " when they are used in an inappropriate place, such as in defining " EXTRA_SOURCES. " Standard syntax initialization if version < 600 syntax clear elseif exists("b:current_syntax") finish endif " Read the Makefile syntax to start with if version < 600 source <sfile>:p:h/make.vim else runtime! syntax/make.vim endif syn match automakePrimary "^\w\+\(_PROGRAMS\|_LIBRARIES\|_LISP\|_PYTHON\|_JAVA\|_SCRIPTS\|_DATA\|_HEADERS\|_MANS\|_TEXINFOS\|_LTLIBRARIES\)\s*\ze+\==" syn match automakePrimary "^TESTS\s*\ze+\=="me=e-1 syn match automakeSecondary "^\w\+\(_SOURCES\|_LIBADD\|_LDADD\|_LDFLAGS\|_DEPENDENCIES\|_AR\|_CCASFLAGS\|_CFLAGS\|_CPPFLAGS\|_CXXFLAGS\|_FCFLAGS\|_FFLAGS\|_GCJFLAGS\|_LFLAGS\|_LIBTOOLFLAGS\|OBJCFLAGS\|RFLAGS\|UPCFLAGS\|YFLAGS\)\s*\ze+\==" syn match automakeSecondary "^\(LDADD\|ARFLAGS\|OMIT_DEPENDENCIES\|AM_MAKEFLAGS\|\(AM_\)\=\(MAKEINFOFLAGS\|RUNTESTDEFAULTFLAGS\|ETAGSFLAGS\|CTAGSFLAGS\|JAVACFLAGS\)\)\s*\ze+\==" syn match automakeExtra "^EXTRA_\w\+\s*\ze+\==" syn match automakeOptions "^\(ACLOCAL_AMFLAGS\|AUTOMAKE_OPTIONS\|DISTCHECK_CONFIGURE_FLAGS\|ETAGS_ARGS\|TAGS_DEPENDENCIES\)\s*\ze+\==" syn match automakeClean "^\(MOSTLY\|DIST\|MAINTAINER\)\=CLEANFILES\s*\ze+\==" syn match automakeSubdirs "^\(DIST_\)\=SUBDIRS\s*\ze+\==" syn match automakeConditional "^\(if\s*!\=\w\+\|else\|endif\)\s*$" syn match automakeSubst "@\w\+@" syn match automakeSubst "^\s*@\w\+@" syn match automakeComment1 "#.*$" contains=automakeSubst syn match automakeComment2 "##.*$" syn match automakeMakeError "$[{(][^})]*[^a-zA-Z0-9_})][^})]*[})]" " GNU make function call syn match automakeMakeError "^AM_LDADD\s*\ze+\==" " Common mistake syn region automakeNoSubst start="^EXTRA_\w*\s*+\==" end="$" contains=ALLBUT,automakeNoSubst transparent syn region automakeNoSubst start="^DIST_SUBDIRS\s*+\==" end="$" contains=ALLBUT,automakeNoSubst transparent syn region automakeNoSubst start="^\w*_SOURCES\s*+\==" end="$" contains=ALLBUT,automakeNoSubst transparent syn match automakeBadSubst "@\(\w*@\=\)\=" contained syn region automakeMakeDString start=+"+ skip=+\\"+ end=+"+ contains=makeIdent,automakeSubstitution syn region automakeMakeSString start=+'+ skip=+\\'+ end=+'+ contains=makeIdent,automakeSubstitution syn region automakeMakeBString start=+`+ skip=+\\`+ end=+`+ contains=makeIdent,makeSString,makeDString,makeNextLine,automakeSubstitution " 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_automake_syntax_inits") if version < 508 let did_automake_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink automakePrimary Statement HiLink automakeSecondary Type HiLink automakeExtra Special HiLink automakeOptions Special HiLink automakeClean Special HiLink automakeSubdirs Statement HiLink automakeConditional PreProc HiLink automakeSubst PreProc HiLink automakeComment1 makeComment HiLink automakeComment2 makeComment HiLink automakeMakeError makeError HiLink automakeBadSubst makeError HiLink automakeMakeDString makeDString HiLink automakeMakeSString makeSString HiLink automakeMakeBString makeBString delcommand HiLink endif let b:current_syntax = "automake" " vi: ts=8 sw=4 sts=4
zyz2011-vim
runtime/syntax/automake.vim
Vim Script
gpl2
4,354
" Vim syntax file " Language: EDIF (Electronic Design Interchange Format) " Maintainer: Artem Zankovich <z_artem@hotbox.ru> " Last Change: Oct 14, 2002 " " Supported standarts are: " ANSI/EIA Standard 548-1988 (EDIF Version 2 0 0) " IEC 61690-1 (EDIF Version 3 0 0) " IEC 61690-2 (EDIF Version 4 0 0) " Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif if version >= 600 setlocal iskeyword=48-57,-,+,A-Z,a-z,_,& else set iskeyword=A-Z,a-z,_,& endif syn region edifList matchgroup=Delimiter start="(" end=")" contains=edifList,edifKeyword,edifString,edifNumber " Strings syn match edifInStringError /%/ contained syn match edifInString /%\s*\d\+\s*%/ contained syn region edifString start=/"/ end=/"/ contains=edifInString,edifInStringError contained " Numbers syn match edifNumber "\<[-+]\=[0-9]\+\>" " Keywords syn match edifKeyword "(\@<=\s*[a-zA-Z&][a-zA-Z_0-9]*\>" contained syn match edifError ")" " synchronization if version < 600 syntax sync maxlines=250 else syntax sync fromstart endif " Define the default highlighting. if version >= 508 || !exists("did_edif_syntax_inits") if version < 508 let did_edif_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink edifInString SpecialChar HiLink edifKeyword Keyword HiLink edifNumber Number HiLink edifInStringError edifError HiLink edifError Error HiLink edifString String delcommand HiLink endif let b:current_syntax = "edif"
zyz2011-vim
runtime/syntax/edif.vim
Vim Script
gpl2
1,648
" Vim syntax file " Language: kimwitu++ " Maintainer: Michael Piefel <entwurf@piefel.de> " Last Change: 2 May 2001 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif " Read the C++ syntax to start with if version < 600 source <sfile>:p:h/cpp.vim else runtime! syntax/cpp.vim unlet b:current_syntax endif " kimwitu++ extentions " Don't stop at eol, messes around with CPP mode, but gives line spanning " strings in unparse rules syn region cCppString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat syn keyword cType integer real casestring nocasestring voidptr list syn keyword cType uview rview uview_enum rview_enum " avoid unparsing rule sth:view being scanned as label syn clear cUserCont syn match cUserCont "^\s*\I\i*\s*:$" contains=cUserLabel contained syn match cUserCont ";\s*\I\i*\s*:$" contains=cUserLabel contained syn match cUserCont "^\s*\I\i*\s*:[^:]"me=e-1 contains=cUserLabel contained syn match cUserCont ";\s*\I\i*\s*:[^:]"me=e-1 contains=cUserLabel contained " highlight phylum decls syn match kwtPhylum "^\I\i*:$" syn match kwtPhylum "^\I\i*\s*{\s*\(!\|\I\)\i*\s*}\s*:$" syn keyword kwtStatement with foreach afterforeach provided syn match kwtDecl "%\(uviewvar\|rviewvar\)" syn match kwtDecl "^%\(uview\|rview\|ctor\|dtor\|base\|storageclass\|list\|attr\|member\|option\)" syn match kwtOption "no-csgio\|no-unparse\|no-rewrite\|no-printdot\|no-hashtables\|smart-pointer\|weak-pointer" syn match kwtSep "^%}$" syn match kwtSep "^%{\(\s\+\I\i*\)*$" syn match kwtCast "\<phylum_cast\s*<"me=e-1 syn match kwtCast "\<phylum_cast\s*$" " match views, remove paren error in brackets syn clear cErrInBracket syn match cErrInBracket contained ")" syn match kwtViews "\(\[\|<\)\@<=[ [:alnum:]_]\{-}:" " match rule bodies syn region kwtUnpBody transparent keepend extend fold start="->\s*\[" start="^\s*\[" skip="\$\@<!{\_.\{-}\$\@<!}" end="\s]\s\=;\=$" end="^]\s\=;\=$" end="}]\s\=;\=$" syn region kwtRewBody transparent keepend extend fold start="->\s*<" start="^\s*<" end="\s>\s\=;\=$" end="^>\s\=;\=$" " 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_kwt_syn_inits") if version < 508 let did_kwt_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink kwtStatement cppStatement HiLink kwtDecl cppStatement HiLink kwtCast cppStatement HiLink kwtSep Delimiter HiLink kwtViews Label HiLink kwtPhylum Type HiLink kwtOption PreProc "HiLink cText Comment delcommand HiLink endif syn sync lines=300 let b:current_syntax = "kwt" " vim: ts=8
zyz2011-vim
runtime/syntax/kwt.vim
Vim Script
gpl2
2,918
" Vim syntax file " Language: XSLT " Maintainer: Johannes Zellner <johannes@zellner.org> " Last Change: Sun, 28 Oct 2001 21:22:24 +0100 " Filenames: *.xsl " $Id: xslt.vim,v 1.1 2004/06/13 15:52:10 vimboss Exp $ " REFERENCES: " [1] http://www.w3.org/TR/xslt " " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif runtime syntax/xml.vim syn cluster xmlTagHook add=xslElement syn case match syn match xslElement '\%(xsl:\)\@<=apply-imports' syn match xslElement '\%(xsl:\)\@<=apply-templates' syn match xslElement '\%(xsl:\)\@<=attribute' syn match xslElement '\%(xsl:\)\@<=attribute-set' syn match xslElement '\%(xsl:\)\@<=call-template' syn match xslElement '\%(xsl:\)\@<=choose' syn match xslElement '\%(xsl:\)\@<=comment' syn match xslElement '\%(xsl:\)\@<=copy' syn match xslElement '\%(xsl:\)\@<=copy-of' syn match xslElement '\%(xsl:\)\@<=decimal-format' syn match xslElement '\%(xsl:\)\@<=document' syn match xslElement '\%(xsl:\)\@<=element' syn match xslElement '\%(xsl:\)\@<=fallback' syn match xslElement '\%(xsl:\)\@<=for-each' syn match xslElement '\%(xsl:\)\@<=if' syn match xslElement '\%(xsl:\)\@<=include' syn match xslElement '\%(xsl:\)\@<=import' syn match xslElement '\%(xsl:\)\@<=key' syn match xslElement '\%(xsl:\)\@<=message' syn match xslElement '\%(xsl:\)\@<=namespace-alias' syn match xslElement '\%(xsl:\)\@<=number' syn match xslElement '\%(xsl:\)\@<=otherwise' syn match xslElement '\%(xsl:\)\@<=output' syn match xslElement '\%(xsl:\)\@<=param' syn match xslElement '\%(xsl:\)\@<=processing-instruction' syn match xslElement '\%(xsl:\)\@<=preserve-space' syn match xslElement '\%(xsl:\)\@<=script' syn match xslElement '\%(xsl:\)\@<=sort' syn match xslElement '\%(xsl:\)\@<=strip-space' syn match xslElement '\%(xsl:\)\@<=stylesheet' syn match xslElement '\%(xsl:\)\@<=template' syn match xslElement '\%(xsl:\)\@<=transform' syn match xslElement '\%(xsl:\)\@<=text' syn match xslElement '\%(xsl:\)\@<=value-of' syn match xslElement '\%(xsl:\)\@<=variable' syn match xslElement '\%(xsl:\)\@<=when' syn match xslElement '\%(xsl:\)\@<=with-param' hi def link xslElement Statement " vim: ts=8
zyz2011-vim
runtime/syntax/xslt.vim
Vim Script
gpl2
2,166
" Vim syntax file " Language: LotusScript " Maintainer: Taryn East (taryneast@hotmail.com) " Last Change: 2003 May 11 " This is a rough amalgamation of the visual basic syntax file, and the UltraEdit " and Textpad syntax highlighters. " It's not too brilliant given that a) I've never written a syntax.vim file before " and b) I'm not so crash hot at LotusScript either. If you see any problems " feel free to email me with them. " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif " LotusScript is case insensitive syn case ignore " These are Notes thingies that had an equivalent in the vb highlighter " or I was already familiar with them syn keyword lscriptStatement ActivateApp As And Base Beep Call Case ChDir ChDrive Class syn keyword lscriptStatement Const Dim Declare DefCur DefDbl DefInt DefLng DefSng DefStr syn keyword lscriptStatement DefVar Do Else %Else ElseIf %ElseIf End %End Erase Event Exit syn keyword lscriptStatement Explicit FileCopy FALSE For ForAll Function Get GoTo GoSub syn keyword lscriptStatement If %If In Is Kill Let List Lock Loop MkDir syn keyword lscriptStatement Name Next New NoCase NoPitch Not Nothing NULL syn keyword lscriptStatement On Option Or PI Pitch Preserve Private Public syn keyword lscriptStatement Property Public Put syn keyword lscriptStatement Randomize ReDim Reset Resume Return RmDir syn keyword lscriptStatement Select SendKeys SetFileAttr Set Static Sub Then To TRUE syn keyword lscriptStatement Type Unlock Until While WEnd With Write XOr syn keyword lscriptDatatype Array Currency Double Integer Long Single String String$ Variant syn keyword lscriptNotesType Field Button Navigator syn keyword lscriptNotesType NotesACL NotesACLEntry NotesAgent NotesDatabase NotesDateRange syn keyword lscriptNotesType NotesDateTime NotesDbDirectory NotesDocument syn keyword lscriptNotesType NotesDocumentCollection NotesEmbeddedObject NotesForm syn keyword lscriptNotesType NotesInternational NotesItem NotesLog NotesName NotesNewsLetter syn keyword lscriptNotesType NotesMIMEEntry NotesOutline NotesOutlineEntry NotesRegistration syn keyword lscriptNotesType NotesReplication NotesRichTextItem NotesRichTextParagraphStyle syn keyword lscriptNotesType NotesRichTextStyle NotesRichTextTab syn keyword lscriptNotesType NotesSession NotesTimer NotesView NotesViewColumn NotesViewEntry syn keyword lscriptNotesType NotesViewEntryCollection NotesViewNavigator NotesUIDatabase syn keyword lscriptNotesType NotesUIDocument NotesUIView NotesUIWorkspace syn keyword lscriptNotesConst ACLLEVEL_AUTHOR ACLLEVEL_DEPOSITOR ACLLEVEL_DESIGNER syn keyword lscriptNotesConst ACLLEVEL_EDITOR ACLLEVEL_MANAGER ACLLEVEL_NOACCESS syn keyword lscriptNotesConst ACLLEVEL_READER ACLTYPE_MIXED_GROUP ACLTYPE_PERSON syn keyword lscriptNotesConst ACLTYPE_PERSON_GROUP ACLTYPE_SERVER ACLTYPE_SERVER_GROUP syn keyword lscriptNotesConst ACLTYPE_UNSPECIFIED ACTIONCD ALIGN_CENTER syn keyword lscriptNotesConst ALIGN_FULL ALIGN_LEFT ALIGN_NOWRAP ALIGN_RIGHT syn keyword lscriptNotesConst ASSISTANTINFO ATTACHMENT AUTHORS COLOR_BLACK syn keyword lscriptNotesConst COLOR_BLUE COLOR_CYAN COLOR_DARK_BLUE COLOR_DARK_CYAN syn keyword lscriptNotesConst COLOR_DARK_GREEN COLOR_DARK_MAGENTA COLOR_DARK_RED syn keyword lscriptNotesConst COLOR_DARK_YELLOW COLOR_GRAY COLOR_GREEN COLOR_LIGHT_GRAY syn keyword lscriptNotesConst COLOR_MAGENTA COLOR_RED COLOR_WHITE COLOR_YELLOW syn keyword lscriptNotesConst DATABASE DATETIMES DB_REPLICATION_PRIORITY_HIGH syn keyword lscriptNotesConst DB_REPLICATION_PRIORITY_LOW DB_REPLICATION_PRIORITY_MED syn keyword lscriptNotesConst DB_REPLICATION_PRIORITY_NOTSET EFFECTS_EMBOSS syn keyword lscriptNotesConst EFFECTS_EXTRUDE EFFECTS_NONE EFFECTS_SHADOW syn keyword lscriptNotesConst EFFECTS_SUBSCRIPT EFFECTS_SUPERSCRIPT EMBED_ATTACHMENT syn keyword lscriptNotesConst EMBED_OBJECT EMBED_OBJECTLINK EMBEDDEDOBJECT ERRORITEM syn keyword lscriptNotesConst EV_ALARM EV_COMM EV_MAIL EV_MISC EV_REPLICA EV_RESOURCE syn keyword lscriptNotesConst EV_SECURITY EV_SERVER EV_UNKNOWN EV_UPDATE FONT_COURIER syn keyword lscriptNotesConst FONT_HELV FONT_ROMAN FORMULA FT_DATABASE FT_DATE_ASC syn keyword lscriptNotesConst FT_DATE_DES FT_FILESYSTEM FT_FUZZY FT_SCORES FT_STEMS syn keyword lscriptNotesConst FT_THESAURUS HTML ICON ID_CERTIFIER ID_FLAT syn keyword lscriptNotesConst ID_HIERARCHICAL LSOBJECT MIME_PART NAMES NOTESLINKS syn keyword lscriptNotesConst NOTEREFS NOTES_DESKTOP_CLIENT NOTES_FULL_CLIENT syn keyword lscriptNotesConst NOTES_LIMITED_CLIENT NUMBERS OTHEROBJECT syn keyword lscriptNotesConst OUTLINE_CLASS_DATABASE OUTLINE_CLASS_DOCUMENT syn keyword lscriptNotesConst OUTLINE_CLASS_FOLDER OUTLINE_CLASS_FORM syn keyword lscriptNotesConst OUTLINE_CLASS_FRAMESET OUTLINE_CLASS_NAVIGATOR syn keyword lscriptNotesConst OUTLINE_CLASS_PAGE OUTLINE_CLASS_UNKNOWN syn keyword lscriptNotesConst OUTLINE_CLASS_VIEW OUTLINE_OTHER_FOLDERS_TYPE syn keyword lscriptNotesConst OUTLINE_OTHER_UNKNOWN_TYPE OUTLINE_OTHER_VIEWS_TYPE syn keyword lscriptNotesConst OUTLINE_TYPE_ACTION OUTLINE_TYPE_NAMEDELEMENT syn keyword lscriptNotesConst OUTLINE_TYPE_NOTELINK OUTLINE_TYPE_URL PAGINATE_BEFORE syn keyword lscriptNotesConst PAGINATE_DEFAULT PAGINATE_KEEP_TOGETHER syn keyword lscriptNotesConst PAGINATE_KEEP_WITH_NEXT PICKLIST_CUSTOM PICKLIST_NAMES syn keyword lscriptNotesConst PICKLIST_RESOURCES PICKLIST_ROOMS PROMPT_OK PROMPT_OKCANCELCOMBO syn keyword lscriptNotesConst PROMPT_OKCANCELEDIT PROMPT_OKCANCELEDITCOMBO PROMPT_OKCANCELLIST syn keyword lscriptNotesConst PROMPT_OKCANCELLISTMULT PROMPT_PASSWORD PROMPT_YESNO syn keyword lscriptNotesConst PROMPT_YESNOCANCEL QUERYCD READERS REPLICA_CANDIDATE syn keyword lscriptNotesConst RICHTEXT RULER_ONE_CENTIMETER RULER_ONE_INCH SEV_FAILURE syn keyword lscriptNotesConst SEV_FATAL SEV_NORMAL SEV_WARNING1 SEV_WARNING2 syn keyword lscriptNotesConst SIGNATURE SPACING_DOUBLE SPACING_ONE_POINT_50 syn keyword lscriptNotesConst SPACING_SINGLE STYLE_NO_CHANGE TAB_CENTER TAB_DECIMAL syn keyword lscriptNotesConst TAB_LEFT TAB_RIGHT TARGET_ALL_DOCS TARGET_ALL_DOCS_IN_VIEW syn keyword lscriptNotesConst TARGET_NEW_DOCS TARGET_NEW_OR_MODIFIED_DOCS TARGET_NONE syn keyword lscriptNotesConst TARGET_RUN_ONCE TARGET_SELECTED_DOCS TARGET_UNREAD_DOCS_IN_VIEW syn keyword lscriptNotesConst TEMPLATE TEMPLATE_CANDIDATE TEXT TRIGGER_AFTER_MAIL_DELIVERY syn keyword lscriptNotesConst TRIGGER_BEFORE_MAIL_DELIVERY TRIGGER_DOC_PASTED syn keyword lscriptNotesConst TRIGGER_DOC_UPDATE TRIGGER_MANUAL TRIGGER_NONE syn keyword lscriptNotesConst TRIGGER_SCHEDULED UNAVAILABLE UNKNOWN USERDATA syn keyword lscriptNotesConst USERID VC_ALIGN_CENTER VC_ALIGN_LEFT VC_ALIGN_RIGHT syn keyword lscriptNotesConst VC_ATTR_PARENS VC_ATTR_PUNCTUATED VC_ATTR_PERCENT syn keyword lscriptNotesConst VC_FMT_ALWAYS VC_FMT_CURRENCY VC_FMT_DATE VC_FMT_DATETIME syn keyword lscriptNotesConst VC_FMT_FIXED VC_FMT_GENERAL VC_FMT_HM VC_FMT_HMS syn keyword lscriptNotesConst VC_FMT_MD VC_FMT_NEVER VC_FMT_SCIENTIFIC syn keyword lscriptNotesConst VC_FMT_SOMETIMES VC_FMT_TIME VC_FMT_TODAYTIME VC_FMT_YM syn keyword lscriptNotesConst VC_FMT_YMD VC_FMT_Y4M VC_FONT_BOLD VC_FONT_ITALIC syn keyword lscriptNotesConst VC_FONT_STRIKEOUT VC_FONT_UNDERLINE VC_SEP_COMMA syn keyword lscriptNotesConst VC_SEP_NEWLINE VC_SEP_SEMICOLON VC_SEP_SPACE syn keyword lscriptNotesConst VIEWMAPDATA VIEWMAPLAYOUT VW_SPACING_DOUBLE syn keyword lscriptNotesConst VW_SPACING_ONE_POINT_25 VW_SPACING_ONE_POINT_50 syn keyword lscriptNotesConst VW_SPACING_ONE_POINT_75 VW_SPACING_SINGLE syn keyword lscriptFunction Abs Asc Atn Atn2 ACos ASin syn keyword lscriptFunction CCur CDat CDbl Chr Chr$ CInt CLng Command Command$ syn keyword lscriptFunction Cos CSng CStr syn keyword lscriptFunction CurDir CurDir$ CVar Date Date$ DateNumber DateSerial DateValue syn keyword lscriptFunction Day Dir Dir$ Environ$ Environ EOF Error Error$ Evaluate Exp syn keyword lscriptFunction FileAttr FileDateTime FileLen Fix Format Format$ FreeFile syn keyword lscriptFunction GetFileAttr GetThreadInfo Hex Hex$ Hour syn keyword lscriptFunction IMESetMode IMEStatus Input Input$ InputB InputB$ syn keyword lscriptFunction InputBP InputBP$ InputBox InputBox$ InStr InStrB InStrBP InstrC syn keyword lscriptFunction IsA IsArray IsDate IsElement IsList IsNumeric syn keyword lscriptFunction IsObject IsResponse IsScalar IsUnknown LCase LCase$ syn keyword lscriptFunction Left Left$ LeftB LeftB$ LeftC syn keyword lscriptFunction LeftBP LeftBP$ Len LenB LenBP LenC Loc LOF Log syn keyword lscriptFunction LSet LTrim LTrim$ MessageBox Mid Mid$ MidB MidB$ MidC syn keyword lscriptFunction Minute Month Now Oct Oct$ Responses Right Right$ syn keyword lscriptFunction RightB RightB$ RightBP RightBP$ RightC Round Rnd RSet RTrim RTrim$ syn keyword lscriptFunction Second Seek Sgn Shell Sin Sleep Space Space$ Spc Sqr Str Str$ syn keyword lscriptFunction StrConv StrLeft StrleftBack StrRight StrRightBack syn keyword lscriptFunction StrCompare Tab Tan Time Time$ TimeNumber Timer syn keyword lscriptFunction TimeValue Trim Trim$ Today TypeName UCase UCase$ syn keyword lscriptFunction UniversalID Val Weekday Year syn keyword lscriptMethods AppendToTextList ArrayAppend ArrayReplace ArrayGetIndex syn keyword lscriptMethods Append Bind Close "syn keyword lscriptMethods Contains syn keyword lscriptMethods CopyToDatabase CopyAllItems Count CurrentDatabase Delete Execute syn keyword lscriptMethods GetAllDocumentsByKey GetDatabase GetDocumentByKey syn keyword lscriptMethods GetDocumentByUNID GetFirstDocument GetFirstItem syn keyword lscriptMethods GetItems GetItemValue GetNthDocument GetView syn keyword lscriptMethods IsEmpty IsNull %Include Items syn keyword lscriptMethods Line LBound LoadMsgText Open Print syn keyword lscriptMethods RaiseEvent ReplaceItemValue Remove RemoveItem Responses syn keyword lscriptMethods Save Stop UBound UnprocessedDocuments Write syn keyword lscriptEvents Compare OnError "************************************************************************************* "These are Notes thingies that I'm not sure how to classify as they had no vb equivalent " At a wild guess I'd put them as Functions... " if anyone sees something really out of place... tell me! syn keyword lscriptFunction Access Alias Any Bin Bin$ Binary ByVal syn keyword lscriptFunction CodeLock CodeLockCheck CodeUnlock CreateLock syn keyword lscriptFunction CurDrive CurDrive$ DataType DestroyLock Eqv syn keyword lscriptFunction Erl Err Fraction From FromFunction FullTrim syn keyword lscriptFunction Imp Int Lib Like ListTag LMBCS LSServer Me syn keyword lscriptFunction Mod MsgDescription MsgText Output Published syn keyword lscriptFunction Random Read Shared Step UChr UChr$ Uni Unicode syn keyword lscriptFunction Until Use UseLSX UString UString$ Width Yield syn keyword lscriptTodo contained TODO "integer number, or floating point number without a dot. syn match lscriptNumber "\<\d\+\>" "floating point number, with dot syn match lscriptNumber "\<\d\+\.\d*\>" "floating point number, starting with a dot syn match lscriptNumber "\.\d\+\>" " String and Character constants syn region lscriptString start=+"+ end=+"+ syn region lscriptComment start="REM" end="$" contains=lscriptTodo syn region lscriptComment start="'" end="$" contains=lscriptTodo syn region lscriptLineNumber start="^\d" end="\s" syn match lscriptTypeSpecifier "[a-zA-Z0-9][\$%&!#]"ms=s+1 " 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_lscript_syntax_inits") if version < 508 let did_lscript_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif hi lscriptNotesType term=underline ctermfg=DarkGreen guifg=SeaGreen gui=bold HiLink lscriptNotesConst lscriptNotesType HiLink lscriptLineNumber Comment HiLink lscriptDatatype Type HiLink lscriptNumber Number HiLink lscriptError Error HiLink lscriptStatement Statement HiLink lscriptString String HiLink lscriptComment Comment HiLink lscriptTodo Todo HiLink lscriptFunction Identifier HiLink lscriptMethods PreProc HiLink lscriptEvents Special HiLink lscriptTypeSpecifier Type delcommand HiLink endif let b:current_syntax = "lscript" " vim: ts=8
zyz2011-vim
runtime/syntax/lscript.vim
Vim Script
gpl2
12,486
" Vim syntax file " Language: DocBook SGML " Maintainer: Johannes Zellner <johannes@zellner.org> " Last Change: Sam, 07 Sep 2002 17:20:46 CEST let b:docbk_type="sgml" runtime syntax/docbk.vim
zyz2011-vim
runtime/syntax/docbksgml.vim
Vim Script
gpl2
193
" Vim syntax file " Language: Monk (See-Beyond Technologies) " Maintainer: Mike Litherland <litherm@ccf.org> " Last Change: 2012 Feb 03 by Thilo Six " This syntax file is good enough for my needs, but others " may desire more features. Suggestions and bug reports " are solicited by the author (above). " Originally based on the Scheme syntax file by: " Maintainer: Dirk van Deun <dvandeun@poboxes.com> " Last Change: April 30, 1998 " In fact it's almost identical. :) " The original author's notes: " This script incorrectly recognizes some junk input as numerals: " parsing the complete system of Scheme numerals using the pattern " language is practically impossible: I did a lax approximation. " Initializing: " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn case ignore " Fascist highlighting: everything that doesn't fit the rules is an error... syn match monkError oneline ![^ \t()";]*! syn match monkError oneline ")" " Quoted and backquoted stuff syn region monkQuoted matchgroup=Delimiter start="['`]" end=![ \t()";]!me=e-1 contains=ALLBUT,monkStruc,monkSyntax,monkFunc syn region monkQuoted matchgroup=Delimiter start="['`](" matchgroup=Delimiter end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc syn region monkQuoted matchgroup=Delimiter start="['`]#(" matchgroup=Delimiter end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc syn region monkStrucRestricted matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc syn region monkStrucRestricted matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc syn region monkUnquote matchgroup=Delimiter start="," end=![ \t()";]!me=e-1 contains=ALLBUT,monkStruc,monkSyntax,monkFunc syn region monkUnquote matchgroup=Delimiter start=",@" end=![ \t()";]!me=e-1 contains=ALLBUT,monkStruc,monkSyntax,monkFunc syn region monkUnquote matchgroup=Delimiter start=",(" end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc syn region monkUnquote matchgroup=Delimiter start=",@(" end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc syn region monkUnquote matchgroup=Delimiter start=",#(" end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc syn region monkUnquote matchgroup=Delimiter start=",@#(" end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc " R5RS Scheme Functions and Syntax: if version < 600 set iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ else setlocal iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ endif syn keyword monkSyntax lambda and or if cond case define let let* letrec syn keyword monkSyntax begin do delay set! else => syn keyword monkSyntax quote quasiquote unquote unquote-splicing syn keyword monkSyntax define-syntax let-syntax letrec-syntax syntax-rules syn keyword monkFunc not boolean? eq? eqv? equal? pair? cons car cdr set-car! syn keyword monkFunc set-cdr! caar cadr cdar cddr caaar caadr cadar caddr syn keyword monkFunc cdaar cdadr cddar cdddr caaaar caaadr caadar caaddr syn keyword monkFunc cadaar cadadr caddar cadddr cdaaar cdaadr cdadar cdaddr syn keyword monkFunc cddaar cddadr cdddar cddddr null? list? list length syn keyword monkFunc append reverse list-ref memq memv member assq assv assoc syn keyword monkFunc symbol? symbol->string string->symbol number? complex? syn keyword monkFunc real? rational? integer? exact? inexact? = < > <= >= syn keyword monkFunc zero? positive? negative? odd? even? max min + * - / abs syn keyword monkFunc quotient remainder modulo gcd lcm numerator denominator syn keyword monkFunc floor ceiling truncate round rationalize exp log sin cos syn keyword monkFunc tan asin acos atan sqrt expt make-rectangular make-polar syn keyword monkFunc real-part imag-part magnitude angle exact->inexact syn keyword monkFunc inexact->exact number->string string->number char=? syn keyword monkFunc char-ci=? char<? char-ci<? char>? char-ci>? char<=? syn keyword monkFunc char-ci<=? char>=? char-ci>=? char-alphabetic? char? syn keyword monkFunc char-numeric? char-whitespace? char-upper-case? syn keyword monkFunc char-lower-case? syn keyword monkFunc char->integer integer->char char-upcase char-downcase syn keyword monkFunc string? make-string string string-length string-ref syn keyword monkFunc string-set! string=? string-ci=? string<? string-ci<? syn keyword monkFunc string>? string-ci>? string<=? string-ci<=? string>=? syn keyword monkFunc string-ci>=? substring string-append vector? make-vector syn keyword monkFunc vector vector-length vector-ref vector-set! procedure? syn keyword monkFunc apply map for-each call-with-current-continuation syn keyword monkFunc call-with-input-file call-with-output-file input-port? syn keyword monkFunc output-port? current-input-port current-output-port syn keyword monkFunc open-input-file open-output-file close-input-port syn keyword monkFunc close-output-port eof-object? read read-char peek-char syn keyword monkFunc write display newline write-char call/cc syn keyword monkFunc list-tail string->list list->string string-copy syn keyword monkFunc string-fill! vector->list list->vector vector-fill! syn keyword monkFunc force with-input-from-file with-output-to-file syn keyword monkFunc char-ready? load transcript-on transcript-off eval syn keyword monkFunc dynamic-wind port? values call-with-values syn keyword monkFunc monk-report-environment null-environment syn keyword monkFunc interaction-environment " Keywords specific to STC's implementation syn keyword monkFunc $event-clear $event-parse $event->string $make-event-map syn keyword monkFunc $resolve-event-definition change-pattern copy copy-strip syn keyword monkFunc count-data-children count-map-children count-rep data-map syn keyword monkFunc duplicate duplicate-strip file-check file-lookup get syn keyword monkFunc insert list-lookup node-has-data? not-verify path? syn keyword monkFunc path-defined-as-repeating? path-nodeclear path-nodedepth syn keyword monkFunc path-nodename path-nodeparentname path->string path-valid? syn keyword monkFunc regex string->path timestamp uniqueid verify " Keywords from the Monk function library (from e*Gate 4.1 programmers ref) syn keyword monkFunc allcap? capitalize char-punctuation? char-substitute syn keyword monkFunc char-to-char conv count-used-children degc->degf syn keyword monkFunc diff-two-dates display-error empty-string? fail_id syn keyword monkFunc fail_id_if fail_translation fail_translation_if syn keyword monkFunc find-get-after find-get-before get-timestamp julian-date? syn keyword monkFunc julian->standard leap-year? map-string not-empty-string? syn keyword monkFunc standard-date? standard->julian string-begins-with? syn keyword monkFunc string-contains? string-ends-with? string-search-from-left syn keyword monkFunc string-search-from-right string->ssn strip-punct syn keyword monkFunc strip-string substring=? symbol-table-get symbol-table-put syn keyword monkFunc trim-string-left trim-string-right valid-decimal? syn keyword monkFunc valid-integer? verify-type " Writing out the complete description of Scheme numerals without " using variables is a day's work for a trained secretary... " This is a useful lax approximation: syn match monkNumber oneline "[-#+0-9.][-#+/0-9a-f@i.boxesfdl]*" syn match monkError oneline ![-#+0-9.][-#+/0-9a-f@i.boxesfdl]*[^-#+/0-9a-f@i.boxesfdl \t()";][^ \t()";]*! syn match monkOther oneline ![+-][ \t()";]!me=e-1 syn match monkOther oneline ![+-]$! " ... so that a single + or -, inside a quoted context, would not be " interpreted as a number (outside such contexts, it's a monkFunc) syn match monkDelimiter oneline !\.[ \t()";]!me=e-1 syn match monkDelimiter oneline !\.$! " ... and a single dot is not a number but a delimiter " Simple literals: syn match monkBoolean oneline "#[tf]" syn match monkError oneline !#[tf][^ \t()";]\+! syn match monkChar oneline "#\\" syn match monkChar oneline "#\\." syn match monkError oneline !#\\.[^ \t()";]\+! syn match monkChar oneline "#\\space" syn match monkError oneline !#\\space[^ \t()";]\+! syn match monkChar oneline "#\\newline" syn match monkError oneline !#\\newline[^ \t()";]\+! " This keeps all other stuff unhighlighted, except *stuff* and <stuff>: syn match monkOther oneline ,[a-z!$%&*/:<=>?^_~][-a-z!$%&*/:<=>?^_~0-9+.@]*, syn match monkError oneline ,[a-z!$%&*/:<=>?^_~][-a-z!$%&*/:<=>?^_~0-9+.@]*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t()";]\+[^ \t()";]*, syn match monkOther oneline "\.\.\." syn match monkError oneline !\.\.\.[^ \t()";]\+! " ... a special identifier syn match monkConstant oneline ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*[ \t()";],me=e-1 syn match monkConstant oneline ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*$, syn match monkError oneline ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t()";]\+[^ \t()";]*, syn match monkConstant oneline ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[ \t()";],me=e-1 syn match monkConstant oneline ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>$, syn match monkError oneline ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[^-a-z!$%&*/:<=>?^_~0-9+.@ \t()";]\+[^ \t()";]*, " Monk input and output structures syn match monkSyntax oneline "\(\~input\|\[I\]->\)[^ \t]*" syn match monkFunc oneline "\(\~output\|\[O\]->\)[^ \t]*" " Non-quoted lists, and strings: syn region monkStruc matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALL syn region monkStruc matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALL syn region monkString start=+"+ skip=+\\[\\"]+ end=+"+ " Comments: syn match monkComment ";.*$" " Synchronization and the wrapping up... syn sync match matchPlace grouphere NONE "^[^ \t]" " ... i.e. synchronize on a line that starts at the left margin " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_monk_syntax_inits") if version < 508 let did_monk_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink monkSyntax Statement HiLink monkFunc Function HiLink monkString String HiLink monkChar Character HiLink monkNumber Number HiLink monkBoolean Boolean HiLink monkDelimiter Delimiter HiLink monkConstant Constant HiLink monkComment Comment HiLink monkError Error delcommand HiLink endif let b:current_syntax = "monk" let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/syntax/monk.vim
Vim Script
gpl2
10,693
" Vim syntax file " Language: cvs(1) RC file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn region cvsrcString display oneline start=+"+ skip=+\\\\\|\\\\"+ end=+"+ syn region cvsrcString display oneline start=+'+ skip=+\\\\\|\\\\'+ end=+'+ syn match cvsrcNumber display '\<\d\+\>' syn match cvsrcBegin display '^' nextgroup=cvsrcCommand skipwhite syn region cvsrcCommand contained transparent matchgroup=cvsrcCommand \ start='add\|admin\|checkout\|commit\|cvs\|diff' \ start='export\|history\|import\|init\|log' \ start='rdiff\|release\|remove\|rtag\|status\|tag' \ start='update' \ end='$' \ contains=cvsrcOption,cvsrcString,cvsrcNumber \ keepend syn match cvsrcOption contained display '-\a\+' hi def link cvsrcString String hi def link cvsrcNumber Number hi def link cvsrcCommand Keyword hi def link cvsrcOption Identifier let b:current_syntax = "cvsrc" let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/syntax/cvsrc.vim
Vim Script
gpl2
1,242
" ipfilter syntax file " Language: ipfilter configuration file " Maintainer: Hendrik Scholz <hendrik@scholz.net> " Last Change: 2005 Jan 27 " " http://www.wormulon.net/files/misc/ipfilter.vim " " This will also work for OpenBSD pf but there might be some tags that are " not correctly identified. " Please send comments to hendrik@scholz.net " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif " Comment syn match IPFComment /#.*$/ contains=ipfTodo syn keyword IPFTodo TODO XXX FIXME contained syn keyword IPFActionBlock block syn keyword IPFActionPass pass syn keyword IPFProto tcp udp icmp syn keyword IPFSpecial quick log first " how could we use keyword for words with '-' ? syn match IPFSpecial /return-rst/ syn match IPFSpecial /dup-to/ "syn match IPFSpecial /icmp-type unreach/ syn keyword IPFAny all any syn match IPFIPv4 /\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/ syn match IPFNetmask /\/\d\+/ " service name constants syn keyword IPFService auth bgp domain finger ftp http https ident syn keyword IPFService imap irc isakmp kerberos mail nameserver nfs syn keyword IPFService nntp ntp pop3 portmap pptp rpcbind rsync smtp syn keyword IPFService snmp snmptrap socks ssh sunrpc syslog telnet syn keyword IPFService tftp www " Comment hi def link IPFComment Comment hi def link IPFTodo Todo hi def link IPFService Constant hi def link IPFAction Type hi def link ipfActionBlock String hi def link ipfActionPass Type hi def link IPFSpecial Statement hi def link IPFIPv4 Label hi def link IPFNetmask String hi def link IPFAny Statement hi def link IPFProto Identifier
zyz2011-vim
runtime/syntax/ipfilter.vim
Vim Script
gpl2
1,717
" Vim syntax file " Language: crontab " Maintainer: David Necas (Yeti) <yeti@physics.muni.cz> " Original Maintainer: John Hoelzel johnh51@users.sourceforge.net " License: This file can be redistribued and/or modified under the same terms " as Vim itself. " Filenames: /tmp/crontab.* used by "crontab -e" " Last Change: 2012-05-16 " " crontab line format: " Minutes Hours Days Months Days_of_Week Commands # comments " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif syntax match crontabMin "^\s*[-0-9/,.*]\+" nextgroup=crontabHr skipwhite syntax match crontabHr "\s[-0-9/,.*]\+" nextgroup=crontabDay skipwhite contained syntax match crontabDay "\s[-0-9/,.*]\+" nextgroup=crontabMnth skipwhite contained syntax match crontabMnth "\s[-a-z0-9/,.*]\+" nextgroup=crontabDow skipwhite contained syntax keyword crontabMnth12 contained jan feb mar apr may jun jul aug sep oct nov dec syntax match crontabDow "\s[-a-z0-9/,.*]\+" nextgroup=crontabCmd skipwhite contained syntax keyword crontabDow7 contained sun mon tue wed thu fri sat syntax region crontabCmd start="\S" end="$" skipwhite contained keepend contains=crontabPercent syntax match crontabCmnt "^\s*#.*" contains=@Spell syntax match crontabPercent "[^\\]%.*"lc=1 contained syntax match crontabNick "^\s*@\(reboot\|yearly\|annually\|monthly\|weekly\|daily\|midnight\|hourly\)\>" nextgroup=crontabCmd skipwhite syntax match crontabVar "^\s*\k\w*\s*="me=e-1 " 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_crontab_syn_inits") if version < 508 let did_crontab_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink crontabMin Number HiLink crontabHr PreProc HiLink crontabDay Type HiLink crontabMnth Number HiLink crontabMnth12 Number HiLink crontabMnthS Number HiLink crontabMnthN Number HiLink crontabDow PreProc HiLink crontabDow7 PreProc HiLink crontabDowS PreProc HiLink crontabDowN PreProc HiLink crontabNick Special HiLink crontabVar Identifier HiLink crontabPercent Special " comment out next line for to suppress unix commands coloring. HiLink crontabCmd Statement HiLink crontabCmnt Comment delcommand HiLink endif let b:current_syntax = "crontab" " vim: ts=8
zyz2011-vim
runtime/syntax/crontab.vim
Vim Script
gpl2
2,566
" Vim syntax file " Language: OPL " Maintainer: Czo <Olivier.Sirol@lip6.fr> " Last Change: 2012 Feb 03 by Thilo Six " $Id: opl.vim,v 1.1 2004/06/13 17:34:11 vimboss Exp $ " Open Psion Language... (EPOC16/EPOC32) " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " case is not significant syn case ignore " A bunch of useful OPL keywords syn keyword OPLStatement proc endp abs acos addr adjustalloc alert alloc app syn keyword OPLStatement append appendsprite asc asin at atan back beep syn keyword OPLStatement begintrans bookmark break busy byref cache syn keyword OPLStatement cachehdr cacherec cachetidy call cancel caption syn keyword OPLStatement changesprite chr$ clearflags close closesprite cls syn keyword OPLStatement cmd$ committrans compact compress const continue syn keyword OPLStatement copy cos count create createsprite cursor syn keyword OPLStatement datetosecs datim$ day dayname$ days daystodate syn keyword OPLStatement dbuttons dcheckbox dchoice ddate declare dedit syn keyword OPLStatement deditmulti defaultwin deg delete dfile dfloat syn keyword OPLStatement dialog diaminit diampos dinit dir$ dlong do dow syn keyword OPLStatement dposition drawsprite dtext dtime dxinput edit else syn keyword OPLStatement elseif enda endif endv endwh entersend entersend0 syn keyword OPLStatement eof erase err err$ errx$ escape eval exist exp ext syn keyword OPLStatement external find findfield findlib first fix$ flags syn keyword OPLStatement flt font freealloc gat gborder gbox gbutton syn keyword OPLStatement gcircle gclock gclose gcls gcolor gcopy gcreate syn keyword OPLStatement gcreatebit gdrawobject gellipse gen$ get get$ syn keyword OPLStatement getcmd$ getdoc$ getevent getevent32 geteventa32 syn keyword OPLStatement geteventc getlibh gfill gfont ggmode ggrey gheight syn keyword OPLStatement gidentity ginfo ginfo32 ginvert giprint glineby syn keyword OPLStatement glineto gloadbit gloadfont global gmove gorder syn keyword OPLStatement goriginx goriginy goto gotomark gpatt gpeekline syn keyword OPLStatement gpoly gprint gprintb gprintclip grank gsavebit syn keyword OPLStatement gscroll gsetpenwidth gsetwin gstyle gtmode gtwidth syn keyword OPLStatement gunloadfont gupdate guse gvisible gwidth gx syn keyword OPLStatement gxborder gxprint gy hex$ hour iabs icon if include syn keyword OPLStatement input insert int intf intrans key key$ keya keyc syn keyword OPLStatement killmark kmod last lclose left$ len lenalloc syn keyword OPLStatement linklib ln loadlib loadm loc local lock log lopen syn keyword OPLStatement lower$ lprint max mcard mcasc mean menu mid$ min syn keyword OPLStatement minit minute mkdir modify month month$ mpopup syn keyword OPLStatement newobj newobjh next notes num$ odbinfo off onerr syn keyword OPLStatement open openr opx os parse$ path pause peek pi syn keyword OPLStatement pointerfilter poke pos position possprite print syn keyword OPLStatement put rad raise randomize realloc recsize rename syn keyword OPLStatement rept$ return right$ rmdir rnd rollback sci$ screen syn keyword OPLStatement screeninfo second secstodate send setdoc setflags syn keyword OPLStatement setname setpath sin space sqr statuswin syn keyword OPLStatement statwininfo std stop style sum tan testevent trap syn keyword OPLStatement type uadd unloadlib unloadm until update upper$ syn keyword OPLStatement use usr usr$ usub val var vector week while year " syn keyword OPLStatement rem syn match OPLNumber "\<\d\+\>" syn match OPLNumber "\<\d\+\.\d*\>" syn match OPLNumber "\.\d\+\>" syn region OPLString start=+"+ end=+"+ syn region OPLComment start="REM[\t ]" end="$" syn match OPLMathsOperator "-\|=\|[:<>+\*^/\\]" " 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_OPL_syntax_inits") if version < 508 let did_OPL_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink OPLStatement Statement HiLink OPLNumber Number HiLink OPLString String HiLink OPLComment Comment HiLink OPLMathsOperator Conditional " HiLink OPLError Error delcommand HiLink endif let b:current_syntax = "opl" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8
zyz2011-vim
runtime/syntax/opl.vim
Vim Script
gpl2
4,524
" Vim syntax file " Language: AceDB model files " Maintainer: Stewart Morris (Stewart.Morris@ed.ac.uk) " Last change: Thu Apr 26 10:38:01 BST 2001 " URL: http://www.ed.ac.uk/~swmorris/vim/acedb.vim " Syntax file to handle all $ACEDB/wspec/*.wrm files, primarily models.wrm " AceDB software is available from http://www.acedb.org " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif syn keyword acedbXref XREF syn keyword acedbModifier UNIQUE REPEAT syn case ignore syn keyword acedbModifier Constraints syn keyword acedbType DateType Int Text Float " Magic tags from: http://genome.cornell.edu/acedocs/magic/summary.html syn keyword acedbMagic pick_me_to_call No_cache Non_graphic Title syn keyword acedbMagic Flipped Centre Extent View Default_view syn keyword acedbMagic From_map Minimal_view Main_Marker Map Includes syn keyword acedbMagic Mapping_data More_data Position Ends Left Right syn keyword acedbMagic Multi_Position Multi_Ends With Error Relative syn keyword acedbMagic Min Anchor Gmap Grid_map Grid Submenus Cambridge syn keyword acedbMagic No_buttons Columns Colour Surround_colour Tag syn keyword acedbMagic Scale_unit Cursor Cursor_on Cursor_unit syn keyword acedbMagic Locator Magnification Projection_lines_on syn keyword acedbMagic Marker_points Marker_intervals Contigs syn keyword acedbMagic Physical_genes Two_point Multi_point Likelihood syn keyword acedbMagic Point_query Point_yellow Point_width syn keyword acedbMagic Point_pne Point_pe Point_nne Point_ne syn keyword acedbMagic Derived_tags DT_query DT_width DT_no_duplicates syn keyword acedbMagic RH_data RH_query RH_spacing RH_show_all syn keyword acedbMagic Names_on Width Symbol Colours Pne Pe Nne pMap syn keyword acedbMagic Sequence Gridded FingerPrint In_Situ Cosmid_grid syn keyword acedbMagic Layout Lines_at Space_at No_stagger A1_labelling syn keyword acedbMagic DNA Structure From Source Source_Exons syn keyword acedbMagic Coding CDS Transcript Assembly_tags Allele syn keyword acedbMagic Display Colour Frame_sensitive Strand_sensitive syn keyword acedbMagic Score_bounds Percent Bumpable Width Symbol syn keyword acedbMagic Blixem_N Address E_mail Paper Reference Title syn keyword acedbMagic Point_1 Point_2 Calculation Full One_recombinant syn keyword acedbMagic Tested Selected_trans Backcross Back_one syn keyword acedbMagic Dom_semi Dom_let Direct Complex_mixed Calc syn keyword acedbMagic Calc_upper_conf Item_1 Item_2 Results A_non_B syn keyword acedbMagic Score Score_by_offset Score_by_width syn keyword acedbMagic Right_priority Blastn Blixem Blixem_X syn keyword acedbMagic Journal Year Volume Page Author syn keyword acedbMagic Selected One_all Recs_all One_let syn keyword acedbMagic Sex_full Sex_one Sex_cis Dom_one Dom_selected syn keyword acedbMagic Calc_distance Calc_lower_conf Canon_for_cosmid syn keyword acedbMagic Reversed_physical Points Positive Negative syn keyword acedbMagic Point_error_scale Point_segregate_ordered syn keyword acedbMagic Point_symbol Interval_JTM Interval_RD syn keyword acedbMagic EMBL_feature Homol Feature syn keyword acedbMagic DT_tag Spacer Spacer_colour Spacer_width syn keyword acedbMagic RH_positive RH_negative RH_contradictory Query syn keyword acedbMagic Clone Y_remark PCR_remark Hybridizes_to syn keyword acedbMagic Row Virtual_row Mixed In_pool Subpool B_non_A syn keyword acedbMagic Interval_SRK Point_show_marginal Subsequence syn keyword acedbMagic Visible Properties Transposon syn match acedbClass "^?\w\+\|^#\w\+" syn match acedbComment "//.*" syn region acedbComment start="/\*" end="\*/" syn match acedbComment "^#\W.*" syn match acedbHelp "^\*\*\w\+$" syn match acedbTag "[^^]?\w\+\|[^^]#\w\+" syn match acedbBlock "//#.\+#$" syn match acedbOption "^_[DVH]\S\+" syn match acedbFlag "\s\+-\h\+" syn match acedbSubclass "^Class" syn match acedbSubtag "^Visible\|^Is_a_subclass_of\|^Filter\|^Hidden" syn match acedbNumber "\<\d\+\>" syn match acedbNumber "\<\d\+\.\d\+\>" syn match acedbHyb "\<Positive_\w\+\>\|\<Negative\w\+\>" syn region acedbString start=/"/ end=/"/ skip=/\\"/ oneline " Rest of syntax highlighting rules start here " 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_acedb_syn_inits") if version < 508 let did_acedb_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink acedbMagic Special HiLink acedbHyb Special HiLink acedbType Type HiLink acedbOption Type HiLink acedbSubclass Type HiLink acedbSubtag Include HiLink acedbFlag Include HiLink acedbTag Include HiLink acedbClass Todo HiLink acedbHelp Todo HiLink acedbXref Identifier HiLink acedbModifier Label HiLink acedbComment Comment HiLink acedbBlock ModeMsg HiLink acedbNumber Number HiLink acedbString String delcommand HiLink endif let b:current_syntax = "acedb" " The structure of the model.wrm file is sensitive to mixed tab and space " indentation and assumes tabs are 8 so... se ts=8
zyz2011-vim
runtime/syntax/acedb.vim
Vim Script
gpl2
5,237
" Vim syntax file " Language: TealInfo source files (*.tli) " Maintainer: Kurt W. Andrews <kandrews@fastrans.net> " Last Change: 2001 May 10 " Version: 1.0 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif " TealInfo Objects syn keyword tliObject LIST POPLIST WINDOW POPWINDOW OUTLINE CHECKMARK GOTO syn keyword tliObject LABEL IMAGE RECT TRES PASSWORD POPEDIT POPIMAGE CHECKLIST " TealInfo Fields syn keyword tliField X Y W H BX BY BW BH SX SY FONT BFONT CYCLE DELAY TABS syn keyword tliField STYLE BTEXT RECORD DATABASE KEY TARGET DEFAULT TEXT syn keyword tliField LINKS MAXVAL " TealInfo Styles syn keyword tliStyle INVERTED HORIZ_RULE VERT_RULE NO_SCROLL NO_BORDER BOLD_BORDER syn keyword tliStyle ROUND_BORDER ALIGN_RIGHT ALIGN_CENTER ALIGN_LEFT_START ALIGN_RIGHT_START syn keyword tliStyle ALIGN_CENTER_START ALIGN_LEFT_END ALIGN_RIGHT_END ALIGN_CENTER_END syn keyword tliStyle LOCKOUT BUTTON_SCROLL BUTTON_SELECT STROKE_FIND FILLED REGISTER " String and Character constants syn match tliSpecial "@" syn region tliString start=+"+ end=+"+ "TealInfo Numbers, identifiers and comments syn case ignore syn match tliNumber "\d*" syn match tliIdentifier "\<\h\w*\>" syn match tliComment "#.*" syn case match " 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_tli_syntax_inits") if version < 508 let did_tli_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink tliNumber Number HiLink tliString String HiLink tliComment Comment HiLink tliSpecial SpecialChar HiLink tliIdentifier Identifier HiLink tliObject Statement HiLink tliField Type HiLink tliStyle PreProc delcommand HiLink endif let b:current_syntax = "tli" " vim: ts=8
zyz2011-vim
runtime/syntax/tli.vim
Vim Script
gpl2
2,050
" Vim syntax file " Language: TeX (core definition) " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " This follows the grouping (sort of) found at " http://www.tug.org/utilities/plain/cseq.html#top-fam syn keyword initexTodo TODO FIXME XXX NOTE syn match initexComment display contains=initexTodo \ '\\\@<!\%(\\\\\)*\zs%.*$' syn match initexDimension display contains=@NoSpell \ '[+-]\=\s*\%(\d\+\%([.,]\d*\)\=\|[.,]\d\+\)\s*\%(true\)\=\s*\%(p[tc]\|in\|bp\|c[mc]\|m[mu]\|dd\|sp\|e[mx]\)\>' syn cluster initexBox \ contains=initexBoxCommand,initexBoxInternalQuantity, \ initexBoxParameterDimen,initexBoxParameterInteger, \ initexBoxParameterToken syn cluster initexCharacter \ contains=initexCharacterCommand,initexCharacterInternalQuantity, \ initexCharacterParameterInteger syn cluster initexDebugging \ contains=initexDebuggingCommand,initexDebuggingParameterInteger, \ initexDebuggingParameterToken syn cluster initexFileIO \ contains=initexFileIOCommand,initexFileIOInternalQuantity, \ initexFileIOParameterToken syn cluster initexFonts \ contains=initexFontsCommand,initexFontsInternalQuantity syn cluster initexGlue \ contains=initexGlueCommand,initexGlueDerivedCommand syn cluster initexHyphenation \ contains=initexHyphenationCommand,initexHyphenationDerivedCommand, \ initexHyphenationInternalQuantity,initexHyphenationParameterInteger syn cluster initexInserts \ contains=initexInsertsCommand,initexInsertsParameterDimen, \ initexInsertsParameterGlue,initexInsertsParameterInteger syn cluster initexJob \ contains=initexJobCommand,initexJobInternalQuantity, \ initexJobParameterInteger syn cluster initexKern \ contains=initexKernCommand,initexKernInternalQuantity syn cluster initexLogic \ contains=initexLogicCommand syn cluster initexMacro \ contains=initexMacroCommand,initexMacroDerivedCommand, \ initexMacroParameterInteger syn cluster initexMarks \ contains=initexMarksCommand syn cluster initexMath \ contains=initexMathCommand,initexMathDerivedCommand, \ initexMathInternalQuantity,initexMathParameterDimen, \ initexMathParameterGlue,initexMathParameterInteger, \ initexMathParameterMuglue,initexMathParameterToken syn cluster initexPage \ contains=initexPageInternalQuantity,initexPageParameterDimen, \ initexPageParameterGlue syn cluster initexParagraph \ contains=initexParagraphCommand,initexParagraphInternalQuantity, \ initexParagraphParameterDimen,initexParagraphParameterGlue, \ initexParagraphParameterInteger,initexParagraphParameterToken syn cluster initexPenalties \ contains=initexPenaltiesCommand,initexPenaltiesInternalQuantity, \ initexPenaltiesParameterInteger syn cluster initexRegisters \ contains=initexRegistersCommand,initexRegistersInternalQuantity syn cluster initexTables \ contains=initexTablesCommand,initexTablesParameterGlue, \ initexTablesParameterToken syn cluster initexCommand \ contains=initexBoxCommand,initexCharacterCommand, \ initexDebuggingCommand,initexFileIOCommand, \ initexFontsCommand,initexGlueCommand, \ initexHyphenationCommand,initexInsertsCommand, \ initexJobCommand,initexKernCommand,initexLogicCommand, \ initexMacroCommand,initexMarksCommand,initexMathCommand, \ initexParagraphCommand,initexPenaltiesCommand,initexRegistersCommand, \ initexTablesCommand syn match initexBoxCommand display contains=@NoSpell \ '\\\%([hv]\=box\|[cx]\=leaders\|copy\|[hv]rule\|lastbox\|setbox\|un[hv]\%(box\|copy\)\|vtop\)\>' syn match initexCharacterCommand display contains=@NoSpell \ '\\\%([] ]\|\%(^^M\|accent\|char\|\%(lower\|upper\)case\|number\|romannumeral\|string\)\>\)' syn match initexDebuggingCommand display contains=@NoSpell \ '\\\%(\%(batch\|\%(non\|error\)stop\|scroll\)mode\|\%(err\)\=message\|meaning\|show\%(box\%(breadth\|depth\)\=\|lists\|the\)\)\>' syn match initexFileIOCommand display contains=@NoSpell \ '\\\%(\%(close\|open\)\%(in\|out\)\|endinput\|immediate\|input\|read\|shipout\|special\|write\)\>' syn match initexFontsCommand display contains=@NoSpell \ '\\\%(/\|fontname\)\>' syn match initexGlueCommand display contains=@NoSpell \ '\\\%([hv]\|un\)skip\>' syn match initexHyphenationCommand display contains=@NoSpell \ '\\\%(discretionary\|hyphenation\|patterns\|setlanguage\)\>' syn match initexInsertsCommand display contains=@NoSpell \ '\\\%(insert\|split\%(bot\|first\)mark\|vsplit\)\>' syn match initexJobCommand display contains=@NoSpell \ '\\\%(dump\|end\|jobname\)\>' syn match initexKernCommand display contains=@NoSpell \ '\\\%(kern\|lower\|move\%(left\|right\)\|raise\|unkern\)\>' syn match initexLogicCommand display contains=@NoSpell \ '\\\%(else\|fi\|if[a-zA-Z@]\+\|or\)\>' " \ '\\\%(else\|fi\|if\%(case\|cat\|dim\|eof\|false\|[hv]box\|[hmv]mode\|inner\|num\|odd\|true\|void\|x\)\=\|or\)\>' syn match initexMacroCommand display contains=@NoSpell \ '\\\%(after\%(assignment\|group\)\|\%(begin\|end\)group\|\%(end\)\=csname\|e\=def\|expandafter\|futurelet\|global\|let\|long\|noexpand\|outer\|relax\|the\)\>' syn match initexMarksCommand display contains=@NoSpell \ '\\\%(bot\|first\|top\)\=mark\>' syn match initexMathCommand display contains=@NoSpell \ '\\\%(abovewithdelims\|delimiter\|display\%(limits\|style\)\|l\=eqno\|left\|\%(no\)\=limits\|math\%(accent\|bin\|char\|choice\|close\|code\|inner\|op\|open\|ord\|punct\|rel\)\|mkern\|mskip\|muskipdef\|nonscript\|\%(over\|under\)line\|radical\|right\|\%(\%(script\)\{1,2}\|text\)style\|vcenter\)\>' syn match initexParagraphCommand display contains=@NoSpell \ '\\\%(ignorespaces\|indent\|no\%(boundary\|indent\)\|par\|vadjust\)\>' syn match initexPenaltiesCommand display contains=@NoSpell \ '\\\%(un\)\=penalty\>' syn match initexRegistersCommand display contains=@NoSpell \ '\\\%(advance\|\%(count\|dimen\|skip\|toks\)def\|divide\|multiply\)\>' syn match initexTablesCommand display contains=@NoSpell \ '\\\%(cr\|crcr\|[hv]align\|noalign\|omit\|span\)\>' syn cluster initexDerivedCommand \ contains=initexGlueDerivedCommand,initexHyphenationDerivedCommand, \ initexMacroDerivedCommand,initexMathDerivedCommand syn match initexGlueDerivedCommand display contains=@NoSpell \ '\\\%([hv]fil\%(l\|neg\)\=\|[hv]ss\)\>' syn match initexHyphenationDerivedCommand display contains=@NoSpell \ '\\-' syn match initexMacroDerivedCommand display contains=@NoSpell \ '\\[gx]def\>' syn match initexMathDerivedCommand display contains=@NoSpell \ '\\\%(above\|atop\%(withdelims\)\=\|mathchardef\|over\|overwithdelims\)\>' syn cluster initexInternalQuantity \ contains=initexBoxInternalQuantity,initexCharacterInternalQuantity, \ initexFileIOInternalQuantity,initexFontsInternalQuantity, \ initexHyphenationInternalQuantity,initexJobInternalQuantity, \ initexKernInternalQuantity,initexMathInternalQuantity, \ initexPageInternalQuantity,initexParagraphInternalQuantity, \ initexPenaltiesInternalQuantity,initexRegistersInternalQuantity syn match initexBoxInternalQuantity display contains=@NoSpell \ '\\\%(badness\|dp\|ht\|prevdepth\|wd\)\>' syn match initexCharacterInternalQuantity display contains=@NoSpell \ '\\\%(catcode\|chardef\|\%([ul]c\|sf\)code\)\>' syn match initexFileIOInternalQuantity display contains=@NoSpell \ '\\inputlineno\>' syn match initexFontsInternalQuantity display contains=@NoSpell \ '\\\%(font\%(dimen\)\=\|nullfont\)\>' syn match initexHyphenationInternalQuantity display contains=@NoSpell \ '\\hyphenchar\>' syn match initexJobInternalQuantity display contains=@NoSpell \ '\\deadcycles\>' syn match initexKernInternalQuantity display contains=@NoSpell \ '\\lastkern\>' syn match initexMathInternalQuantity display contains=@NoSpell \ '\\\%(delcode\|mathcode\|muskip\|\%(\%(script\)\{1,2}\|text\)font\|skewchar\)\>' syn match initexPageInternalQuantity display contains=@NoSpell \ '\\page\%(depth\|fil\{1,3}stretch\|goal\|shrink\|stretch\|total\)\>' syn match initexParagraphInternalQuantity display contains=@NoSpell \ '\\\%(prevgraf\|spacefactor\)\>' syn match initexPenaltiesInternalQuantity display contains=@NoSpell \ '\\lastpenalty\>' syn match initexRegistersInternalQuantity display contains=@NoSpell \ '\\\%(count\|dimen\|skip\|toks\)\d\+\>' syn cluster initexParameterDimen \ contains=initexBoxParameterDimen,initexInsertsParameterDimen, \ initexMathParameterDimen,initexPageParameterDimen, \ initexParagraphParameterDimen syn match initexBoxParameterDimen display contains=@NoSpell \ '\\\%(boxmaxdepth\|[hv]fuzz\|overfullrule\)\>' syn match initexInsertsParameterDimen display contains=@NoSpell \ '\\splitmaxdepth\>' syn match initexMathParameterDimen display contains=@NoSpell \ '\\\%(delimitershortfall\|display\%(indent\|width\)\|mathsurround\|nulldelimiterspace\|predisplaysize\|scriptspace\)\>' syn match initexPageParameterDimen display contains=@NoSpell \ '\\\%([hv]offset\|maxdepth\|vsize\)\>' syn match initexParagraphParameterDimen display contains=@NoSpell \ '\\\%(emergencystretch\|\%(hang\|par\)indent\|hsize\|lineskiplimit\)\>' syn cluster initexParameterGlue \ contains=initexInsertsParameterGlue,initexMathParameterGlue, \ initexPageParameterGlue,initexParagraphParameterGlue, \ initexTablesParameterGlue syn match initexInsertsParameterGlue display contains=@NoSpell \ '\\splittopskip\>' syn match initexMathParameterGlue display contains=@NoSpell \ '\\\%(above\|below\)display\%(short\)\=skip\>' syn match initexPageParameterGlue display contains=@NoSpell \ '\\topskip\>' syn match initexParagraphParameterGlue display contains=@NoSpell \ '\\\%(baseline\|left\|line\|par\%(fill\)\=\|right\|x\=space\)skip\>' syn match initexTablesParameterGlue display contains=@NoSpell \ '\\tabskip\>' syn cluster initexParameterInteger \ contains=initexBoxParameterInteger,initexCharacterParameterInteger, \ initexDebuggingParameterInteger,initexHyphenationParameterInteger, \ initexInsertsParameterInteger,initexJobParameterInteger, \ initexMacroParameterInteger,initexMathParameterInteger, \ initexParagraphParameterInteger,initexPenaltiesParameterInteger, syn match initexBoxParameterInteger display contains=@NoSpell \ '\\[hv]badness\>' syn match initexCharacterParameterInteger display contains=@NoSpell \ '\\\%(\%(endline\|escape\|newline\)char\)\>' syn match initexDebuggingParameterInteger display contains=@NoSpell \ '\\\%(errorcontextlines\|pausing\|tracing\%(commands\|lostchars\|macros\|online\|output\|pages\|paragraphs\|restores|stats\)\)\>' syn match initexHyphenationParameterInteger display contains=@NoSpell \ '\\\%(defaulthyphenchar\|language\|\%(left\|right\)hyphenmin\|uchyph\)\>' syn match initexInsertsParameterInteger display contains=@NoSpell \ '\\\%(holdinginserts\)\>' syn match initexJobParameterInteger display contains=@NoSpell \ '\\\%(day\|mag\|maxdeadcycles\|month\|time\|year\)\>' syn match initexMacroParameterInteger display contains=@NoSpell \ '\\globaldefs\>' syn match initexMathParameterInteger display contains=@NoSpell \ '\\\%(binoppenalty\|defaultskewchar\|delimiterfactor\|displaywidowpenalty\|fam\|\%(post\|pre\)displaypenalty\|relpenalty\)\>' syn match initexParagraphParameterInteger display contains=@NoSpell \ '\\\%(\%(adj\|\%(double\|final\)hyphen\)demerits\|looseness\|\%(pre\)\=tolerance\)\>' syn match initexPenaltiesParameterInteger display contains=@NoSpell \ '\\\%(broken\|club\|exhyphen\|floating\|hyphen\|interline\|line\|output\|widow\)penalty\>' syn cluster initexParameterMuglue \ contains=initexMathParameterMuglue syn match initexMathParameterMuglue display contains=@NoSpell \ '\\\%(med\|thick\|thin\)muskip\>' syn cluster initexParameterDimen \ contains=initexBoxParameterToken,initexDebuggingParameterToken, \ initexFileIOParameterToken,initexMathParameterToken, \ initexParagraphParameterToken,initexTablesParameterToken syn match initexBoxParameterToken display contains=@NoSpell \ '\\every[hv]box\>' syn match initexDebuggingParameterToken display contains=@NoSpell \ '\\errhelp\>' syn match initexFileIOParameterToken display contains=@NoSpell \ '\\output\>' syn match initexMathParameterToken display contains=@NoSpell \ '\\every\%(display\|math\)\>' syn match initexParagraphParameterToken display contains=@NoSpell \ '\\everypar\>' syn match initexTablesParameterToken display contains=@NoSpell \ '\\everycr\>' hi def link initexCharacter Character hi def link initexNumber Number hi def link initexIdentifier Identifier hi def link initexStatement Statement hi def link initexConditional Conditional hi def link initexPreProc PreProc hi def link initexMacro Macro hi def link initexType Type hi def link initexDebug Debug hi def link initexTodo Todo hi def link initexComment Comment hi def link initexDimension initexNumber hi def link initexCommand initexStatement hi def link initexBoxCommand initexCommand hi def link initexCharacterCommand initexCharacter hi def link initexDebuggingCommand initexDebug hi def link initexFileIOCommand initexCommand hi def link initexFontsCommand initexType hi def link initexGlueCommand initexCommand hi def link initexHyphenationCommand initexCommand hi def link initexInsertsCommand initexCommand hi def link initexJobCommand initexPreProc hi def link initexKernCommand initexCommand hi def link initexLogicCommand initexConditional hi def link initexMacroCommand initexMacro hi def link initexMarksCommand initexCommand hi def link initexMathCommand initexCommand hi def link initexParagraphCommand initexCommand hi def link initexPenaltiesCommand initexCommand hi def link initexRegistersCommand initexCommand hi def link initexTablesCommand initexCommand hi def link initexDerivedCommand initexStatement hi def link initexGlueDerivedCommand initexDerivedCommand hi def link initexHyphenationDerivedCommand initexDerivedCommand hi def link initexMacroDerivedCommand initexDerivedCommand hi def link initexMathDerivedCommand initexDerivedCommand hi def link initexInternalQuantity initexIdentifier hi def link initexBoxInternalQuantity initexInternalQuantity hi def link initexCharacterInternalQuantity initexInternalQuantity hi def link initexFileIOInternalQuantity initexInternalQuantity hi def link initexFontsInternalQuantity initexInternalQuantity hi def link initexHyphenationInternalQuantity initexInternalQuantity hi def link initexJobInternalQuantity initexInternalQuantity hi def link initexKernInternalQuantity initexInternalQuantity hi def link initexMathInternalQuantity initexInternalQuantity hi def link initexPageInternalQuantity initexInternalQuantity hi def link initexParagraphInternalQuantity initexInternalQuantity hi def link initexPenaltiesInternalQuantity initexInternalQuantity hi def link initexRegistersInternalQuantity initexInternalQuantity hi def link initexParameterDimen initexNumber hi def link initexBoxParameterDimen initexParameterDimen hi def link initexInsertsParameterDimen initexParameterDimen hi def link initexMathParameterDimen initexParameterDimen hi def link initexPageParameterDimen initexParameterDimen hi def link initexParagraphParameterDimen initexParameterDimen hi def link initexParameterGlue initexNumber hi def link initexInsertsParameterGlue initexParameterGlue hi def link initexMathParameterGlue initexParameterGlue hi def link initexPageParameterGlue initexParameterGlue hi def link initexParagraphParameterGlue initexParameterGlue hi def link initexTablesParameterGlue initexParameterGlue hi def link initexParameterInteger initexNumber hi def link initexBoxParameterInteger initexParameterInteger hi def link initexCharacterParameterInteger initexParameterInteger hi def link initexDebuggingParameterInteger initexParameterInteger hi def link initexHyphenationParameterInteger initexParameterInteger hi def link initexInsertsParameterInteger initexParameterInteger hi def link initexJobParameterInteger initexParameterInteger hi def link initexMacroParameterInteger initexParameterInteger hi def link initexMathParameterInteger initexParameterInteger hi def link initexParagraphParameterInteger initexParameterInteger hi def link initexPenaltiesParameterInteger initexParameterInteger hi def link initexParameterMuglue initexNumber hi def link initexMathParameterMuglue initexParameterMuglue hi def link initexParameterToken initexIdentifier hi def link initexBoxParameterToken initexParameterToken hi def link initexDebuggingParameterToken initexParameterToken hi def link initexFileIOParameterToken initexParameterToken hi def link initexMathParameterToken initexParameterToken hi def link initexParagraphParameterToken initexParameterToken hi def link initexTablesParameterToken initexParameterToken let b:current_syntax = "initex" let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/syntax/initex.vim
Vim Script
gpl2
19,211
" Vim syntax file " Language: Symbian meta-makefile definition (MMP) " Maintainer: Ron Aaron <ron@ronware.org> " Last Change: 2007/11/07 " URL: http://ronware.org/wiki/vim/mmp " Filetypes: *.mmp " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif syn case ignore syn match mmpComment "//.*" syn region mmpComment start="/\*" end="\*\/" syn keyword mmpKeyword aif asspabi assplibrary aaspexports baseaddress syn keyword mmpKeyword debuglibrary deffile document epocheapsize syn keyword mmpKeyword epocprocesspriority epocstacksize exportunfrozen syn keyword mmpStorage lang library linkas macro nostrictdef option syn keyword mmpStorage resource source sourcepath srcdbg startbitmap syn keyword mmpStorage start end staticlibrary strictdepend systeminclude syn keyword mmpStorage systemresource target targettype targetpath uid syn keyword mmpStorage userinclude win32_library syn match mmpIfdef "\#\(include\|ifdef\|ifndef\|if\|endif\|else\|elif\)" syn match mmpNumber "\d+" syn match mmpNumber "0x\x\+" " 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 !exists("did_mmp_syntax_inits") let did_mmp_syntax_inits=1 hi def link mmpComment Comment hi def link mmpKeyword Keyword hi def link mmpStorage StorageClass hi def link mmpString String hi def link mmpNumber Number hi def link mmpOrdinal Operator hi def link mmpIfdef PreCondit endif let b:current_syntax = "mmp" " vim: ts=8
zyz2011-vim
runtime/syntax/mmp.vim
Vim Script
gpl2
1,666
" Vim syntax file " Language: Dylan Library Interface Files " Authors: Justus Pendleton <justus@acm.org> " Brent Fulgham <bfulgham@debian.org> " Last Change: Fri Sep 29 13:50:20 PDT 2000 " " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif syn case ignore syn region dylanlidInfo matchgroup=Statement start="^" end=":" oneline syn region dylanlidEntry matchgroup=Statement start=":%" end="$" oneline syn sync lines=50 " 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_dylan_lid_syntax_inits") if version < 508 let did_dylan_lid_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink dylanlidInfo Type HiLink dylanlidEntry String delcommand HiLink endif let b:current_syntax = "dylanlid" " vim:ts=8
zyz2011-vim
runtime/syntax/dylanlid.vim
Vim Script
gpl2
1,086
" Vim syntax file " Language: xa 6502 cross assembler " Maintainer: Clemens Kirchgatterer <clemens@thf.ath.cx> " Last Change: 2003 May 03 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif syn case ignore " Opcodes syn match a65Opcode "\<PHP\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<PLA\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<PLX\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<PLY\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<SEC\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<CLD\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<SED\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<CLI\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<BVC\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<BVS\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<BCS\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<BCC\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<DEY\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<DEC\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<CMP\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<CPX\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<BIT\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<ROL\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<ROR\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<ASL\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<TXA\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<TYA\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<TSX\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<TXS\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<LDA\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<LDX\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<LDY\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<STA\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<PLP\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<BRK\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<RTI\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<NOP\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<SEI\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<CLV\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<PHA\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<PHX\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<BRA\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<JMP\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<JSR\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<RTS\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<CPY\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<BNE\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<BEQ\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<BMI\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<LSR\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<INX\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<INY\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<INC\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<ADC\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<SBC\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<AND\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<ORA\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<STX\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<STY\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<STZ\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<EOR\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<DEX\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<BPL\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<CLC\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<PHY\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<TRB\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<BBR\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<BBS\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<RMB\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<SMB\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<TAY\($\|\s\)" nextgroup=a65Address syn match a65Opcode "\<TAX\($\|\s\)" nextgroup=a65Address " Addresses syn match a65Address "\s*!\=$[0-9A-F]\{2}\($\|\s\)" syn match a65Address "\s*!\=$[0-9A-F]\{4}\($\|\s\)" syn match a65Address "\s*!\=$[0-9A-F]\{2},X\($\|\s\)" syn match a65Address "\s*!\=$[0-9A-F]\{4},X\($\|\s\)" syn match a65Address "\s*!\=$[0-9A-F]\{2},Y\($\|\s\)" syn match a65Address "\s*!\=$[0-9A-F]\{4},Y\($\|\s\)" syn match a65Address "\s*($[0-9A-F]\{2})\($\|\s\)" syn match a65Address "\s*($[0-9A-F]\{4})\($\|\s\)" syn match a65Address "\s*($[0-9A-F]\{2},X)\($\|\s\)" syn match a65Address "\s*($[0-9A-F]\{2}),Y\($\|\s\)" " Numbers syn match a65Number "#\=[0-9]*\>" syn match a65Number "#\=$[0-9A-F]*\>" syn match a65Number "#\=&[0-7]*\>" syn match a65Number "#\=%[01]*\>" syn case match " Types syn match a65Type "\(^\|\s\)\.byt\($\|\s\)" syn match a65Type "\(^\|\s\)\.word\($\|\s\)" syn match a65Type "\(^\|\s\)\.asc\($\|\s\)" syn match a65Type "\(^\|\s\)\.dsb\($\|\s\)" syn match a65Type "\(^\|\s\)\.fopt\($\|\s\)" syn match a65Type "\(^\|\s\)\.text\($\|\s\)" syn match a65Type "\(^\|\s\)\.data\($\|\s\)" syn match a65Type "\(^\|\s\)\.bss\($\|\s\)" syn match a65Type "\(^\|\s\)\.zero\($\|\s\)" syn match a65Type "\(^\|\s\)\.align\($\|\s\)" " Blocks syn match a65Section "\(^\|\s\)\.(\($\|\s\)" syn match a65Section "\(^\|\s\)\.)\($\|\s\)" " Strings syn match a65String "\".*\"" " Programm Counter syn region a65PC start="\*=" end="\>" keepend " HI/LO Byte syn region a65HiLo start="#[<>]" end="$\|\s" contains=a65Comment keepend " Comments syn keyword a65Todo TODO XXX FIXME BUG contained syn match a65Comment ";.*"hs=s+1 contains=a65Todo syn region a65Comment start="/\*" end="\*/" contains=a65Todo,a65Comment " Preprocessor syn region a65PreProc start="^#" end="$" contains=a65Comment,a65Continue syn match a65End excludenl /end$/ contained syn match a65Continue "\\$" contained " 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_a65_syntax_inits") if version < 508 let did_a65_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink a65Section Special HiLink a65Address Special HiLink a65Comment Comment HiLink a65PreProc PreProc HiLink a65Number Number HiLink a65String String HiLink a65Type Statement HiLink a65Opcode Type HiLink a65PC Error HiLink a65Todo Todo HiLink a65HiLo Number delcommand HiLink endif let b:current_syntax = "a65"
zyz2011-vim
runtime/syntax/a65.vim
Vim Script
gpl2
6,779
" Vim syntax file " Language: DSSSL " Maintainer: Johannes Zellner <johannes@zellner.org> " Last Change: Tue, 27 Apr 2004 14:54:59 CEST " Filenames: *.dsl " $Id: dsl.vim,v 1.1 2004/06/13 19:13:31 vimboss Exp $ if exists("b:current_syntax") | finish | endif runtime syntax/xml.vim syn cluster xmlRegionHook add=dslRegion,dslComment syn cluster xmlCommentHook add=dslCond " EXAMPLE: " <![ %output.html; [ " <!-- some comment --> " (define html-manifest #f) " ]]> " " NOTE: 'contains' the same as xmlRegion, except xmlTag / xmlEndTag syn region dslCond matchgroup=dslCondDelim start="\[\_[^[]\+\[" end="]]" contains=xmlCdata,@xmlRegionCluster,xmlComment,xmlEntity,xmlProcessing,@xmlRegionHook " NOTE, that dslRegion and dslComment do both NOT have a 'contained' " argument, so this will also work in plain dsssl documents. syn region dslRegion matchgroup=Delimiter start=+(+ end=+)+ contains=dslRegion,dslString,dslComment syn match dslString +"\_[^"]*"+ contained syn match dslComment +;.*$+ contains=dslTodo syn keyword dslTodo contained TODO FIXME XXX display " The default highlighting. hi def link dslTodo Todo hi def link dslString String hi def link dslComment Comment " compare the following with xmlCdataStart / xmlCdataEnd hi def link dslCondDelim Type let b:current_syntax = "dsl"
zyz2011-vim
runtime/syntax/dsl.vim
Vim Script
gpl2
1,312
" Vim syntax file " Language: tf " Maintainer: Lutz Eymers <ixtab@polzin.com> " URL: http://www.isp.de/data/tf.vim " Email: send syntax_vim.tgz " Last Change: 2001 May 10 " " Options lite_minlines = x to sync at least x lines backwards " Remove any old syntax stuff hanging around " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif syn case match if !exists("main_syntax") let main_syntax = 'tf' endif " Special global variables syn keyword tfVar HOME LANG MAIL SHELL TERM TFHELP TFLIBDIR TFLIBRARY TZ contained syn keyword tfVar background backslash contained syn keyword tfVar bamf bg_output borg clearfull cleardone clock connect contained syn keyword tfVar emulation end_color gag gethostbyname gpri hook hilite contained syn keyword tfVar hiliteattr histsize hpri insert isize istrip kecho contained syn keyword tfVar kprefix login lp lpquote maildelay matching max_iter contained syn keyword tfVar max_recur mecho more mprefix oldslash promt_sec contained syn keyword tfVar prompt_usec proxy_host proxy_port ptime qecho qprefix contained syn keyword tfVar quite quitdone redef refreshtime scroll shpause snarf sockmload contained syn keyword tfVar start_color tabsize telopt sub time_format visual contained syn keyword tfVar watch_dog watchname wordpunct wrap wraplog wrapsize contained syn keyword tfVar wrapspace contained " Worldvar syn keyword tfWorld world_name world_character world_password world_host contained syn keyword tfWorld world_port world_mfile world_type contained " Number syn match tfNumber "-\=\<\d\+\>" " Float syn match tfFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" " Operator syn match tfOperator "[-+=?:&|!]" syn match tfOperator "/[^*~@]"he=e-1 syn match tfOperator ":=" syn match tfOperator "[^/%]\*"hs=s+1 syn match tfOperator "$\+[([{]"he=e-1,me=e-1 syn match tfOperator "\^\[\+"he=s+1 contains=tfSpecialCharEsc " Relational syn match tfRelation "&&" syn match tfRelation "||" syn match tfRelation "[<>/!=]=" syn match tfRelation "[<>]" syn match tfRelation "[!=]\~" syn match tfRelation "[=!]/" " Readonly Var syn match tfReadonly "[#*]" contained syn match tfReadonly "\<-\=L\=\d\{-}\>" contained syn match tfReadonly "\<P\(\d\+\|R\|L\)\>" contained syn match tfReadonly "\<R\>" contained " Identifier syn match tfIdentifier "%\+[a-zA-Z_#*-0-9]\w*" contains=tfVar,tfReadonly syn match tfIdentifier "%\+[{]"he=e-1,me=e-1 syn match tfIdentifier "\$\+{[a-zA-Z_#*-0-9]\w*}" contains=tfWorld " Function names syn keyword tfFunctions ascii char columns echo filename ftime fwrite getopts syn keyword tfFunctions getpid idle kbdel kbgoto kbhead kblen kbmatch kbpoint syn keyword tfFunctions kbtail kbwordleft kbwordright keycode lines mod syn keyword tfFunctions moresize pad rand read regmatch send strcat strchr syn keyword tfFunctions strcmp strlen strncmp strrchr strrep strstr substr syn keyword tfFunctions systype time tolower toupper syn keyword tfStatement addworld bamf beep bind break cat changes connect contained syn keyword tfStatement dc def dokey echo edit escape eval export expr fg for contained syn keyword tfStatement gag getfile grab help hilite histsize hook if input contained syn keyword tfStatement kill lcd let list listsockets listworlds load contained syn keyword tfStatement localecho log nohilite not partial paste ps purge contained syn keyword tfStatement purgeworld putfile quit quote recall recordline save contained syn keyword tfStatement saveworld send sh shift sub substitute contained syn keyword tfStatement suspend telnet test time toggle trig trigger unbind contained syn keyword tfStatement undef undefn undeft unhook untrig unworld contained syn keyword tfStatement version watchdog watchname while world contained " Hooks syn keyword tfHook ACTIVITY BACKGROUND BAMF CONFAIL CONFLICT CONNECT DISCONNECT syn keyword tfHook KILL LOAD LOADFAIL LOG LOGIN MAIL MORE PENDING PENDING syn keyword tfHook PROCESS PROMPT PROXY REDEF RESIZE RESUME SEND SHADOW SHELL syn keyword tfHook SIGHUP SIGTERM SIGUSR1 SIGUSR2 WORLD " Conditional syn keyword tfConditional if endif then else elseif contained " Repeat syn keyword tfRepeat while do done repeat for contained " Statement syn keyword tfStatement break quit contained " Include syn keyword tfInclude require load save loaded contained " Define syn keyword tfDefine bind unbind def undef undefn undefn purge hook unhook trig untrig contained syn keyword tfDefine set unset setenv contained " Todo syn keyword tfTodo TODO Todo todo contained " SpecialChar syn match tfSpecialChar "\\[abcfnrtyv\\]" contained syn match tfSpecialChar "\\\d\{3}" contained contains=tfOctalError syn match tfSpecialChar "\\x[0-9a-fA-F]\{2}" contained syn match tfSpecialCharEsc "\[\+" contained syn match tfOctalError "[89]" contained " Comment syn region tfComment start="^;" end="$" contains=tfTodo " String syn region tfString oneline matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=tfIdentifier,tfSpecialChar,tfEscape syn region tfString matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=tfIdentifier,tfSpecialChar,tfEscape syn match tfParentError "[)}\]]" " Parents syn region tfParent matchgroup=Delimiter start="(" end=")" contains=ALLBUT,tfReadonly syn region tfParent matchgroup=Delimiter start="\[" end="\]" contains=ALL syn region tfParent matchgroup=Delimiter start="{" end="}" contains=ALL syn match tfEndCommand "%%\{-};" syn match tfJoinLines "\\$" " Types syn match tfType "/[a-zA-Z_~@][a-zA-Z0-9_]*" contains=tfConditional,tfRepeat,tfStatement,tfInclude,tfDefine,tfStatement " Catch /quote .. ' syn match tfQuotes "/quote .\{-}'" contains=ALLBUT,tfString " Catch $(/escape ) syn match tfEscape "(/escape .*)" " sync if exists("tf_minlines") exec "syn sync minlines=" . tf_minlines else syn sync minlines=100 endif " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_tf_syn_inits") if version < 508 let did_tf_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink tfComment Comment HiLink tfString String HiLink tfNumber Number HiLink tfFloat Float HiLink tfIdentifier Identifier HiLink tfVar Identifier HiLink tfWorld Identifier HiLink tfReadonly Identifier HiLink tfHook Identifier HiLink tfFunctions Function HiLink tfRepeat Repeat HiLink tfConditional Conditional HiLink tfLabel Label HiLink tfStatement Statement HiLink tfType Type HiLink tfInclude Include HiLink tfDefine Define HiLink tfSpecialChar SpecialChar HiLink tfSpecialCharEsc SpecialChar HiLink tfParentError Error HiLink tfTodo Todo HiLink tfEndCommand Delimiter HiLink tfJoinLines Delimiter HiLink tfOperator Operator HiLink tfRelation Operator delcommand HiLink endif let b:current_syntax = "tf" if main_syntax == 'tf' unlet main_syntax endif " vim: ts=8
zyz2011-vim
runtime/syntax/tf.vim
Vim Script
gpl2
7,237
" Vim syntax file " Language: Icon " Maintainer: Wendell Turner <wendell@adsi-m4.com> " URL: ftp://ftp.halcyon.com/pub/users/wturner/icon.vim " Last Change: 2003 May 11 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif syn keyword iconFunction abs acos any args asin atan bal syn keyword iconFunction callout center char chdir close collect copy syn keyword iconFunction cos cset delay delete detab display dtor syn keyword iconFunction entab errorclear exit exp find flush function syn keyword iconFunction get getch getche getenv iand icom image syn keyword iconFunction insert integer ior ishift ixor kbhit key syn keyword iconFunction left list loadfunc log many map match syn keyword iconFunction member move name numeric open ord pop syn keyword iconFunction pos proc pull push put read reads syn keyword iconFunction real remove rename repl reverse right rtod syn keyword iconFunction runerr save seek seq set sin sort syn keyword iconFunction sortf sqrt stop string system tab table syn keyword iconFunction tan trim type upto variable where write writes " Keywords syn match iconKeyword "&allocated" syn match iconKeyword "&ascii" syn match iconKeyword "&clock" syn match iconKeyword "&collections" syn match iconKeyword "&cset" syn match iconKeyword "&current" syn match iconKeyword "&date" syn match iconKeyword "&dateline" syn match iconKeyword "&digits" syn match iconKeyword "&dump" syn match iconKeyword "&e" syn match iconKeyword "&error" syn match iconKeyword "&errornumber" syn match iconKeyword "&errortext" syn match iconKeyword "&errorvalue" syn match iconKeyword "&errout" syn match iconKeyword "&fail" syn match iconKeyword "&features" syn match iconKeyword "&file" syn match iconKeyword "&host" syn match iconKeyword "&input" syn match iconKeyword "&lcase" syn match iconKeyword "&letters" syn match iconKeyword "&level" syn match iconKeyword "&line" syn match iconKeyword "&main" syn match iconKeyword "&null" syn match iconKeyword "&output" syn match iconKeyword "&phi" syn match iconKeyword "&pi" syn match iconKeyword "&pos" syn match iconKeyword "&progname" syn match iconKeyword "&random" syn match iconKeyword "&regions" syn match iconKeyword "&source" syn match iconKeyword "&storage" syn match iconKeyword "&subject" syn match iconKeyword "&time" syn match iconKeyword "&trace" syn match iconKeyword "&ucase" syn match iconKeyword "&version" " Reserved words syn keyword iconReserved break by case create default do syn keyword iconReserved else end every fail if syn keyword iconReserved initial link next not of syn keyword iconReserved procedure repeat return suspend syn keyword iconReserved then to until while " Storage class reserved words syn keyword iconStorageClass global static local record syn keyword iconTodo contained TODO FIXME XXX BUG " String and Character constants " Highlight special characters (those which have a backslash) differently syn match iconSpecial contained "\\x\x\{2}\|\\\o\{3\}\|\\[bdeflnrtv\"\'\\]\|\\^c[a-zA-Z0-9]\|\\$" syn region iconString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=iconSpecial syn region iconCset start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=iconSpecial syn match iconCharacter "'[^\\]'" " not sure about these "syn match iconSpecialCharacter "'\\[bdeflnrtv]'" "syn match iconSpecialCharacter "'\\\o\{3\}'" "syn match iconSpecialCharacter "'\\x\x\{2}'" "syn match iconSpecialCharacter "'\\^c\[a-zA-Z0-9]'" "when wanted, highlight trailing white space if exists("icon_space_errors") syn match iconSpaceError "\s*$" syn match iconSpaceError " \+\t"me=e-1 endif "catch errors caused by wrong parenthesis syn cluster iconParenGroup contains=iconParenError,iconIncluded,iconSpecial,iconTodo,iconUserCont,iconUserLabel,iconBitField syn region iconParen transparent start='(' end=')' contains=ALLBUT,@iconParenGroup syn match iconParenError ")" syn match iconInParen contained "[{}]" syn case ignore "integer number, or floating point number without a dot syn match iconNumber "\<\d\+\>" "floating point number, with dot, optional exponent syn match iconFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=\>" "floating point number, starting with a dot, optional exponent syn match iconFloat "\.\d\+\(e[-+]\=\d\+\)\=\>" "floating point number, without dot, with exponent syn match iconFloat "\<\d\+e[-+]\=\d\+\>" "radix number syn match iconRadix "\<\d\{1,2}[rR][a-zA-Z0-9]\+\>" " syn match iconIdentifier "\<[a-z_][a-z0-9_]*\>" syn case match " Comment syn match iconComment "#.*" contains=iconTodo,iconSpaceError syn region iconPreCondit start="^\s*$\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=iconComment,iconString,iconCharacter,iconNumber,iconCommentError,iconSpaceError syn region iconIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match iconIncluded contained "<[^>]*>" syn match iconInclude "^\s*$\s*include\>\s*["<]" contains=iconIncluded "syn match iconLineSkip "\\$" syn cluster iconPreProcGroup contains=iconPreCondit,iconIncluded,iconInclude,iconDefine,iconInParen,iconUserLabel syn region iconDefine start="^\s*$\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,@iconPreProcGroup "wt:syn region iconPreProc "start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" "end="$" contains=ALLBUT,@iconPreProcGroup " Highlight User Labels " syn cluster iconMultiGroup contains=iconIncluded,iconSpecial,iconTodo,iconUserCont,iconUserLabel,iconBitField if !exists("icon_minlines") let icon_minlines = 15 endif exec "syn sync ccomment iconComment minlines=" . icon_minlines " 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 if version >= 508 || !exists("did_icon_syn_inits") if version < 508 let did_icon_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 iconSpecialCharacter iconSpecial HiLink iconOctalError iconError HiLink iconParenError iconError HiLink iconInParen iconError HiLink iconCommentError iconError HiLink iconSpaceError iconError HiLink iconCommentError iconError HiLink iconIncluded iconString HiLink iconCommentString iconString HiLink iconComment2String iconString HiLink iconCommentSkip iconComment HiLink iconUserLabel Label HiLink iconCharacter Character HiLink iconNumber Number HiLink iconRadix Number HiLink iconFloat Float HiLink iconInclude Include HiLink iconPreProc PreProc HiLink iconDefine Macro HiLink iconError Error HiLink iconStatement Statement HiLink iconPreCondit PreCondit HiLink iconString String HiLink iconCset String HiLink iconComment Comment HiLink iconSpecial SpecialChar HiLink iconTodo Todo HiLink iconStorageClass StorageClass HiLink iconFunction Statement HiLink iconReserved Label HiLink iconKeyword Operator "HiLink iconIdentifier Identifier delcommand HiLink endif let b:current_syntax = "icon"
zyz2011-vim
runtime/syntax/icon.vim
Vim Script
gpl2
7,294
" Vim syntax file " Language: Microsoft VBScript Web Content (ASP) " Maintainer: Devin Weaver <ktohg@tritarget.com> (non-functional) " URL: http://tritarget.com/pub/vim/syntax/aspvbs.vim (broken) " Last Change: 2006 Jun 19 " by Dan Casey " Version: $Revision: 1.3 $ " Thanks to Jay-Jay <vim@jay-jay.net> for a syntax sync hack, hungarian " notation, and extra highlighting. " Thanks to patrick dehne <patrick@steidle.net> for the folding code. " Thanks to Dean Hall <hall@apt7.com> for testing the use of classes in " VBScripts which I've been too scared to do. " Quit when a syntax file was already loaded if version < 600 syn clear elseif exists("b:current_syntax") finish endif if !exists("main_syntax") let main_syntax = 'aspvbs' endif if version < 600 source <sfile>:p:h/html.vim else runtime! syntax/html.vim endif unlet b:current_syntax syn cluster htmlPreProc add=AspVBScriptInsideHtmlTags " Colored variable names, if written in hungarian notation hi def AspVBSVariableSimple term=standout ctermfg=3 guifg=#99ee99 hi def AspVBSVariableComplex term=standout ctermfg=3 guifg=#ee9900 syn match AspVBSVariableSimple contained "\<\(bln\|byt\|dtm\=\|dbl\|int\|str\)\u\w*" syn match AspVBSVariableComplex contained "\<\(arr\|ary\|obj\)\u\w*" " Functions and methods that are in VB but will cause errors in an ASP page " This is helpfull if your porting VB code to ASP " I removed (Count, Item) because these are common variable names in AspVBScript syn keyword AspVBSError contained Val Str CVar CVDate DoEvents GoSub Return GoTo syn keyword AspVBSError contained Stop LinkExecute Add Type LinkPoke syn keyword AspVBSError contained LinkRequest LinkSend Declare Optional Sleep syn keyword AspVBSError contained ParamArray Static Erl TypeOf Like LSet RSet Mid StrConv " It may seem that most of these can fit into a keyword clause but keyword takes " priority over all so I can't get the multi-word matches syn match AspVBSError contained "\<Def[a-zA-Z0-9_]\+\>" syn match AspVBSError contained "^\s*Open\s\+" syn match AspVBSError contained "Debug\.[a-zA-Z0-9_]*" syn match AspVBSError contained "^\s*[a-zA-Z0-9_]\+:" syn match AspVBSError contained "[a-zA-Z0-9_]\+![a-zA-Z0-9_]\+" syn match AspVBSError contained "^\s*#.*$" syn match AspVBSError contained "\<As\s\+[a-zA-Z0-9_]*" syn match AspVBSError contained "\<End\>\|\<Exit\>" syn match AspVBSError contained "\<On\s\+Error\>\|\<On\>\|\<Error\>\|\<Resume\s\+Next\>\|\<Resume\>" syn match AspVBSError contained "\<Option\s\+\(Base\|Compare\|Private\s\+Module\)\>" " This one I want 'cause I always seem to mis-spell it. syn match AspVBSError contained "Respon\?ce\.\S*" syn match AspVBSError contained "Respose\.\S*" " When I looked up the VBScript syntax it mentioned that Property Get/Set/Let " statements are illegal, however, I have recived reports that they do work. " So I commented it out for now. " syn match AspVBSError contained "\<Property\s\+\(Get\|Let\|Set\)\>" " AspVBScript Reserved Words. syn match AspVBSStatement contained "\<On\s\+Error\s\+\(Resume\s\+Next\|goto\s\+0\)\>\|\<Next\>" syn match AspVBSStatement contained "\<End\s\+\(If\|For\|Select\|Class\|Function\|Sub\|With\|Property\)\>" syn match AspVBSStatement contained "\<Exit\s\+\(Do\|For\|Sub\|Function\)\>" syn match AspVBSStatement contained "\<Exit\s\+\(Do\|For\|Sub\|Function\|Property\)\>" syn match AspVBSStatement contained "\<Option\s\+Explicit\>" syn match AspVBSStatement contained "\<For\s\+Each\>\|\<For\>" syn match AspVBSStatement contained "\<Set\>" syn keyword AspVBSStatement contained Call Class Const Default Dim Do Loop Erase And syn keyword AspVBSStatement contained Function If Then Else ElseIf Or syn keyword AspVBSStatement contained Private Public Randomize ReDim syn keyword AspVBSStatement contained Select Case Sub While With Wend Not " AspVBScript Functions syn keyword AspVBSFunction contained Abs Array Asc Atn CBool CByte CCur CDate CDbl syn keyword AspVBSFunction contained Chr CInt CLng Cos CreateObject CSng CStr Date syn keyword AspVBSFunction contained DateAdd DateDiff DatePart DateSerial DateValue syn keyword AspVBSFunction contained Date Day Exp Filter Fix FormatCurrency syn keyword AspVBSFunction contained FormatDateTime FormatNumber FormatPercent syn keyword AspVBSFunction contained GetObject Hex Hour InputBox InStr InStrRev Int syn keyword AspVBSFunction contained IsArray IsDate IsEmpty IsNull IsNumeric syn keyword AspVBSFunction contained IsObject Join LBound LCase Left Len LoadPicture syn keyword AspVBSFunction contained Log LTrim Mid Minute Month MonthName MsgBox Now syn keyword AspVBSFunction contained Oct Replace RGB Right Rnd Round RTrim syn keyword AspVBSFunction contained ScriptEngine ScriptEngineBuildVersion syn keyword AspVBSFunction contained ScriptEngineMajorVersion syn keyword AspVBSFunction contained ScriptEngineMinorVersion Second Sgn Sin Space syn keyword AspVBSFunction contained Split Sqr StrComp StrReverse String Tan Time Timer syn keyword AspVBSFunction contained TimeSerial TimeValue Trim TypeName UBound UCase syn keyword AspVBSFunction contained VarType Weekday WeekdayName Year " AspVBScript Methods syn keyword AspVBSMethods contained Add AddFolders BuildPath Clear Close Copy syn keyword AspVBSMethods contained CopyFile CopyFolder CreateFolder CreateTextFile syn keyword AspVBSMethods contained Delete DeleteFile DeleteFolder DriveExists syn keyword AspVBSMethods contained Exists FileExists FolderExists syn keyword AspVBSMethods contained GetAbsolutePathName GetBaseName GetDrive syn keyword AspVBSMethods contained GetDriveName GetExtensionName GetFile syn keyword AspVBSMethods contained GetFileName GetFolder GetParentFolderName syn keyword AspVBSMethods contained GetSpecialFolder GetTempName Items Keys Move syn keyword AspVBSMethods contained MoveFile MoveFolder OpenAsTextStream syn keyword AspVBSMethods contained OpenTextFile Raise Read ReadAll ReadLine Remove syn keyword AspVBSMethods contained RemoveAll Skip SkipLine Write WriteBlankLines syn keyword AspVBSMethods contained WriteLine syn match AspVBSMethods contained "Response\.\w*" " Colorize boolean constants: syn keyword AspVBSMethods contained true false " AspVBScript Number Contstants " Integer number, or floating point number without a dot. syn match AspVBSNumber contained "\<\d\+\>" " Floating point number, with dot syn match AspVBSNumber contained "\<\d\+\.\d*\>" " Floating point number, starting with a dot syn match AspVBSNumber contained "\.\d\+\>" " String and Character Contstants " removed (skip=+\\\\\|\\"+) because VB doesn't have backslash escaping in " strings (or does it?) syn region AspVBSString contained start=+"+ end=+"+ keepend " AspVBScript Comments syn region AspVBSComment contained start="^REM\s\|\sREM\s" end="$" contains=AspVBSTodo keepend syn region AspVBSComment contained start="^'\|\s'" end="$" contains=AspVBSTodo keepend " misc. Commenting Stuff syn keyword AspVBSTodo contained TODO FIXME " Cosmetic syntax errors commanly found in VB but not in AspVBScript " AspVBScript doesn't use line numbers syn region AspVBSError contained start="^\d" end="\s" keepend " AspVBScript also doesn't have type defining variables syn match AspVBSError contained "[a-zA-Z0-9_][\$&!#]"ms=s+1 " Since 'a%' is a VB variable with a type and in AspVBScript you can have 'a%>' " I have to make a special case so 'a%>' won't show as an error. syn match AspVBSError contained "[a-zA-Z0-9_]%\($\|[^>]\)"ms=s+1 " Top Cluster syn cluster AspVBScriptTop contains=AspVBSStatement,AspVBSFunction,AspVBSMethods,AspVBSNumber,AspVBSString,AspVBSComment,AspVBSError,AspVBSVariableSimple,AspVBSVariableComplex " Folding syn region AspVBSFold start="^\s*\(class\)\s\+.*$" end="^\s*end\s\+\(class\)\>.*$" fold contained transparent keepend syn region AspVBSFold start="^\s*\(private\|public\)\=\(\s\+default\)\=\s\+\(sub\|function\)\s\+.*$" end="^\s*end\s\+\(function\|sub\)\>.*$" fold contained transparent keepend " Define AspVBScript delimeters " <%= func("string_with_%>_in_it") %> This is illegal in ASP syntax. syn region AspVBScriptInsideHtmlTags keepend matchgroup=Delimiter start=+<%=\=+ end=+%>+ contains=@AspVBScriptTop, AspVBSFold syn region AspVBScriptInsideHtmlTags keepend matchgroup=Delimiter start=+<script\s\+language="\=vbscript"\=[^>]*\s\+runatserver[^>]*>+ end=+</script>+ contains=@AspVBScriptTop " Synchronization " syn sync match AspVBSSyncGroup grouphere AspVBScriptInsideHtmlTags "<%" " This is a kludge so the HTML will sync properly syn sync match htmlHighlight grouphere htmlTag "%>" " 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_aspvbs_syn_inits") if version < 508 let did_aspvbs_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif "HiLink AspVBScript Special HiLink AspVBSLineNumber Comment HiLink AspVBSNumber Number HiLink AspVBSError Error HiLink AspVBSStatement Statement HiLink AspVBSString String HiLink AspVBSComment Comment HiLink AspVBSTodo Todo HiLink AspVBSFunction Identifier HiLink AspVBSMethods PreProc HiLink AspVBSEvents Special HiLink AspVBSTypeSpecifier Type delcommand HiLink endif let b:current_syntax = "aspvbs" if main_syntax == 'aspvbs' unlet main_syntax endif " vim: ts=8:sw=2:sts=0:noet
zyz2011-vim
runtime/syntax/aspvbs.vim
Vim Script
gpl2
9,477
" Vim syntax file " Language: Mutt setup files " Original: Preben 'Peppe' Guldberg <peppe-vim@wielders.org> " Maintainer: Kyle Wheeler <kyle-muttrc.vim@memoryhole.net> " Last Change: 2 Feb 2012 " This file covers mutt version 1.5.21 (and most of the mercurial tip) " Included are also a few features from 1.4.2.1 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " Set the keyword characters if version < 600 set isk=@,48-57,_,- else setlocal isk=@,48-57,_,- endif " handling optional variables if !exists("use_mutt_sidebar") let use_mutt_sidebar=0 endif syn match muttrcComment "^# .*$" contains=@Spell syn match muttrcComment "^#[^ ].*$" syn match muttrcComment "^#$" syn match muttrcComment "[^\\]#.*$"lc=1 " Escape sequences (back-tick and pipe goes here too) syn match muttrcEscape +\\[#tnr"'Cc ]+ syn match muttrcEscape +[`|]+ syn match muttrcEscape +\\$+ " The variables takes the following arguments "syn match muttrcString contained "=\s*[^ #"'`]\+"lc=1 contains=muttrcEscape syn region muttrcString contained keepend start=+"+ms=e skip=+\\"+ end=+"+ contains=muttrcEscape,muttrcCommand,muttrcAction,muttrcShellString syn region muttrcString contained keepend start=+'+ms=e skip=+\\'+ end=+'+ contains=muttrcEscape,muttrcCommand,muttrcAction syn match muttrcStringNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcString,muttrcStringNL syn region muttrcShellString matchgroup=muttrcEscape keepend start=+`+ skip=+\\`+ end=+`+ contains=muttrcVarStr,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcCommand syn match muttrcRXChars contained /[^\\][][.*?+]\+/hs=s+1 syn match muttrcRXChars contained /[][|()][.*?+]*/ syn match muttrcRXChars contained /['"]^/ms=s+1 syn match muttrcRXChars contained /$['"]/me=e-1 syn match muttrcRXChars contained /\\/ " Why does muttrcRXString2 work with one \ when muttrcRXString requires two? syn region muttrcRXString contained skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcRXChars syn region muttrcRXString contained skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcRXChars syn region muttrcRXString contained skipwhite start=+[^ "'^]+ skip=+\\\s+ end=+\s+re=e-1 contains=muttrcRXChars " For some reason, skip refuses to match backslashes here... syn region muttrcRXString contained matchgroup=muttrcRXChars skipwhite start=+\^+ end=+[^\\]\s+re=e-1 contains=muttrcRXChars syn region muttrcRXString contained matchgroup=muttrcRXChars skipwhite start=+\^+ end=+$\s+ contains=muttrcRXChars syn region muttrcRXString2 contained skipwhite start=+'+ skip=+\'+ end=+'+ contains=muttrcRXChars syn region muttrcRXString2 contained skipwhite start=+"+ skip=+\"+ end=+"+ contains=muttrcRXChars " these must be kept synchronized with muttrcRXString, but are intended for " muttrcRXHooks syn region muttrcRXHookString contained keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL syn region muttrcRXHookString contained keepend skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL syn region muttrcRXHookString contained keepend skipwhite start=+[^ "'^]+ skip=+\\\s+ end=+\s+re=e-1 contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL syn region muttrcRXHookString contained keepend skipwhite start=+\^+ end=+[^\\]\s+re=e-1 contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL syn region muttrcRXHookString contained keepend matchgroup=muttrcRXChars skipwhite start=+\^+ end=+$\s+ contains=muttrcRXString nextgroup=muttrcString,muttrcStringNL syn match muttrcRXHookStringNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcRXHookString,muttrcRXHookStringNL " these are exclusively for args lists (e.g. -rx pat pat pat ...) syn region muttrcRXPat contained keepend skipwhite start=+'+ skip=+\\'+ end=+'\s*+ contains=muttrcRXString nextgroup=muttrcRXPat syn region muttrcRXPat contained keepend skipwhite start=+"+ skip=+\\"+ end=+"\s*+ contains=muttrcRXString nextgroup=muttrcRXPat syn match muttrcRXPat contained /[^-'"#!]\S\+/ skipwhite contains=muttrcRXChars nextgroup=muttrcRXPat syn match muttrcRXDef contained "-rx\s\+" skipwhite nextgroup=muttrcRXPat syn match muttrcSpecial +\(['"]\)!\1+ syn match muttrcSetStrAssignment contained skipwhite /=\s*\%(\\\?\$\)\?[0-9A-Za-z_-]\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcVariable,muttrcEscapedVariable syn region muttrcSetStrAssignment contained skipwhite keepend start=+=\s*"+hs=s+1 end=+"+ skip=+\\"+ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcString syn region muttrcSetStrAssignment contained skipwhite keepend start=+=\s*'+hs=s+1 end=+'+ skip=+\\'+ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcString syn match muttrcSetBoolAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcVariable,muttrcEscapedVariable syn match muttrcSetBoolAssignment contained skipwhite /=\s*\%(yes\|no\)/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn match muttrcSetBoolAssignment contained skipwhite /=\s*"\%(yes\|no\)"/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn match muttrcSetBoolAssignment contained skipwhite /=\s*'\%(yes\|no\)'/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn match muttrcSetQuadAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcVariable,muttrcEscapedVariable syn match muttrcSetQuadAssignment contained skipwhite /=\s*\%(ask-\)\?\%(yes\|no\)/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn match muttrcSetQuadAssignment contained skipwhite /=\s*"\%(ask-\)\?\%(yes\|no\)"/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn match muttrcSetQuadAssignment contained skipwhite /=\s*'\%(ask-\)\?\%(yes\|no\)'/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn match muttrcSetNumAssignment contained skipwhite /=\s*\\\?\$\w\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr contains=muttrcVariable,muttrcEscapedVariable syn match muttrcSetNumAssignment contained skipwhite /=\s*\d\+/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn match muttrcSetNumAssignment contained skipwhite /=\s*"\d\+"/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn match muttrcSetNumAssignment contained skipwhite /=\s*'\d\+'/hs=s+1 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr " Now catch some email addresses and headers (purified version from mail.vim) syn match muttrcEmail "[a-zA-Z0-9._-]\+@[a-zA-Z0-9./-]\+" syn match muttrcHeader "\<\%(From\|To\|C[Cc]\|B[Cc][Cc]\|Reply-To\|Subject\|Return-Path\|Received\|Date\|Replied\|Attach\)\>:\=" syn match muttrcKeySpecial contained +\%(\\[Cc'"]\|\^\|\\[01]\d\{2}\)+ syn match muttrcKey contained "\S\+" contains=muttrcKeySpecial,muttrcKeyName syn region muttrcKey contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=muttrcKeySpecial,muttrcKeyName syn region muttrcKey contained start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=muttrcKeySpecial,muttrcKeyName syn match muttrcKeyName contained "\<f\%(\d\|10\)\>" syn match muttrcKeyName contained "\\[trne]" syn match muttrcKeyName contained "\c<\%(BackSpace\|BackTab\|Delete\|Down\|End\|Enter\|Esc\|Home\|Insert\|Left\|PageDown\|PageUp\|Return\|Right\|Space\|Tab\|Up\)>" syn match muttrcKeyName contained "<F[0-9]\+>" syn keyword muttrcVarBool skipwhite contained allow_8bit allow_ansi arrow_cursor ascii_chars askbcc askcc attach_split auto_tag autoedit beep beep_new nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained bounce_delivered braille_friendly check_new check_mbox_size nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained collapse_unread confirmappend confirmcreate crypt_autoencrypt nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained crypt_autopgp crypt_autosign crypt_autosmime crypt_replyencrypt nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained crypt_replysign crypt_replysignencrypted crypt_timestamp nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained crypt_use_gpgme crypt_use_pka delete_untag digest_collapse duplicate_threads nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained edit_hdrs edit_headers encode_from envelope_from fast_reply nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained fcc_clear followup_to force_name forw_decode nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained forw_decrypt forw_quote forward_decode forward_decrypt nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained forward_quote hdrs header help hidden_host hide_limited nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained hide_missing hide_thread_subject hide_top_limited nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained hide_top_missing honor_disposition ignore_linear_white_space ignore_list_reply_to imap_check_subscribed nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained imap_list_subscribed imap_passive imap_peek imap_servernoise nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained implicit_autoview include_onlyfirst keep_flagged nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained mailcap_sanitize maildir_header_cache_verify maildir_trash nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained mark_old markers menu_move_off menu_scroll message_cache_clean meta_key nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained metoo mh_purge mime_forward_decode narrow_tree pager_stop nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained pgp_auto_decode pgp_auto_traditional pgp_autoencrypt nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained pgp_autoinline pgp_autosign pgp_check_exit nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained pgp_create_traditional pgp_ignore_subkeys pgp_long_ids nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained pgp_replyencrypt pgp_replyinline pgp_replysign nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained pgp_replysignencrypted pgp_retainable_sigs pgp_show_unusable nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained pgp_strict_enc pgp_use_gpg_agent pipe_decode pipe_split nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained pop_auth_try_all pop_last print_decode print_split nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained prompt_after read_only reply_self resolve reverse_alias nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained reverse_name reverse_realname rfc2047_parameters save_address nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained save_empty save_name score sig_dashes sig_on_top nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained smart_wrap smime_ask_cert_label smime_decrypt_use_default_key nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained smime_is_default sort_re ssl_force_tls ssl_use_sslv2 nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained ssl_use_sslv3 ssl_use_tlsv1 ssl_usesystemcerts ssl_verify_dates ssl_verify_host status_on_top nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained strict_mime strict_threads suspend text_flowed thorough_search nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained thread_received tilde uncollapse_jump use_8bitmime nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained use_domain use_envelope_from use_from use_idn use_ipv6 nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained user_agent wait_key weed wrap_search write_bcc nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained noallow_8bit noallow_ansi noarrow_cursor noascii_chars noaskbcc nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained noaskcc noattach_split noauto_tag noautoedit nobeep nobeep_new nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nobounce_delivered nobraille_friendly nocheck_new nocollapse_unread nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained noconfirmappend noconfirmcreate nocrypt_autoencrypt nocrypt_autopgp nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nocrypt_autosign nocrypt_autosmime nocrypt_replyencrypt nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nocrypt_replysign nocrypt_replysignencrypted nocrypt_timestamp nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nocrypt_use_gpgme nodelete_untag nodigest_collapse noduplicate_threads nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained noedit_hdrs noedit_headers noencode_from noenvelope_from nofast_reply nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nofcc_clear nofollowup_to noforce_name noforw_decode nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained noforw_decrypt noforw_quote noforward_decode noforward_decrypt nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained noforward_quote nohdrs noheader nohelp nohidden_host nohide_limited nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nohide_missing nohide_thread_subject nohide_top_limited nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nohide_top_missing nohonor_disposition noignore_list_reply_to noimap_check_subscribed nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained noimap_list_subscribed noimap_passive noimap_peek noimap_servernoise nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained noimplicit_autoview noinclude_onlyfirst nokeep_flagged nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nomailcap_sanitize nomaildir_header_cache_verify nomaildir_trash nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nomark_old nomarkers nomenu_move_off nomenu_scroll nometa_key nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nometoo nomh_purge nomime_forward_decode nonarrow_tree nopager_stop nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nopgp_auto_decode nopgp_auto_traditional nopgp_autoencrypt nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nopgp_autoinline nopgp_autosign nopgp_check_exit nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nopgp_create_traditional nopgp_ignore_subkeys nopgp_long_ids nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nopgp_replyencrypt nopgp_replyinline nopgp_replysign nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nopgp_replysignencrypted nopgp_retainable_sigs nopgp_show_unusable nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nopgp_strict_enc nopgp_use_gpg_agent nopipe_decode nopipe_split nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nopop_auth_try_all nopop_last noprint_decode noprint_split nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained noprompt_after noread_only noreply_self noresolve noreverse_alias nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained noreverse_name noreverse_realname norfc2047_parameters nosave_address nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nosave_empty nosave_name noscore nosig_dashes nosig_on_top nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nosmart_wrap nosmime_ask_cert_label nosmime_decrypt_use_default_key nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nosmime_is_default nosort_re nossl_force_tls nossl_use_sslv2 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nossl_use_sslv3 nossl_use_tlsv1 nossl_usesystemcerts nostatus_on_top nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nostrict_threads nosuspend notext_flowed nothorough_search nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nothread_received notilde nouncollapse_jump nouse_8bitmime nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nouse_domain nouse_envelope_from nouse_from nouse_idn nouse_ipv6 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained nouser_agent nowait_key noweed nowrap_search nowrite_bcc nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invallow_8bit invallow_ansi invarrow_cursor invascii_chars invaskbcc nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invaskcc invattach_split invauto_tag invautoedit invbeep invbeep_new nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invbounce_delivered invbraille_friendly invcheck_new invcollapse_unread nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invconfirmappend invconfirmcreate invcrypt_autoencrypt invcrypt_autopgp nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invcrypt_autosign invcrypt_autosmime invcrypt_replyencrypt nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invcrypt_replysign invcrypt_replysignencrypted invcrypt_timestamp nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invcrypt_use_gpgme invdelete_untag invdigest_collapse invduplicate_threads nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invedit_hdrs invedit_headers invencode_from invenvelope_from invfast_reply nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invfcc_clear invfollowup_to invforce_name invforw_decode nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invforw_decrypt invforw_quote invforward_decode invforward_decrypt nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invforward_quote invhdrs invheader invhelp invhidden_host invhide_limited nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invhide_missing invhide_thread_subject invhide_top_limited nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invhide_top_missing invhonor_disposition invignore_list_reply_to invimap_check_subscribed nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invimap_list_subscribed invimap_passive invimap_peek invimap_servernoise nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invimplicit_autoview invinclude_onlyfirst invkeep_flagged nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invmailcap_sanitize invmaildir_header_cache_verify invmaildir_trash nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invmark_old invmarkers invmenu_move_off invmenu_scroll invmeta_key nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invmetoo invmh_purge invmime_forward_decode invnarrow_tree invpager_stop nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invpgp_auto_decode invpgp_auto_traditional invpgp_autoencrypt nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invpgp_autoinline invpgp_autosign invpgp_check_exit nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invpgp_create_traditional invpgp_ignore_subkeys invpgp_long_ids nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invpgp_replyencrypt invpgp_replyinline invpgp_replysign nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invpgp_replysignencrypted invpgp_retainable_sigs invpgp_show_unusable nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invpgp_strict_enc invpgp_use_gpg_agent invpipe_decode invpipe_split nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invpop_auth_try_all invpop_last invprint_decode invprint_split nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invprompt_after invread_only invreply_self invresolve invreverse_alias nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invreverse_name invreverse_realname invrfc2047_parameters invsave_address nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invsave_empty invsave_name invscore invsig_dashes invsig_on_top nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invsmart_wrap invsmime_ask_cert_label invsmime_decrypt_use_default_key nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invsmime_is_default invsort_re invssl_force_tls invssl_use_sslv2 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invssl_use_sslv3 invssl_use_tlsv1 invssl_usesystemcerts invstatus_on_top nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invstrict_threads invsuspend invtext_flowed invthorough_search nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invthread_received invtilde invuncollapse_jump invuse_8bitmime nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invuse_domain invuse_envelope_from invuse_from invuse_idn invuse_ipv6 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained invuser_agent invwait_key invweed invwrap_search invwrite_bcc nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr if use_mutt_sidebar == 1 syn keyword muttrcVarBool skipwhite contained sidebar_visible sidebar_sort nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr endif syn keyword muttrcVarQuad skipwhite contained abort_nosubject abort_unmodified bounce copy nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained crypt_verify_sig delete fcc_attach forward_edit honor_followup_to nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained include mime_forward mime_forward_rest mime_fwd move nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained pgp_mime_auto pgp_verify_sig pop_delete pop_reconnect nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained postpone print quit recall reply_to ssl_starttls nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained noabort_nosubject noabort_unmodified nobounce nocopy nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained nocrypt_verify_sig nodelete nofcc_attach noforward_edit nohonor_followup_to nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained noinclude nomime_forward nomime_forward_rest nomime_fwd nomove nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained nopgp_mime_auto nopgp_verify_sig nopop_delete nopop_reconnect nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained nopostpone noprint noquit norecall noreply_to nossl_starttls nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained invabort_nosubject invabort_unmodified invbounce invcopy nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained invcrypt_verify_sig invdelete invfcc_attach invforward_edit invhonor_followup_to nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained invinclude invmime_forward invmime_forward_rest invmime_fwd invmove nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained invpgp_mime_auto invpgp_verify_sig invpop_delete invpop_reconnect nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained invpostpone invprint invquit invrecall invreply_to invssl_starttls nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarNum skipwhite contained connect_timeout history imap_keepalive imap_pipeline_depth mail_check nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarNum skipwhite contained menu_context net_inc pager_context pager_index_lines pgp_timeout nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarNum skipwhite contained pop_checkinterval read_inc save_history score_threshold_delete nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarNum skipwhite contained score_threshold_flag score_threshold_read search_context sendmail_wait sleep_time nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarNum skipwhite contained smime_timeout ssl_min_dh_prime_bits timeout time_inc wrap wrapmargin nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarNum skipwhite contained write_inc nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr if use_mutt_sidebar == 1 syn keyword muttrcVarNum skipwhite contained sidebar_width nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr endif syn match muttrcFormatErrors contained /%./ syn match muttrcStrftimeEscapes contained /%[AaBbCcDdeFGgHhIjklMmnpRrSsTtUuVvWwXxYyZz+%]/ syn match muttrcStrftimeEscapes contained /%E[cCxXyY]/ syn match muttrcStrftimeEscapes contained /%O[BdeHImMSuUVwWy]/ syn region muttrcIndexFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcIndexFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcQueryFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcQueryFormatEscapes,muttrcQueryFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcAliasFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAliasFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcAliasFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAliasFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcAttachFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAttachFormatEscapes,muttrcAttachFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcAttachFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAttachFormatEscapes,muttrcAttachFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcComposeFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcComposeFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcComposeFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcComposeFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcFolderFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcFolderFormatEscapes,muttrcFolderFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcFolderFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcFolderFormatEscapes,muttrcFolderFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcMixFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcMixFormatEscapes,muttrcMixFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcMixFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcMixFormatEscapes,muttrcMixFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcPGPFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPFormatEscapes,muttrcPGPFormatConditionals,muttrcFormatErrors,muttrcPGPTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcPGPFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPFormatEscapes,muttrcPGPFormatConditionals,muttrcFormatErrors,muttrcPGPTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcPGPCmdFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPCmdFormatEscapes,muttrcPGPCmdFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcPGPCmdFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPCmdFormatEscapes,muttrcPGPCmdFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcStatusFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcStatusFormatEscapes,muttrcStatusFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcStatusFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcStatusFormatEscapes,muttrcStatusFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcPGPGetKeysFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPGetKeysFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcPGPGetKeysFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPGetKeysFormatEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcSmimeFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcSmimeFormatEscapes,muttrcSmimeFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcSmimeFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcSmimeFormatEscapes,muttrcSmimeFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcStrftimeFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcStrftimeEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn region muttrcStrftimeFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcStrftimeEscapes,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr " The following info was pulled from hdr_format_str in hdrline.c syn match muttrcIndexFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[aAbBcCdDeEfFHilLmMnNOPsStTuvXyYZ%]/ syn match muttrcIndexFormatEscapes contained /%[>|*]./ syn match muttrcIndexFormatConditionals contained /%?[EFHlLMNOXyY]?/ nextgroup=muttrcFormatConditionals2 " The following info was pulled from alias_format_str in addrbook.c syn match muttrcAliasFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[afnrt%]/ " The following info was pulled from query_format_str in query.c syn match muttrcQueryFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[acent%]/ syn match muttrcQueryFormatConditionals contained /%?[e]?/ nextgroup=muttrcFormatConditionals2 " The following info was pulled from mutt_attach_fmt in recvattach.c syn match muttrcAttachFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[CcDdefImMnQstTuX%]/ syn match muttrcAttachFormatEscapes contained /%[>|*]./ syn match muttrcAttachFormatConditionals contained /%?[CcdDefInmMQstTuX]?/ nextgroup=muttrcFormatConditionals2 syn match muttrcFormatConditionals2 contained /[^?]*?/ " The following info was pulled from compose_format_str in compose.c syn match muttrcComposeFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[ahlv%]/ syn match muttrcComposeFormatEscapes contained /%[>|*]./ " The following info was pulled from folder_format_str in browser.c syn match muttrcFolderFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[CDdfFglNstu%]/ syn match muttrcFolderFormatEscapes contained /%[>|*]./ syn match muttrcFolderFormatConditionals contained /%?[N]?/ " The following info was pulled from mix_entry_fmt in remailer.c syn match muttrcMixFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[ncsa%]/ syn match muttrcMixFormatConditionals contained /%?[ncsa]?/ " The following info was pulled from crypt_entry_fmt in crypt-gpgme.c " and pgp_entry_fmt in pgpkey.c (note that crypt_entry_fmt supports " 'p', but pgp_entry_fmt does not). syn match muttrcPGPFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[nkualfctp%]/ syn match muttrcPGPFormatConditionals contained /%?[nkualfct]?/ " The following info was pulled from _mutt_fmt_pgp_command in " pgpinvoke.c syn match muttrcPGPCmdFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[pfsar%]/ syn match muttrcPGPCmdFormatConditionals contained /%?[pfsar]?/ nextgroup=muttrcFormatConditionals2 " The following info was pulled from status_format_str in status.c syn match muttrcStatusFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[bdfFhlLmMnopPrsStuvV%]/ syn match muttrcStatusFormatEscapes contained /%[>|*]./ syn match muttrcStatusFormatConditionals contained /%?[bdFlLmMnoptuV]?/ nextgroup=muttrcFormatConditionals2 " This matches the documentation, but directly contradicts the code " (according to the code, this should be identical to the " muttrcPGPCmdFormatEscapes syn match muttrcPGPGetKeysFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[r%]/ " The following info was pulled from _mutt_fmt_smime_command in " smime.c syn match muttrcSmimeFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[Cciskaf%]/ syn match muttrcSmimeFormatConditionals contained /%?[Cciskaf]?/ nextgroup=muttrcFormatConditionals2 syn region muttrcTimeEscapes contained start=+%{+ end=+}+ contains=muttrcStrftimeEscapes syn region muttrcTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes syn region muttrcTimeEscapes contained start=+%(+ end=+)+ contains=muttrcStrftimeEscapes syn region muttrcTimeEscapes contained start=+%<+ end=+>+ contains=muttrcStrftimeEscapes syn region muttrcPGPTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes syn keyword muttrcVarStr contained skipwhite attribution index_format message_format pager_format nextgroup=muttrcVarEqualsIdxFmt syn match muttrcVarEqualsIdxFmt contained skipwhite "=" nextgroup=muttrcIndexFormatStr syn keyword muttrcVarStr contained skipwhite alias_format nextgroup=muttrcVarEqualsAliasFmt syn match muttrcVarEqualsAliasFmt contained skipwhite "=" nextgroup=muttrcAliasFormatStr syn keyword muttrcVarStr contained skipwhite attach_format nextgroup=muttrcVarEqualsAttachFmt syn match muttrcVarEqualsAttachFmt contained skipwhite "=" nextgroup=muttrcAttachFormatStr syn keyword muttrcVarStr contained skipwhite compose_format nextgroup=muttrcVarEqualsComposeFmt syn match muttrcVarEqualsComposeFmt contained skipwhite "=" nextgroup=muttrcComposeFormatStr syn keyword muttrcVarStr contained skipwhite folder_format nextgroup=muttrcVarEqualsFolderFmt syn match muttrcVarEqualsFolderFmt contained skipwhite "=" nextgroup=muttrcFolderFormatStr syn keyword muttrcVarStr contained skipwhite mix_entry_format nextgroup=muttrcVarEqualsMixFmt syn match muttrcVarEqualsMixFmt contained skipwhite "=" nextgroup=muttrcMixFormatStr syn keyword muttrcVarStr contained skipwhite pgp_entry_format nextgroup=muttrcVarEqualsPGPFmt syn match muttrcVarEqualsPGPFmt contained skipwhite "=" nextgroup=muttrcPGPFormatStr syn keyword muttrcVarStr contained skipwhite query_format nextgroup=muttrcVarEqualsQueryFmt syn match muttrcVarEqualsQueryFmt contained skipwhite "=" nextgroup=muttrcQueryFormatStr syn keyword muttrcVarStr contained skipwhite pgp_decode_command pgp_verify_command pgp_decrypt_command pgp_clearsign_command pgp_sign_command pgp_encrypt_sign_command pgp_encrypt_only_command pgp_import_command pgp_export_command pgp_verify_key_command pgp_list_secring_command pgp_list_pubring_command nextgroup=muttrcVarEqualsPGPCmdFmt syn match muttrcVarEqualsPGPCmdFmt contained skipwhite "=" nextgroup=muttrcPGPCmdFormatStr syn keyword muttrcVarStr contained skipwhite status_format nextgroup=muttrcVarEqualsStatusFmt syn match muttrcVarEqualsStatusFmt contained skipwhite "=" nextgroup=muttrcStatusFormatStr syn keyword muttrcVarStr contained skipwhite pgp_getkeys_command nextgroup=muttrcVarEqualsPGPGetKeysFmt syn match muttrcVarEqualsPGPGetKeysFmt contained skipwhite "=" nextgroup=muttrcPGPGetKeysFormatStr syn keyword muttrcVarStr contained skipwhite smime_decrypt_command smime_verify_command smime_verify_opaque_command smime_sign_command smime_sign_opaque_command smime_encrypt_command smime_pk7out_command smime_get_cert_command smime_get_signer_cert_command smime_import_cert_command smime_get_cert_email_command nextgroup=muttrcVarEqualsSmimeFmt syn match muttrcVarEqualsSmimeFmt contained skipwhite "=" nextgroup=muttrcSmimeFormatStr syn keyword muttrcVarStr contained skipwhite date_format nextgroup=muttrcVarEqualsStrftimeFmt syn match muttrcVarEqualsStrftimeFmt contained skipwhite "=" nextgroup=muttrcStrftimeFormatStr syn match muttrcVPrefix contained /[?&]/ nextgroup=muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn match muttrcVarStr contained skipwhite 'my_[a-zA-Z0-9_]\+' nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite alias_file assumed_charset attach_charset attach_sep nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite certificate_file charset config_charset content_type nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite default_hook display_filter dotlock_program dsn_notify nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite dsn_return editor entropy_file envelope_from_address escape folder nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite forw_format forward_format from gecos_mask hdr_format nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite header_cache header_cache_compress header_cache_pagesize nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite history_file hostname imap_authenticators nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite imap_delim_chars imap_headers imap_idle imap_login imap_pass nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite imap_user indent_str indent_string ispell locale mailcap_path nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite mask mbox mbox_type message_cachedir mh_seq_flagged mh_seq_replied nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite mh_seq_unseen mixmaster msg_format pager nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite pgp_good_sign nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite pgp_mime_signature_filename nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite pgp_mime_signature_description pgp_sign_as nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite pgp_sort_keys nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite pipe_sep pop_authenticators pop_host pop_pass pop_user post_indent_str nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite post_indent_string postponed preconnect print_cmd print_command nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite query_command quote_regexp realname record reply_regexp send_charset nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite sendmail shell signature simple_search smileys smime_ca_location nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite smime_certificates smime_default_key nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite smime_encrypt_with nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite smime_keys smime_sign_as nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite smtp_url smtp_authenticators smtp_pass sort sort_alias sort_aux nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite sort_browser spam_separator spoolfile ssl_ca_certificates_file ssl_client_cert nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite status_chars tmpdir to_chars tunnel visual nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr if use_mutt_sidebar == 1 syn keyword muttrcVarStr skipwhite contained sidebar_delim nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr endif " Present in 1.4.2.1 (pgp_create_traditional was a bool then) syn keyword muttrcVarBool contained skipwhite imap_force_ssl noimap_force_ssl invimap_force_ssl nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr "syn keyword muttrcVarQuad contained pgp_create_traditional nopgp_create_traditional invpgp_create_traditional syn keyword muttrcVarStr contained skipwhite alternates nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcMenu contained alias attach browser compose editor index pager postpone pgp mix query generic syn match muttrcMenuList "\S\+" contained contains=muttrcMenu syn match muttrcMenuCommas /,/ contained syn keyword muttrcHooks contained skipwhite account-hook charset-hook iconv-hook message-hook folder-hook mbox-hook save-hook fcc-hook fcc-save-hook send-hook send2-hook reply-hook crypt-hook syn keyword muttrcCommand auto_view alternative_order exec unalternative_order syn keyword muttrcCommand hdr_order iconv-hook ignore mailboxes my_hdr unmailboxes syn keyword muttrcCommand pgp-hook push score source unauto_view unhdr_order syn keyword muttrcCommand unignore unmono unmy_hdr unscore syn keyword muttrcCommand mime_lookup unmime_lookup ungroup syn keyword muttrcCommand unalternative_order syn keyword muttrcCommand skipwhite charset-hook nextgroup=muttrcRXString syn keyword muttrcCommand skipwhite unhook nextgroup=muttrcHooks syn keyword muttrcCommand skipwhite spam nextgroup=muttrcSpamPattern syn region muttrcSpamPattern contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPattern nextgroup=muttrcString,muttrcStringNL syn region muttrcSpamPattern contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPattern nextgroup=muttrcString,muttrcStringNL syn keyword muttrcCommand skipwhite nospam nextgroup=muttrcNoSpamPattern syn region muttrcNoSpamPattern contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPattern syn region muttrcNoSpamPattern contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPattern syn match muttrcAttachmentsMimeType contained "[*a-z0-9_-]\+/[*a-z0-9._-]\+\s*" skipwhite nextgroup=muttrcAttachmentsMimeType syn match muttrcAttachmentsFlag contained "[+-]\%([AI]\|inline\|attachment\)\s\+" skipwhite nextgroup=muttrcAttachmentsMimeType syn match muttrcAttachmentsLine "^\s*\%(un\)\?attachments\s\+" skipwhite nextgroup=muttrcAttachmentsFlag syn match muttrcUnHighlightSpace contained "\%(\s\+\|\\$\)" syn keyword muttrcAsterisk contained * syn keyword muttrcListsKeyword lists skipwhite nextgroup=muttrcGroupDef,muttrcComment syn keyword muttrcListsKeyword unlists skipwhite nextgroup=muttrcAsterisk,muttrcComment syn keyword muttrcSubscribeKeyword subscribe nextgroup=muttrcGroupDef,muttrcComment syn keyword muttrcSubscribeKeyword unsubscribe nextgroup=muttrcAsterisk,muttrcComment syn keyword muttrcAlternateKeyword contained alternates unalternates syn region muttrcAlternatesLine keepend start=+^\s*\%(un\)\?alternates\s+ skip=+\\$+ end=+$+ contains=muttrcAlternateKeyword,muttrcGroupDef,muttrcRXPat,muttrcUnHighlightSpace,muttrcComment " muttrcVariable includes a prefix because partial strings are considered " valid. syn match muttrcVariable contained "\\\@<![a-zA-Z_-]*\$[a-zA-Z_-]\+" contains=muttrcVariableInner syn match muttrcVariableInner contained "\$[a-zA-Z_-]\+" syn match muttrcEscapedVariable contained "\\\$[a-zA-Z_-]\+" syn match muttrcBadAction contained "[^<>]\+" contains=muttrcEmail syn match muttrcFunction contained "\<\%(attach\|bounce\|copy\|delete\|display\|flag\|forward\|parent\|pipe\|postpone\|print\|recall\|resend\|save\|send\|tag\|undelete\)-message\>" syn match muttrcFunction contained "\<\%(delete\|next\|previous\|read\|tag\|break\|undelete\)-thread\>" syn match muttrcFunction contained "\<link-threads\>" syn match muttrcFunction contained "\<\%(backward\|capitalize\|downcase\|forward\|kill\|upcase\)-word\>" syn match muttrcFunction contained "\<\%(delete\|filter\|first\|last\|next\|pipe\|previous\|print\|save\|select\|tag\|undelete\)-entry\>" syn match muttrcFunction contained "\<attach-\%(file\|key\)\>" syn match muttrcFunction contained "\<change-\%(dir\|folder\|folder-readonly\)\>" syn match muttrcFunction contained "\<check-\%(new\|traditional-pgp\)\>" syn match muttrcFunction contained "\<current-\%(bottom\|middle\|top\)\>" syn match muttrcFunction contained "\<decode-\%(copy\|save\)\>" syn match muttrcFunction contained "\<delete-\%(char\|pattern\|subthread\)\>" syn match muttrcFunction contained "\<display-\%(address\|toggle-weed\)\>" syn match muttrcFunction contained "\<edit\%(-\%(bcc\|cc\|description\|encoding\|fcc\|file\|from\|headers\|mime\|reply-to\|subject\|to\|type\)\)\?\>" syn match muttrcFunction contained "\<enter-\%(command\|mask\)\>" syn match muttrcFunction contained "\<half-\%(up\|down\)\>" syn match muttrcFunction contained "\<history-\%(up\|down\)\>" syn match muttrcFunction contained "\<kill-\%(eol\|eow\|line\)\>" syn match muttrcFunction contained "\<next-\%(line\|new\%(-then-unread\)\?\|page\|subthread\|undeleted\|unread\|unread-mailbox\)\>" syn match muttrcFunction contained "\<previous-\%(line\|new\%(-then-unread\)\?\|page\|subthread\|undeleted\|unread\)\>" syn match muttrcFunction contained "\<search\%(-\%(next\|opposite\|reverse\|toggle\)\)\?\>" syn match muttrcFunction contained "\<show-\%(limit\|version\)\>" syn match muttrcFunction contained "\<sort-\%(mailbox\|reverse\)\>" syn match muttrcFunction contained "\<tag-\%(pattern\|\%(sub\)\?thread\|prefix\%(-cond\)\?\)\>" syn match muttrcFunction contained "\<end-cond\>" syn match muttrcFunction contained "\<toggle-\%(mailboxes\|new\|quoted\|subscribed\|unlink\|write\)\>" syn match muttrcFunction contained "\<undelete-\%(pattern\|subthread\)\>" syn match muttrcFunction contained "\<collapse-\%(parts\|thread\|all\)\>" syn match muttrcFunction contained "\<view-\%(attach\|attachments\|file\|mailcap\|name\|text\)\>" syn match muttrcFunction contained "\<\%(backspace\|backward-char\|bol\|bottom\|bottom-page\|buffy-cycle\|clear-flag\|complete\%(-query\)\?\|copy-file\|create-alias\|detach-file\|eol\|exit\|extract-keys\|\%(imap-\)\?fetch-mail\|forget-passphrase\|forward-char\|group-reply\|help\|ispell\|jump\|limit\|list-reply\|mail\|mail-key\|mark-as-new\|middle-page\|new-mime\|noop\|pgp-menu\|query\|query-append\|quit\|quote-char\|read-subthread\|redraw-screen\|refresh\|rename-file\|reply\|select-new\|set-flag\|shell-escape\|skip-quoted\|sort\|subscribe\|sync-mailbox\|top\|top-page\|transpose-chars\|unsubscribe\|untag-pattern\|verify-key\|what-key\|write-fcc\)\>" if use_mutt_sidebar == 1 syn match muttrcFunction contained "\<sidebar-\%(prev\|next\|open\|scroll-up\|scroll-down\)" endif syn match muttrcAction contained "<[^>]\{-}>" contains=muttrcBadAction,muttrcFunction,muttrcKeyName syn keyword muttrcCommand set skipwhite nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcCommand unset skipwhite nextgroup=muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcCommand reset skipwhite nextgroup=muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcCommand toggle skipwhite nextgroup=muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr " First, functions that take regular expressions: syn match muttrcRXHookNot contained /!\s*/ skipwhite nextgroup=muttrcRXHookString,muttrcRXHookStringNL syn match muttrcRXHooks /\<\%(account\|folder\)-hook\>/ skipwhite nextgroup=muttrcRXHookNot,muttrcRXHookString,muttrcRXHookStringNL " Now, functions that take patterns syn match muttrcPatHookNot contained /!\s*/ skipwhite nextgroup=muttrcPattern syn match muttrcPatHooks /\<\%(mbox\|crypt\)-hook\>/ skipwhite nextgroup=muttrcPatHookNot,muttrcPattern syn match muttrcPatHooks /\<\%(message\|reply\|send\|send2\|save\|\|fcc\%(-save\)\?\)-hook\>/ skipwhite nextgroup=muttrcPatHookNot,muttrcOptPattern syn match muttrcBindFunction contained /\S\+\>/ skipwhite contains=muttrcFunction syn match muttrcBindFunctionNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindFunction,muttrcBindFunctionNL syn match muttrcBindKey contained /\S\+/ skipwhite contains=muttrcKey nextgroup=muttrcBindFunction,muttrcBindFunctionNL syn match muttrcBindKeyNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindKey,muttrcBindKeyNL syn match muttrcBindMenuList contained /\S\+/ skipwhite contains=muttrcMenu,muttrcMenuCommas nextgroup=muttrcBindKey,muttrcBindKeyNL syn match muttrcBindMenuListNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindMenuList,muttrcBindMenuListNL syn keyword muttrcCommand skipwhite bind nextgroup=muttrcBindMenuList,muttrcBindMenuListNL syn region muttrcMacroDescr contained keepend skipwhite start=+\s*\S+ms=e skip=+\\ + end=+ \|$+me=s syn region muttrcMacroDescr contained keepend skipwhite start=+'+ms=e skip=+\\'+ end=+'+me=s syn region muttrcMacroDescr contained keepend skipwhite start=+"+ms=e skip=+\\"+ end=+"+me=s syn match muttrcMacroDescrNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroDescr,muttrcMacroDescrNL syn region muttrcMacroBody contained skipwhite start="\S" skip='\\ \|\\$' end=' \|$' contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction nextgroup=muttrcMacroDescr,muttrcMacroDescrNL syn region muttrcMacroBody matchgroup=Type contained skipwhite start=+'+ms=e skip=+\\'+ end=+'\|\%(\%(\\\\\)\@<!$\)+me=s contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcSpam,muttrcNoSpam,muttrcCommand,muttrcAction,muttrcVariable nextgroup=muttrcMacroDescr,muttrcMacroDescrNL syn region muttrcMacroBody matchgroup=Type contained skipwhite start=+"+ms=e skip=+\\"+ end=+"\|\%(\%(\\\\\)\@<!$\)+me=s contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcSpam,muttrcNoSpam,muttrcCommand,muttrcAction,muttrcVariable nextgroup=muttrcMacroDescr,muttrcMacroDescrNL syn match muttrcMacroBodyNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroBody,muttrcMacroBodyNL syn match muttrcMacroKey contained /\S\+/ skipwhite contains=muttrcKey nextgroup=muttrcMacroBody,muttrcMacroBodyNL syn match muttrcMacroKeyNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroKey,muttrcMacroKeyNL syn match muttrcMacroMenuList contained /\S\+/ skipwhite contains=muttrcMenu,muttrcMenuCommas nextgroup=muttrcMacroKey,muttrcMacroKeyNL syn match muttrcMacroMenuListNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroMenuList,muttrcMacroMenuListNL syn keyword muttrcCommand skipwhite macro nextgroup=muttrcMacroMenuList,muttrcMacroMenuListNL syn match muttrcAddrContent contained "[a-zA-Z0-9._-]\+@[a-zA-Z0-9./-]\+\s*" skipwhite contains=muttrcEmail nextgroup=muttrcAddrContent syn region muttrcAddrContent contained start=+'+ end=+'\s*+ skip=+\\'+ skipwhite contains=muttrcEmail nextgroup=muttrcAddrContent syn region muttrcAddrContent contained start=+"+ end=+"\s*+ skip=+\\"+ skipwhite contains=muttrcEmail nextgroup=muttrcAddrContent syn match muttrcAddrDef contained "-addr\s\+" skipwhite nextgroup=muttrcAddrContent syn match muttrcGroupFlag contained "-group" syn region muttrcGroupDef contained start="-group\s\+" skip="\\$" end="\s" skipwhite keepend contains=muttrcGroupFlag,muttrcUnHighlightSpace syn keyword muttrcGroupKeyword contained group ungroup syn region muttrcGroupLine keepend start=+^\s*\%(un\)\?group\s+ skip=+\\$+ end=+$+ contains=muttrcGroupKeyword,muttrcGroupDef,muttrcAddrDef,muttrcRXDef,muttrcUnHighlightSpace,muttrcComment syn match muttrcAliasGroupName contained /\w\+/ skipwhite nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL syn match muttrcAliasGroupDefNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasGroupName,muttrcAliasGroupDefNL syn match muttrcAliasGroupDef contained /\s*-group/ skipwhite nextgroup=muttrcAliasGroupName,muttrcAliasGroupDefNL contains=muttrcGroupFlag syn match muttrcAliasComma contained /,/ skipwhite nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL syn match muttrcAliasEmail contained /\S\+@\S\+/ contains=muttrcEmail nextgroup=muttrcAliasName,muttrcAliasNameNL skipwhite syn match muttrcAliasEncEmail contained /<[^>]\+>/ contains=muttrcEmail nextgroup=muttrcAliasComma syn match muttrcAliasEncEmailNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasEncEmail,muttrcAliasEncEmailNL syn match muttrcAliasNameNoParens contained /[^<(@]\+\s\+/ nextgroup=muttrcAliasEncEmail,muttrcAliasEncEmailNL syn region muttrcAliasName contained matchgroup=Type start=/(/ end=/)/ skipwhite syn match muttrcAliasNameNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasName,muttrcAliasNameNL syn match muttrcAliasENNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL syn match muttrcAliasKey contained /\s*[^- \t]\S\+/ skipwhite nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL syn match muttrcAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL syn keyword muttrcCommand skipwhite alias nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL syn match muttrcUnAliasKey contained "\s*\w\+\s*" skipwhite nextgroup=muttrcUnAliasKey,muttrcUnAliasNL syn match muttrcUnAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcUnAliasKey,muttrcUnAliasNL syn keyword muttrcCommand skipwhite unalias nextgroup=muttrcUnAliasKey,muttrcUnAliasNL syn match muttrcSimplePat contained "!\?\^\?[~][ADEFgGklNOpPQRSTuUvV=$]" syn match muttrcSimplePat contained "!\?\^\?[~][mnXz]\s*\%([<>-][0-9]\+[kM]\?\|[0-9]\+[kM]\?[-]\%([0-9]\+[kM]\?\)\?\)" syn match muttrcSimplePat contained "!\?\^\?[~][dr]\s*\%(\%(-\?[0-9]\{1,2}\%(/[0-9]\{1,2}\%(/[0-9]\{2}\%([0-9]\{2}\)\?\)\?\)\?\%([+*-][0-9]\+[ymwd]\)*\)\|\%(\%([0-9]\{1,2}\%(/[0-9]\{1,2}\%(/[0-9]\{2}\%([0-9]\{2}\)\?\)\?\)\?\%([+*-][0-9]\+[ymwd]\)*\)-\%([0-9]\{1,2}\%(/[0-9]\{1,2}\%(/[0-9]\{2}\%([0-9]\{2}\)\?\)\?\)\?\%([+*-][0-9]\+[ymwd]\)\?\)\?\)\|\%([<>=][0-9]\+[ymwd]\)\|\%(`[^`]\+`\)\|\%(\$[a-zA-Z0-9_-]\+\)\)" contains=muttrcShellString,muttrcVariable syn match muttrcSimplePat contained "!\?\^\?[~][bBcCefhHiLstxy]\s*" nextgroup=muttrcSimplePatRXContainer syn match muttrcSimplePat contained "!\?\^\?[%][bBcCefhHiLstxy]\s*" nextgroup=muttrcSimplePatString syn match muttrcSimplePat contained "!\?\^\?[=][bcCefhHiLstxy]\s*" nextgroup=muttrcSimplePatString syn region muttrcSimplePat contained keepend start=+!\?\^\?[~](+ end=+)+ contains=muttrcSimplePat "syn match muttrcSimplePat contained /'[^~=%][^']*/ contains=muttrcRXString syn region muttrcSimplePatString contained keepend start=+"+ end=+"+ skip=+\\"+ syn region muttrcSimplePatString contained keepend start=+'+ end=+'+ skip=+\\'+ syn region muttrcSimplePatString contained keepend start=+[^ "']+ skip=+\\ + end=+\s+re=e-1 syn region muttrcSimplePatRXContainer contained keepend start=+"+ end=+"+ skip=+\\"+ contains=muttrcRXString syn region muttrcSimplePatRXContainer contained keepend start=+'+ end=+'+ skip=+\\'+ contains=muttrcRXString syn region muttrcSimplePatRXContainer contained keepend start=+[^ "']+ skip=+\\ + end=+\s+re=e-1 contains=muttrcRXString syn match muttrcSimplePatMetas contained /[(|)]/ syn match muttrcOptSimplePat contained skipwhite /[~=%!(^].*/ contains=muttrcSimplePat,muttrcSimplePatMetas syn match muttrcOptSimplePat contained skipwhite /[^~=%!(^].*/ contains=muttrcRXString syn region muttrcOptPattern contained matchgroup=Type keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcOptSimplePat,muttrcUnHighlightSpace nextgroup=muttrcString,muttrcStringNL syn region muttrcOptPattern contained matchgroup=Type keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcOptSimplePat,muttrcUnHighlightSpace nextgroup=muttrcString,muttrcStringNL syn region muttrcOptPattern contained keepend skipwhite start=+[~](+ end=+)+ skip=+\\)+ contains=muttrcSimplePat nextgroup=muttrcString,muttrcStringNL syn match muttrcOptPattern contained skipwhite /[~][A-Za-z]/ contains=muttrcSimplePat nextgroup=muttrcString,muttrcStringNL syn match muttrcOptPattern contained skipwhite /[.]/ nextgroup=muttrcString,muttrcStringNL " Keep muttrcPattern and muttrcOptPattern synchronized syn region muttrcPattern contained matchgroup=Type keepend skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas syn region muttrcPattern contained matchgroup=Type keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas syn region muttrcPattern contained keepend skipwhite start=+[~](+ end=+)+ skip=+\\)+ contains=muttrcSimplePat syn match muttrcPattern contained skipwhite /[~][A-Za-z]/ contains=muttrcSimplePat syn match muttrcPattern contained skipwhite /[.]/ syn region muttrcPatternInner contained keepend start=+"[~=%!(^]+ms=s+1 skip=+\\"+ end=+"+me=e-1 contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas syn region muttrcPatternInner contained keepend start=+'[~=%!(^]+ms=s+1 skip=+\\'+ end=+'+me=e-1 contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas " Colour definitions takes object, foreground and background arguments (regexps excluded). syn match muttrcColorMatchCount contained "[0-9]\+" syn match muttrcColorMatchCountNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL syn region muttrcColorRXPat contained start=+\s*'+ skip=+\\'+ end=+'\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL syn region muttrcColorRXPat contained start=+\s*"+ skip=+\\"+ end=+"\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL syn keyword muttrcColorField contained attachment body bold error hdrdefault header index indicator markers message normal quoted search signature status tilde tree underline syn match muttrcColorField contained "\<quoted\d\=\>" if use_mutt_sidebar == 1 syn keyword muttrcColorField contained sidebar_new endif syn keyword muttrcColor contained black blue cyan default green magenta red white yellow syn keyword muttrcColor contained brightblack brightblue brightcyan brightdefault brightgreen brightmagenta brightred brightwhite brightyellow syn match muttrcColor contained "\<\%(bright\)\=color\d\{1,3}\>" " Now for the structure of the color line syn match muttrcColorRXNL contained skipnl "\s*\\$" nextgroup=muttrcColorRXPat,muttrcColorRXNL syn match muttrcColorBG contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorRXPat,muttrcColorRXNL syn match muttrcColorBGNL contained skipnl "\s*\\$" nextgroup=muttrcColorBG,muttrcColorBGNL syn match muttrcColorFG contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorBG,muttrcColorBGNL syn match muttrcColorFGNL contained skipnl "\s*\\$" nextgroup=muttrcColorFG,muttrcColorFGNL syn match muttrcColorContext contained /\s*[$]\?\w\+/ contains=muttrcColorField,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorFG,muttrcColorFGNL syn match muttrcColorNL contained skipnl "\s*\\$" nextgroup=muttrcColorContext,muttrcColorNL syn match muttrcColorKeyword contained /^\s*color\s\+/ nextgroup=muttrcColorContext,muttrcColorNL syn region muttrcColorLine keepend start=/^\s*color\s\+\%(index\|header\)\@!/ skip=+\\$+ end=+$+ contains=muttrcColorKeyword,muttrcComment,muttrcUnHighlightSpace " Now for the structure of the color index line syn match muttrcPatternNL contained skipnl "\s*\\$" nextgroup=muttrcPattern,muttrcPatternNL syn match muttrcColorBGI contained /\s*[$]\?\w\+\s*/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcPattern,muttrcPatternNL syn match muttrcColorBGNLI contained skipnl "\s*\\$" nextgroup=muttrcColorBGI,muttrcColorBGNLI syn match muttrcColorFGI contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorBGI,muttrcColorBGNLI syn match muttrcColorFGNLI contained skipnl "\s*\\$" nextgroup=muttrcColorFGI,muttrcColorFGNLI syn match muttrcColorContextI contained /\s*\<index\>/ contains=muttrcUnHighlightSpace nextgroup=muttrcColorFGI,muttrcColorFGNLI syn match muttrcColorNLI contained skipnl "\s*\\$" nextgroup=muttrcColorContextI,muttrcColorNLI syn match muttrcColorKeywordI contained skipwhite /\<color\>/ nextgroup=muttrcColorContextI,muttrcColorNLI syn region muttrcColorLine keepend skipwhite start=/\<color\s\+index\>/ skip=+\\$+ end=+$+ contains=muttrcColorKeywordI,muttrcComment,muttrcUnHighlightSpace " Now for the structure of the color header line syn match muttrcRXPatternNL contained skipnl "\s*\\$" nextgroup=muttrcRXString,muttrcRXPatternNL syn match muttrcColorBGH contained /\s*[$]\?\w\+\s*/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcRXString,muttrcRXPatternNL syn match muttrcColorBGNLH contained skipnl "\s*\\$" nextgroup=muttrcColorBGH,muttrcColorBGNLH syn match muttrcColorFGH contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorBGH,muttrcColorBGNLH syn match muttrcColorFGNLH contained skipnl "\s*\\$" nextgroup=muttrcColorFGH,muttrcColorFGNLH syn match muttrcColorContextH contained /\s*\<header\>/ contains=muttrcUnHighlightSpace nextgroup=muttrcColorFGH,muttrcColorFGNLH syn match muttrcColorNLH contained skipnl "\s*\\$" nextgroup=muttrcColorContextH,muttrcColorNLH syn match muttrcColorKeywordH contained skipwhite /\<color\>/ nextgroup=muttrcColorContextH,muttrcColorNLH syn region muttrcColorLine keepend skipwhite start=/\<color\s\+header\>/ skip=+\\$+ end=+$+ contains=muttrcColorKeywordH,muttrcComment,muttrcUnHighlightSpace " And now color's brother: syn region muttrcUnColorPatterns contained skipwhite start=+\s*'+ end=+'+ skip=+\\'+ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL syn region muttrcUnColorPatterns contained skipwhite start=+\s*"+ end=+"+ skip=+\\"+ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL syn match muttrcUnColorPatterns contained skipwhite /\s*[^'"\s]\S\*/ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL syn match muttrcUnColorPatNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL syn match muttrcUnColorAll contained skipwhite /[*]/ syn match muttrcUnColorAPNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorPatterns,muttrcUnColorAll,muttrcUnColorAPNL syn match muttrcUnColorIndex contained skipwhite /\s*index\s\+/ nextgroup=muttrcUnColorPatterns,muttrcUnColorAll,muttrcUnColorAPNL syn match muttrcUnColorIndexNL contained skipwhite skipnl /\s*\\$/ nextgroup=muttrcUnColorIndex,muttrcUnColorIndexNL syn match muttrcUnColorKeyword contained skipwhite /^\s*uncolor\s\+/ nextgroup=muttrcUnColorIndex,muttrcUnColorIndexNL syn region muttrcUnColorLine keepend start=+^\s*uncolor\s+ skip=+\\$+ end=+$+ contains=muttrcUnColorKeyword,muttrcComment,muttrcUnHighlightSpace " Mono are almost like color (ojects inherited from color) syn keyword muttrcMonoAttrib contained bold none normal reverse standout underline syn keyword muttrcMono contained mono skipwhite nextgroup=muttrcColorField syn match muttrcMonoLine "^\s*mono\s\+\S\+" skipwhite nextgroup=muttrcMonoAttrib contains=muttrcMono " 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_muttrc_syntax_inits") if version < 508 let did_muttrc_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink muttrcComment Comment HiLink muttrcEscape SpecialChar HiLink muttrcRXChars SpecialChar HiLink muttrcString String HiLink muttrcRXString String HiLink muttrcRXString2 String HiLink muttrcSpecial Special HiLink muttrcHooks Type HiLink muttrcGroupFlag Type HiLink muttrcGroupDef Macro HiLink muttrcAddrDef muttrcGroupFlag HiLink muttrcRXDef muttrcGroupFlag HiLink muttrcRXPat String HiLink muttrcAliasGroupName Macro HiLink muttrcAliasKey Identifier HiLink muttrcUnAliasKey Identifier HiLink muttrcAliasEncEmail Identifier HiLink muttrcAliasParens Type HiLink muttrcSetNumAssignment Number HiLink muttrcSetBoolAssignment Boolean HiLink muttrcSetQuadAssignment Boolean HiLink muttrcSetStrAssignment String HiLink muttrcEmail Special HiLink muttrcVariableInner Special HiLink muttrcEscapedVariable String HiLink muttrcHeader Type HiLink muttrcKeySpecial SpecialChar HiLink muttrcKey Type HiLink muttrcKeyName SpecialChar HiLink muttrcVarBool Identifier HiLink muttrcVarQuad Identifier HiLink muttrcVarNum Identifier HiLink muttrcVarStr Identifier HiLink muttrcMenu Identifier HiLink muttrcCommand Keyword HiLink muttrcMacroDescr String HiLink muttrcAction Macro HiLink muttrcBadAction Error HiLink muttrcBindFunction Error HiLink muttrcBindMenuList Error HiLink muttrcFunction Macro HiLink muttrcGroupKeyword muttrcCommand HiLink muttrcGroupLine Error HiLink muttrcSubscribeKeyword muttrcCommand HiLink muttrcSubscribeLine Error HiLink muttrcListsKeyword muttrcCommand HiLink muttrcListsLine Error HiLink muttrcAlternateKeyword muttrcCommand HiLink muttrcAlternatesLine Error HiLink muttrcAttachmentsLine muttrcCommand HiLink muttrcAttachmentsFlag Type HiLink muttrcAttachmentsMimeType String HiLink muttrcColorLine Error HiLink muttrcColorContext Error HiLink muttrcColorContextI Identifier HiLink muttrcColorContextH Identifier HiLink muttrcColorKeyword muttrcCommand HiLink muttrcColorKeywordI muttrcColorKeyword HiLink muttrcColorKeywordH muttrcColorKeyword HiLink muttrcColorField Identifier HiLink muttrcColor Type HiLink muttrcColorFG Error HiLink muttrcColorFGI Error HiLink muttrcColorFGH Error HiLink muttrcColorBG Error HiLink muttrcColorBGI Error HiLink muttrcColorBGH Error HiLink muttrcMonoAttrib muttrcColor HiLink muttrcMono muttrcCommand HiLink muttrcSimplePat Identifier HiLink muttrcSimplePatString Macro HiLink muttrcSimplePatMetas Special HiLink muttrcPattern Error HiLink muttrcUnColorLine Error HiLink muttrcUnColorKeyword muttrcCommand HiLink muttrcUnColorIndex Identifier HiLink muttrcShellString muttrcEscape HiLink muttrcRXHooks muttrcCommand HiLink muttrcRXHookNot Type HiLink muttrcPatHooks muttrcCommand HiLink muttrcPatHookNot Type HiLink muttrcFormatConditionals2 Type HiLink muttrcIndexFormatStr muttrcString HiLink muttrcIndexFormatEscapes muttrcEscape HiLink muttrcIndexFormatConditionals muttrcFormatConditionals2 HiLink muttrcAliasFormatStr muttrcString HiLink muttrcAliasFormatEscapes muttrcEscape HiLink muttrcAttachFormatStr muttrcString HiLink muttrcAttachFormatEscapes muttrcEscape HiLink muttrcAttachFormatConditionals muttrcFormatConditionals2 HiLink muttrcComposeFormatStr muttrcString HiLink muttrcComposeFormatEscapes muttrcEscape HiLink muttrcFolderFormatStr muttrcString HiLink muttrcFolderFormatEscapes muttrcEscape HiLink muttrcFolderFormatConditionals muttrcFormatConditionals2 HiLink muttrcMixFormatStr muttrcString HiLink muttrcMixFormatEscapes muttrcEscape HiLink muttrcMixFormatConditionals muttrcFormatConditionals2 HiLink muttrcPGPFormatStr muttrcString HiLink muttrcPGPFormatEscapes muttrcEscape HiLink muttrcPGPFormatConditionals muttrcFormatConditionals2 HiLink muttrcPGPCmdFormatStr muttrcString HiLink muttrcPGPCmdFormatEscapes muttrcEscape HiLink muttrcPGPCmdFormatConditionals muttrcFormatConditionals2 HiLink muttrcStatusFormatStr muttrcString HiLink muttrcStatusFormatEscapes muttrcEscape HiLink muttrcStatusFormatConditionals muttrcFormatConditionals2 HiLink muttrcPGPGetKeysFormatStr muttrcString HiLink muttrcPGPGetKeysFormatEscapes muttrcEscape HiLink muttrcSmimeFormatStr muttrcString HiLink muttrcSmimeFormatEscapes muttrcEscape HiLink muttrcSmimeFormatConditionals muttrcFormatConditionals2 HiLink muttrcTimeEscapes muttrcEscape HiLink muttrcPGPTimeEscapes muttrcEscape HiLink muttrcStrftimeEscapes Type HiLink muttrcStrftimeFormatStr muttrcString HiLink muttrcFormatErrors Error HiLink muttrcBindFunctionNL SpecialChar HiLink muttrcBindKeyNL SpecialChar HiLink muttrcBindMenuListNL SpecialChar HiLink muttrcMacroDescrNL SpecialChar HiLink muttrcMacroBodyNL SpecialChar HiLink muttrcMacroKeyNL SpecialChar HiLink muttrcMacroMenuListNL SpecialChar HiLink muttrcColorMatchCountNL SpecialChar HiLink muttrcColorNL SpecialChar HiLink muttrcColorRXNL SpecialChar HiLink muttrcColorBGNL SpecialChar HiLink muttrcColorFGNL SpecialChar HiLink muttrcAliasNameNL SpecialChar HiLink muttrcAliasENNL SpecialChar HiLink muttrcAliasNL SpecialChar HiLink muttrcUnAliasNL SpecialChar HiLink muttrcAliasGroupDefNL SpecialChar HiLink muttrcAliasEncEmailNL SpecialChar HiLink muttrcPatternNL SpecialChar HiLink muttrcUnColorPatNL SpecialChar HiLink muttrcUnColorAPNL SpecialChar HiLink muttrcUnColorIndexNL SpecialChar HiLink muttrcStringNL SpecialChar delcommand HiLink endif let b:current_syntax = "muttrc" let &cpo = s:cpo_save unlet s:cpo_save "EOF vim: ts=8 noet tw=100 sw=8 sts=0 ft=vim
zyz2011-vim
runtime/syntax/muttrc.vim
Vim Script
gpl2
81,075
" Vim syntax file " Language: Zsh shell script " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2010-01-23 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim setlocal iskeyword+=- syn keyword zshTodo contained TODO FIXME XXX NOTE syn region zshComment oneline start='\%(^\|\s\)#' end='$' \ contains=zshTodo,@Spell 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 keyword zshDelimiter do done syn keyword zshConditional if then elif else fi case in esac select syn keyword zshRepeat while until repeat syn keyword zshRepeat for foreach nextgroup=zshVariable skipwhite syn keyword zshException always syn keyword zshKeyword function nextgroup=zshKSHFunction skipwhite 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='^\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*' contained syn match zshVariableDef '\<\h\w*\ze+\==' " XXX: how safe is this? syn region zshVariableDef 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 contains=NONE '\$[=^~]*[#+]*\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\+\>' " TODO: $[...] is the same as $((...)), so add that as well. 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,zshString syn region zshOldSubst matchgroup=zshSubstDelim start=+`+ skip=+\\`+ \ end=+`+ contains=TOP,zshOldSubst syn sync minlines=50 syn sync match zshHereDocSync grouphere NONE '<<-\=\s*\%(\\\=\S\+\|\(["']\)\S\+\1\)' syn sync match zshHereDocEndSync groupthere NONE '^\s*EO\a\+\>' 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 zshVariableDef zshVariable 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" let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/syntax/zsh.vim
Vim Script
gpl2
8,923
" Vim syntax file " Language: bc - An arbitrary precision calculator language " Maintainer: Vladimir Scholtz <vlado@gjh.sk> " Last change: 2012 Jun 01 " (Dominique Pelle added @Spell) " Available on: www.gjh.sk/~vlado/bc.vim " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif syn case ignore " Keywords syn keyword bcKeyword if else while for break continue return limits halt quit syn keyword bcKeyword define syn keyword bcKeyword length read sqrt print " Variable syn keyword bcType auto " Constant syn keyword bcConstant scale ibase obase last syn keyword bcConstant BC_BASE_MAX BC_DIM_MAX BC_SCALE_MAX BC_STRING_MAX syn keyword bcConstant BC_ENV_ARGS BC_LINE_LENGTH " Any other stuff syn match bcIdentifier "[a-z_][a-z0-9_]*" " String syn match bcString "\"[^"]*\"" contains=@Spell " Number syn match bcNumber "[0-9]\+" " Comment syn match bcComment "\#.*" contains=@Spell syn region bcComment start="/\*" end="\*/" contains=@Spell " Parent () syn cluster bcAll contains=bcList,bcIdentifier,bcNumber,bcKeyword,bcType,bcConstant,bcString,bcParentError syn region bcList matchgroup=Delimiter start="(" skip="|.\{-}|" matchgroup=Delimiter end=")" contains=@bcAll syn region bcList matchgroup=Delimiter start="\[" skip="|.\{-}|" matchgroup=Delimiter end="\]" contains=@bcAll syn match bcParenError "]" syn match bcParenError ")" syn case match " 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_bc_syntax_inits") if version < 508 let did_bc_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink bcKeyword Statement HiLink bcType Type HiLink bcConstant Constant HiLink bcNumber Number HiLink bcComment Comment HiLink bcString String HiLink bcSpecialChar SpecialChar HiLink bcParenError Error delcommand HiLink endif let b:current_syntax = "bc" " vim: ts=8
zyz2011-vim
runtime/syntax/bc.vim
Vim Script
gpl2
2,181
" Description : Vim syntax file for mrxvtrc (for mrxvt-0.5.0 and up) " Created : Wed 26 Apr 2006 01:20:53 AM CDT " Modified : Thu 02 Feb 2012 08:37:45 PM EST " Maintainer : GI <a@b.c>, where a='gi1242+vim', b='gmail', c='com' " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn case match " Errors syn match mrxvtrcError contained '\v\S+' " Comments syn match mrxvtrcComment contains=@Spell '^\s*[!#].*$' syn match mrxvtrcComment '\v^\s*[#!]\s*\w+[.*]\w+.*:.*' " " Options. " 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 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 \ pointerBlank cursorBlink noSysConfig \ disableMacros linuxHomeEndKey sessionMgt \ boldColors smoothResize useFifo veryBright syn match mrxvtrcOptions contained nextgroup=mrxvtrcBColon,mrxvtrcError \ '\v<transparent>' syn match mrxvtrcBColon contained skipwhite \ nextgroup=mrxvtrcBoolVal,mrxvtrcError ':' syn case ignore syn keyword mrxvtrcBoolVal contained skipwhite nextgroup=mrxvtrcError \ 0 1 yes no on off true false syn case match " 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}' " Numeric options syn keyword mrxvtrcOptions contained nextgroup=mrxvtrcNColon,mrxvtrcError \ maxTabWidth minVisibleTabs \ scrollbarThickness xftmSize xftSize desktop \ externalBorder internalBorder lineSpace \ pointerBlankDelay cursorBlinkInterval \ shading backgroundFade bgRefreshInterval \ fading 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]+)>' " 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 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 \ winTitleFormat 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 " greek_keyboard syn match mrxvtrcOptions contained skipwhite \ nextgroup=mrxvtrcGrkKbd,mrxvtrcError \ '\v<greek_keyboard:' syn keyword mrxvtrcGrkKbd contained skipwhite nextgroup=mrxvtrcError \ iso ibm " xftWeight syn match mrxvtrcOptions contained skipwhite \ nextgroup=mrxvtrcXftWt,mrxvtrcError \ '\v<(xftWeight|xftBoldWeight):' syn keyword mrxvtrcXftWt contained skipwhite nextgroup=mrxvtrcError \ light medium demibold bold black " xftSlant syn match mrxvtrcOptions contained skipwhite \ nextgroup=mrxvtrcXftSl,mrxvtrcError \ '\v<xftSlant:' syn keyword mrxvtrcXftSl contained skipwhite nextgroup=mrxvtrcError \ roman italic oblique " xftWidth syn match mrxvtrcOptions contained skipwhite \ nextgroup=mrxvtrcXftWd,mrxvtrcError \ '\v<xftWidth:' syn keyword mrxvtrcXftWd contained skipwhite nextgroup=mrxvtrcError \ ultracondensed ultraexpanded \ condensed expanded normal " xftRGBA syn match mrxvtrcOptions contained skipwhite \ nextgroup=mrxvtrcXftHt,mrxvtrcError \ '\v<xftRGBA:' syn keyword mrxvtrcXftHt contained skipwhite nextgroup=mrxvtrcError \ rgb bgr vrgb vbgr none " preeditType syn match mrxvtrcOptions contained skipwhite \ nextgroup=mrxvtrcPedit,mrxvtrcError \ '\v<preeditType:' syn keyword mrxvtrcPedit contained skipwhite nextgroup=mrxvtrcError \ OverTheSpot OffTheSpot Root " 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 " selectStyle syn match mrxvtrcOptions contained skipwhite \ nextgroup=mrxvtrcSelSty,mrxvtrcError \ '\v<selectStyle:' syn keyword mrxvtrcSelSty contained skipwhite nextgroup=mrxvtrcError \ old oldword " " Macros " 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 Raise " 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 UseFifo " 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 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 hi def link mrxvtrcColorVal Constant hi def link mrxvtrcNumVal Number hi def link mrxvtrcSBstyle mrxvtrcStrVal hi def link mrxvtrcSBalign mrxvtrcStrVal hi def link mrxvtrcTSmode mrxvtrcStrVal hi def link mrxvtrcGrkKbd mrxvtrcStrVal hi def link mrxvtrcXftWt mrxvtrcStrVal hi def link mrxvtrcXftSl mrxvtrcStrVal hi def link mrxvtrcXftWd mrxvtrcStrVal hi def link mrxvtrcXftHt mrxvtrcStrVal hi def link mrxvtrcPedit mrxvtrcStrVal hi def link mrxvtrcMod mrxvtrcStrVal hi def link mrxvtrcSelSty mrxvtrcStrVal hi def link mrxvtrcMacro Identifier 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" let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/syntax/mrxvtrc.vim
Vim Script
gpl2
9,603
" Vim syntax file " Language: RCS log output " Maintainer: Joe Karthauser <joe@freebsd.org> " Last Change: 2001 May 09 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif syn match rcslogRevision "^revision.*$" syn match rcslogFile "^RCS file:.*" syn match rcslogDate "^date: .*$" " 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_rcslog_syntax_inits") if version < 508 let did_rcslog_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink rcslogFile Type HiLink rcslogRevision Constant HiLink rcslogDate Identifier delcommand HiLink endif let b:current_syntax = "rcslog" " vim: ts=8
zyz2011-vim
runtime/syntax/rcslog.vim
Vim Script
gpl2
970
" Vim syntax file " Language: DocBook " Maintainer: Devin Weaver <vim@tritarget.com> " URL: http://tritarget.com/pub/vim/syntax/docbk.vim " Last Change: $Date: 2005/06/23 22:31:01 $ " Version: $Revision: 1.2 $ " Thanks to Johannes Zellner <johannes@zellner.org> for the default to XML " suggestion. " REFERENCES: " http://docbook.org/ " http://www.open-oasis.org/docbook/ " " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif " Auto detect added by Bram Moolenaar if !exists('b:docbk_type') if expand('%:e') == "sgml" let b:docbk_type = 'sgml' else let b:docbk_type = 'xml' endif endif if 'xml' == b:docbk_type doau Syntax xml syn cluster xmlTagHook add=docbkKeyword syn cluster xmlRegionHook add=docbkRegion,docbkTitle,docbkRemark,docbkCite syn case match elseif 'sgml' == b:docbk_type doau Syntax sgml syn cluster sgmlTagHook add=docbkKeyword syn cluster sgmlRegionHook add=docbkRegion,docbkTitle,docbkRemark,docbkCite syn case ignore endif " <comment> has been removed and replace with <remark> in DocBook 4.0 " <comment> kept for backwards compatability. syn keyword docbkKeyword abbrev abstract accel ackno acronym action contained syn keyword docbkKeyword address affiliation alt anchor answer appendix contained syn keyword docbkKeyword application area areaset areaspec arg artheader contained syn keyword docbkKeyword article articleinfo artpagenums attribution audiodata contained syn keyword docbkKeyword audioobject author authorblurb authorgroup contained syn keyword docbkKeyword authorinitials beginpage bibliodiv biblioentry contained syn keyword docbkKeyword bibliography bibliomisc bibliomixed bibliomset contained syn keyword docbkKeyword biblioset blockquote book bookbiblio bookinfo contained syn keyword docbkKeyword bridgehead callout calloutlist caption caution contained syn keyword docbkKeyword chapter citation citerefentry citetitle city contained syn keyword docbkKeyword classname cmdsynopsis co collab collabname contained syn keyword docbkKeyword colophon colspec command comment computeroutput contained syn keyword docbkKeyword confdates confgroup confnum confsponsor conftitle contained syn keyword docbkKeyword constant contractnum contractsponsor contrib contained syn keyword docbkKeyword copyright corpauthor corpname country database contained syn keyword docbkKeyword date dedication docinfo edition editor email contained syn keyword docbkKeyword emphasis entry entrytbl envar epigraph equation contained syn keyword docbkKeyword errorcode errorname errortype example fax figure contained syn keyword docbkKeyword filename firstname firstterm footnote footnoteref contained syn keyword docbkKeyword foreignphrase formalpara funcdef funcparams contained syn keyword docbkKeyword funcprototype funcsynopsis funcsynopsisinfo contained syn keyword docbkKeyword function glossary glossdef glossdiv glossentry contained syn keyword docbkKeyword glosslist glosssee glossseealso glossterm graphic contained syn keyword docbkKeyword graphicco group guibutton guiicon guilabel contained syn keyword docbkKeyword guimenu guimenuitem guisubmenu hardware contained syn keyword docbkKeyword highlights holder honorific imagedata imageobject contained syn keyword docbkKeyword imageobjectco important index indexdiv indexentry contained syn keyword docbkKeyword indexterm informalequation informalexample contained syn keyword docbkKeyword informalfigure informaltable inlineequation contained syn keyword docbkKeyword inlinegraphic inlinemediaobject interface contained syn keyword docbkKeyword interfacedefinition invpartnumber isbn issn contained syn keyword docbkKeyword issuenum itemizedlist itermset jobtitle keycap contained syn keyword docbkKeyword keycode keycombo keysym keyword keywordset label contained syn keyword docbkKeyword legalnotice lineage lineannotation link listitem contained syn keyword docbkKeyword literal literallayout lot lotentry manvolnum contained syn keyword docbkKeyword markup medialabel mediaobject mediaobjectco contained syn keyword docbkKeyword member menuchoice modespec mousebutton msg msgaud contained syn keyword docbkKeyword msgentry msgexplan msginfo msglevel msgmain contained syn keyword docbkKeyword msgorig msgrel msgset msgsub msgtext note contained syn keyword docbkKeyword objectinfo olink option optional orderedlist contained syn keyword docbkKeyword orgdiv orgname otheraddr othercredit othername contained syn keyword docbkKeyword pagenums para paramdef parameter part partintro contained syn keyword docbkKeyword phone phrase pob postcode preface primary contained syn keyword docbkKeyword primaryie printhistory procedure productname contained syn keyword docbkKeyword productnumber programlisting programlistingco contained syn keyword docbkKeyword prompt property pubdate publisher publishername contained syn keyword docbkKeyword pubsnumber qandadiv qandaentry qandaset question contained syn keyword docbkKeyword quote refclass refdescriptor refentry contained syn keyword docbkKeyword refentrytitle reference refmeta refmiscinfo contained syn keyword docbkKeyword refname refnamediv refpurpose refsect1 contained syn keyword docbkKeyword refsect1info refsect2 refsect2info refsect3 contained syn keyword docbkKeyword refsect3info refsynopsisdiv refsynopsisdivinfo contained syn keyword docbkKeyword releaseinfo remark replaceable returnvalue revhistory contained syn keyword docbkKeyword revision revnumber revremark row sbr screen contained syn keyword docbkKeyword screenco screeninfo screenshot secondary contained syn keyword docbkKeyword secondaryie sect1 sect1info sect2 sect2info sect3 contained syn keyword docbkKeyword sect3info sect4 sect4info sect5 sect5info section contained syn keyword docbkKeyword sectioninfo see seealso seealsoie seeie seg contained syn keyword docbkKeyword seglistitem segmentedlist segtitle seriesinfo contained syn keyword docbkKeyword seriesvolnums set setindex setinfo sgmltag contained syn keyword docbkKeyword shortaffil shortcut sidebar simpara simplelist contained syn keyword docbkKeyword simplesect spanspec state step street structfield contained syn keyword docbkKeyword structname subject subjectset subjectterm contained syn keyword docbkKeyword subscript substeps subtitle superscript surname contained syn keyword docbkKeyword symbol synopfragment synopfragmentref synopsis contained syn keyword docbkKeyword systemitem table tbody term tertiary tertiaryie contained syn keyword docbkKeyword textobject tfoot tgroup thead tip title contained syn keyword docbkKeyword titleabbrev toc tocback tocchap tocentry tocfront contained syn keyword docbkKeyword toclevel1 toclevel2 toclevel3 toclevel4 toclevel5 contained syn keyword docbkKeyword tocpart token trademark type ulink userinput contained syn keyword docbkKeyword varargs variablelist varlistentry varname contained syn keyword docbkKeyword videodata videoobject void volumenum warning contained syn keyword docbkKeyword wordasword xref year contained " Add special emphasis on some regions. Thanks to Rory Hunter <roryh@dcs.ed.ac.uk> for these ideas. syn region docbkRegion start="<emphasis>"lc=10 end="</emphasis>"me=e-11 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend syn region docbkTitle start="<title>"lc=7 end="</title>"me=e-8 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend syn region docbkRemark start="<remark>"lc=8 end="</remark>"me=e-9 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend syn region docbkRemark start="<comment>"lc=9 end="</comment>"me=e-10 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend syn region docbkCite start="<citation>"lc=10 end="</citation>"me=e-11 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend " 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_docbk_syn_inits") if version < 508 let did_docbk_syn_inits = 1 command -nargs=+ HiLink hi link <args> hi DocbkBold term=bold cterm=bold gui=bold else command -nargs=+ HiLink hi def link <args> hi def DocbkBold term=bold cterm=bold gui=bold endif HiLink docbkKeyword Statement HiLink docbkRegion DocbkBold HiLink docbkTitle Title HiLink docbkRemark Comment HiLink docbkCite Constant delcommand HiLink endif let b:current_syntax = "docbk" " vim: ts=8
zyz2011-vim
runtime/syntax/docbk.vim
Vim Script
gpl2
8,577
" Vim syntax file " Language: fetchmail(1) RC File " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword fetchmailTodo contained FIXME TODO XXX NOTE syn region fetchmailComment start='#' end='$' contains=fetchmailTodo,@Spell syn match fetchmailNumber display '\<\d\+\>' syn region fetchmailString start=+"+ skip=+\\\\\|\\"+ end=+"+ \ contains=fetchmailStringEsc syn region fetchmailString start=+'+ skip=+\\\\\|\\'+ end=+'+ \ contains=fetchmailStringEsc syn match fetchmailStringEsc contained '\\\([ntb]\|0\d*\|x\x\+\)' syn region fetchmailKeyword transparent matchgroup=fetchmailKeyword \ start='\<poll\|skip\|defaults\>' \ end='\<poll\|skip\|defaults\>' \ contains=ALLBUT,fetchmailOptions,fetchmailSet syn keyword fetchmailServerOpts contained via proto[col] local[domains] port \ auth[enticate] timeout envelope qvirtual aka \ interface monitor plugin plugout dns \ checkalias uidl interval netsec principal \ esmtpname esmtppassword \ sslcertck sslcertpath sslfingerprint syn match fetchmailServerOpts contained '\<no\_s\+\(envelope\|dns\|checkalias\|uidl\)' syn keyword fetchmailUserOpts contained user[name] is to pass[word] ssl \ sslcert sslkey sslproto folder smtphost \ fetchdomains smtpaddress smtpname antispam \ mda bsmtp preconnect postconnect keep flush \ fetchall rewrite stripcr forcecr pass8bits \ dropstatus dropdelivered mimedecode idle \ limit warnings batchlimit fetchlimit expunge \ tracepolls properties syn match fetchmailUserOpts contained '\<no\_s\+\(keep\|flush\|fetchall\|rewrite\|stripcr\|forcecr\|pass8bits\|dropstatus\|dropdelivered\|mimedecode\|noidle\)' syn keyword fetchmailSpecial contained here there syn keyword fetchmailNoise and with has wants options syn match fetchmailNoise display '[:;,]' syn keyword fetchmailSet nextgroup=fetchmailOptions skipwhite skipnl set syn keyword fetchmailOptions daemon postmaster bouncemail spambounce logfile \ idfile syslog nosyslog properties syn match fetchmailOptions '\<no\_s\+\(bouncemail\|spambounce\)' hi def link fetchmailComment Comment hi def link fetchmailTodo Todo hi def link fetchmailNumber Number hi def link fetchmailString String hi def link fetchmailStringEsc SpecialChar hi def link fetchmailKeyword Keyword hi def link fetchmailServerOpts Identifier hi def link fetchmailUserOpts Identifier hi def link fetchmailSpecial Special hi def link fetchmailSet Keyword hi def link fetchmailOptions Identifier let b:current_syntax = "fetchmail" let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/syntax/fetchmail.vim
Vim Script
gpl2
3,296
" Vim syntax file " Language: SKILL " Maintainer: Toby Schaffer <jtschaff@eos.ncsu.edu> " Last Change: 2003 May 11 " Comments: SKILL is a Lisp-like programming language for use in EDA " tools from Cadence Design Systems. It allows you to have " a programming environment within the Cadence environment " that gives you access to the complete tool set and design " database. This file also defines syntax highlighting for " certain Design Framework II interface functions. " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif syn keyword skillConstants t nil unbound " enumerate all the SKILL reserved words/functions syn match skillFunction "(abs\>"hs=s+1 syn match skillFunction "\<abs("he=e-1 syn match skillFunction "(a\=cos\>"hs=s+1 syn match skillFunction "\<a\=cos("he=e-1 syn match skillFunction "(add1\>"hs=s+1 syn match skillFunction "\<add1("he=e-1 syn match skillFunction "(addDefstructClass\>"hs=s+1 syn match skillFunction "\<addDefstructClass("he=e-1 syn match skillFunction "(alias\>"hs=s+1 syn match skillFunction "\<alias("he=e-1 syn match skillFunction "(alphalessp\>"hs=s+1 syn match skillFunction "\<alphalessp("he=e-1 syn match skillFunction "(alphaNumCmp\>"hs=s+1 syn match skillFunction "\<alphaNumCmp("he=e-1 syn match skillFunction "(append1\=\>"hs=s+1 syn match skillFunction "\<append1\=("he=e-1 syn match skillFunction "(apply\>"hs=s+1 syn match skillFunction "\<apply("he=e-1 syn match skillFunction "(arrayp\>"hs=s+1 syn match skillFunction "\<arrayp("he=e-1 syn match skillFunction "(arrayref\>"hs=s+1 syn match skillFunction "\<arrayref("he=e-1 syn match skillFunction "(a\=sin\>"hs=s+1 syn match skillFunction "\<a\=sin("he=e-1 syn match skillFunction "(assoc\>"hs=s+1 syn match skillFunction "\<assoc("he=e-1 syn match skillFunction "(ass[qv]\>"hs=s+1 syn match skillFunction "\<ass[qv]("he=e-1 syn match skillFunction "(a\=tan\>"hs=s+1 syn match skillFunction "\<a\=tan("he=e-1 syn match skillFunction "(ato[fim]\>"hs=s+1 syn match skillFunction "\<ato[fim]("he=e-1 syn match skillFunction "(bcdp\>"hs=s+1 syn match skillFunction "\<bcdp("he=e-1 syn match skillKeywords "(begin\>"hs=s+1 syn match skillKeywords "\<begin("he=e-1 syn match skillFunction "(booleanp\>"hs=s+1 syn match skillFunction "\<booleanp("he=e-1 syn match skillFunction "(boundp\>"hs=s+1 syn match skillFunction "\<boundp("he=e-1 syn match skillFunction "(buildString\>"hs=s+1 syn match skillFunction "\<buildString("he=e-1 syn match skillFunction "(c[ad]{1,3}r\>"hs=s+1 syn match skillFunction "\<c[ad]{1,3}r("he=e-1 syn match skillConditional "(caseq\=\>"hs=s+1 syn match skillConditional "\<caseq\=("he=e-1 syn match skillFunction "(ceiling\>"hs=s+1 syn match skillFunction "\<ceiling("he=e-1 syn match skillFunction "(changeWorkingDir\>"hs=s+1 syn match skillFunction "\<changeWorkingDir("he=e-1 syn match skillFunction "(charToInt\>"hs=s+1 syn match skillFunction "\<charToInt("he=e-1 syn match skillFunction "(clearExitProcs\>"hs=s+1 syn match skillFunction "\<clearExitProcs("he=e-1 syn match skillFunction "(close\>"hs=s+1 syn match skillFunction "\<close("he=e-1 syn match skillFunction "(compareTime\>"hs=s+1 syn match skillFunction "\<compareTime("he=e-1 syn match skillFunction "(compress\>"hs=s+1 syn match skillFunction "\<compress("he=e-1 syn match skillFunction "(concat\>"hs=s+1 syn match skillFunction "\<concat("he=e-1 syn match skillConditional "(cond\>"hs=s+1 syn match skillConditional "\<cond("he=e-1 syn match skillFunction "(cons\>"hs=s+1 syn match skillFunction "\<cons("he=e-1 syn match skillFunction "(copy\>"hs=s+1 syn match skillFunction "\<copy("he=e-1 syn match skillFunction "(copyDefstructDeep\>"hs=s+1 syn match skillFunction "\<copyDefstructDeep("he=e-1 syn match skillFunction "(createDir\>"hs=s+1 syn match skillFunction "\<createDir("he=e-1 syn match skillFunction "(csh\>"hs=s+1 syn match skillFunction "\<csh("he=e-1 syn match skillKeywords "(declare\>"hs=s+1 syn match skillKeywords "\<declare("he=e-1 syn match skillKeywords "(declare\(N\|SQN\)\=Lambda\>"hs=s+1 syn match skillKeywords "\<declare\(N\|SQN\)\=Lambda("he=e-1 syn match skillKeywords "(defmacro\>"hs=s+1 syn match skillKeywords "\<defmacro("he=e-1 syn match skillKeywords "(defprop\>"hs=s+1 syn match skillKeywords "\<defprop("he=e-1 syn match skillKeywords "(defstruct\>"hs=s+1 syn match skillKeywords "\<defstruct("he=e-1 syn match skillFunction "(defstructp\>"hs=s+1 syn match skillFunction "\<defstructp("he=e-1 syn match skillKeywords "(defun\>"hs=s+1 syn match skillKeywords "\<defun("he=e-1 syn match skillKeywords "(defUserInitProc\>"hs=s+1 syn match skillKeywords "\<defUserInitProc("he=e-1 syn match skillKeywords "(defvar\>"hs=s+1 syn match skillKeywords "\<defvar("he=e-1 syn match skillFunction "(delete\(Dir\|File\)\>"hs=s+1 syn match skillKeywords "\<delete\(Dir\|File\)("he=e-1 syn match skillFunction "(display\>"hs=s+1 syn match skillFunction "\<display("he=e-1 syn match skillFunction "(drain\>"hs=s+1 syn match skillFunction "\<drain("he=e-1 syn match skillFunction "(dtpr\>"hs=s+1 syn match skillFunction "\<dtpr("he=e-1 syn match skillFunction "(ed\(i\|l\|it\)\=\>"hs=s+1 syn match skillFunction "\<ed\(i\|l\|it\)\=("he=e-1 syn match skillFunction "(envobj\>"hs=s+1 syn match skillFunction "\<envobj("he=e-1 syn match skillFunction "(equal\>"hs=s+1 syn match skillFunction "\<equal("he=e-1 syn match skillFunction "(eqv\=\>"hs=s+1 syn match skillFunction "\<eqv\=("he=e-1 syn match skillFunction "(err\>"hs=s+1 syn match skillFunction "\<err("he=e-1 syn match skillFunction "(error\>"hs=s+1 syn match skillFunction "\<error("he=e-1 syn match skillFunction "(errset\>"hs=s+1 syn match skillFunction "\<errset("he=e-1 syn match skillFunction "(errsetstring\>"hs=s+1 syn match skillFunction "\<errsetstring("he=e-1 syn match skillFunction "(eval\>"hs=s+1 syn match skillFunction "\<eval("he=e-1 syn match skillFunction "(evalstring\>"hs=s+1 syn match skillFunction "\<evalstring("he=e-1 syn match skillFunction "(evenp\>"hs=s+1 syn match skillFunction "\<evenp("he=e-1 syn match skillFunction "(exists\>"hs=s+1 syn match skillFunction "\<exists("he=e-1 syn match skillFunction "(exit\>"hs=s+1 syn match skillFunction "\<exit("he=e-1 syn match skillFunction "(exp\>"hs=s+1 syn match skillFunction "\<exp("he=e-1 syn match skillFunction "(expandMacro\>"hs=s+1 syn match skillFunction "\<expandMacro("he=e-1 syn match skillFunction "(file\(Length\|Seek\|Tell\|TimeModified\)\>"hs=s+1 syn match skillFunction "\<file\(Length\|Seek\|Tell\|TimeModified\)("he=e-1 syn match skillFunction "(fixp\=\>"hs=s+1 syn match skillFunction "\<fixp\=("he=e-1 syn match skillFunction "(floatp\=\>"hs=s+1 syn match skillFunction "\<floatp\=("he=e-1 syn match skillFunction "(floor\>"hs=s+1 syn match skillFunction "\<floor("he=e-1 syn match skillRepeat "(for\(all\|each\)\=\>"hs=s+1 syn match skillRepeat "\<for\(all\|each\)\=("he=e-1 syn match skillFunction "([fs]\=printf\>"hs=s+1 syn match skillFunction "\<[fs]\=printf("he=e-1 syn match skillFunction "(f\=scanf\>"hs=s+1 syn match skillFunction "\<f\=scanf("he=e-1 syn match skillFunction "(funobj\>"hs=s+1 syn match skillFunction "\<funobj("he=e-1 syn match skillFunction "(gc\>"hs=s+1 syn match skillFunction "\<gc("he=e-1 syn match skillFunction "(gensym\>"hs=s+1 syn match skillFunction "\<gensym("he=e-1 syn match skillFunction "(get\(_pname\|_string\)\=\>"hs=s+1 syn match skillFunction "\<get\(_pname\|_string\)\=("he=e-1 syn match skillFunction "(getc\(har\)\=\>"hs=s+1 syn match skillFunction "\<getc\(har\)\=("he=e-1 syn match skillFunction "(getCurrentTime\>"hs=s+1 syn match skillFunction "\<getCurrentTime("he=e-1 syn match skillFunction "(getd\>"hs=s+1 syn match skillFunction "\<getd("he=e-1 syn match skillFunction "(getDirFiles\>"hs=s+1 syn match skillFunction "\<getDirFiles("he=e-1 syn match skillFunction "(getFnWriteProtect\>"hs=s+1 syn match skillFunction "\<getFnWriteProtect("he=e-1 syn match skillFunction "(getRunType\>"hs=s+1 syn match skillFunction "\<getRunType("he=e-1 syn match skillFunction "(getInstallPath\>"hs=s+1 syn match skillFunction "\<getInstallPath("he=e-1 syn match skillFunction "(getqq\=\>"hs=s+1 syn match skillFunction "\<getqq\=("he=e-1 syn match skillFunction "(gets\>"hs=s+1 syn match skillFunction "\<gets("he=e-1 syn match skillFunction "(getShellEnvVar\>"hs=s+1 syn match skillFunction "\<getShellEnvVar("he=e-1 syn match skillFunction "(getSkill\(Path\|Version\)\>"hs=s+1 syn match skillFunction "\<getSkill\(Path\|Version\)("he=e-1 syn match skillFunction "(getVarWriteProtect\>"hs=s+1 syn match skillFunction "\<getVarWriteProtect("he=e-1 syn match skillFunction "(getVersion\>"hs=s+1 syn match skillFunction "\<getVersion("he=e-1 syn match skillFunction "(getWarn\>"hs=s+1 syn match skillFunction "\<getWarn("he=e-1 syn match skillFunction "(getWorkingDir\>"hs=s+1 syn match skillFunction "\<getWorkingDir("he=e-1 syn match skillRepeat "(go\>"hs=s+1 syn match skillRepeat "\<go("he=e-1 syn match skillConditional "(if\>"hs=s+1 syn match skillConditional "\<if("he=e-1 syn keyword skillConditional then else syn match skillFunction "(index\>"hs=s+1 syn match skillFunction "\<index("he=e-1 syn match skillFunction "(infile\>"hs=s+1 syn match skillFunction "\<infile("he=e-1 syn match skillFunction "(inportp\>"hs=s+1 syn match skillFunction "\<inportp("he=e-1 syn match skillFunction "(in\(Scheme\|Skill\)\>"hs=s+1 syn match skillFunction "\<in\(Scheme\|Skill\)("he=e-1 syn match skillFunction "(instring\>"hs=s+1 syn match skillFunction "\<instring("he=e-1 syn match skillFunction "(integerp\>"hs=s+1 syn match skillFunction "\<integerp("he=e-1 syn match skillFunction "(intToChar\>"hs=s+1 syn match skillFunction "\<intToChar("he=e-1 syn match skillFunction "(is\(Callable\|Dir\|Executable\|File\|FileEncrypted\|FileName\|Link\|Macro\|Writable\)\>"hs=s+1 syn match skillFunction "\<is\(Callable\|Dir\|Executable\|File\|FileEncrypted\|FileName\|Link\|Macro\|Writable\)("he=e-1 syn match skillKeywords "(n\=lambda\>"hs=s+1 syn match skillKeywords "\<n\=lambda("he=e-1 syn match skillKeywords "(last\>"hs=s+1 syn match skillKeywords "\<last("he=e-1 syn match skillFunction "(lconc\>"hs=s+1 syn match skillFunction "\<lconc("he=e-1 syn match skillFunction "(length\>"hs=s+1 syn match skillFunction "\<length("he=e-1 syn match skillKeywords "(let\>"hs=s+1 syn match skillKeywords "\<let("he=e-1 syn match skillFunction "(lineread\(string\)\=\>"hs=s+1 syn match skillFunction "\<lineread\(string\)\=("he=e-1 syn match skillKeywords "(list\>"hs=s+1 syn match skillKeywords "\<list("he=e-1 syn match skillFunction "(listp\>"hs=s+1 syn match skillFunction "\<listp("he=e-1 syn match skillFunction "(listToVector\>"hs=s+1 syn match skillFunction "\<listToVector("he=e-1 syn match skillFunction "(loadi\=\>"hs=s+1 syn match skillFunction "\<loadi\=("he=e-1 syn match skillFunction "(loadstring\>"hs=s+1 syn match skillFunction "\<loadstring("he=e-1 syn match skillFunction "(log\>"hs=s+1 syn match skillFunction "\<log("he=e-1 syn match skillFunction "(lowerCase\>"hs=s+1 syn match skillFunction "\<lowerCase("he=e-1 syn match skillFunction "(makeTable\>"hs=s+1 syn match skillFunction "\<makeTable("he=e-1 syn match skillFunction "(makeTempFileName\>"hs=s+1 syn match skillFunction "\<makeTempFileName("he=e-1 syn match skillFunction "(makeVector\>"hs=s+1 syn match skillFunction "\<makeVector("he=e-1 syn match skillFunction "(map\(c\|can\|car\|list\)\>"hs=s+1 syn match skillFunction "\<map\(c\|can\|car\|list\)("he=e-1 syn match skillFunction "(max\>"hs=s+1 syn match skillFunction "\<max("he=e-1 syn match skillFunction "(measureTime\>"hs=s+1 syn match skillFunction "\<measureTime("he=e-1 syn match skillFunction "(member\>"hs=s+1 syn match skillFunction "\<member("he=e-1 syn match skillFunction "(mem[qv]\>"hs=s+1 syn match skillFunction "\<mem[qv]("he=e-1 syn match skillFunction "(min\>"hs=s+1 syn match skillFunction "\<min("he=e-1 syn match skillFunction "(minusp\>"hs=s+1 syn match skillFunction "\<minusp("he=e-1 syn match skillFunction "(mod\(ulo\)\=\>"hs=s+1 syn match skillFunction "\<mod\(ulo\)\=("he=e-1 syn match skillKeywords "([mn]\=procedure\>"hs=s+1 syn match skillKeywords "\<[mn]\=procedure("he=e-1 syn match skillFunction "(ncon[cs]\>"hs=s+1 syn match skillFunction "\<ncon[cs]("he=e-1 syn match skillFunction "(needNCells\>"hs=s+1 syn match skillFunction "\<needNCells("he=e-1 syn match skillFunction "(negativep\>"hs=s+1 syn match skillFunction "\<negativep("he=e-1 syn match skillFunction "(neq\(ual\)\=\>"hs=s+1 syn match skillFunction "\<neq\(ual\)\=("he=e-1 syn match skillFunction "(newline\>"hs=s+1 syn match skillFunction "\<newline("he=e-1 syn match skillFunction "(nindex\>"hs=s+1 syn match skillFunction "\<nindex("he=e-1 syn match skillFunction "(not\>"hs=s+1 syn match skillFunction "\<not("he=e-1 syn match skillFunction "(nth\(cdr\|elem\)\=\>"hs=s+1 syn match skillFunction "\<nth\(cdr\|elem\)\=("he=e-1 syn match skillFunction "(null\>"hs=s+1 syn match skillFunction "\<null("he=e-1 syn match skillFunction "(numberp\>"hs=s+1 syn match skillFunction "\<numberp("he=e-1 syn match skillFunction "(numOpenFiles\>"hs=s+1 syn match skillFunction "\<numOpenFiles("he=e-1 syn match skillFunction "(oddp\>"hs=s+1 syn match skillFunction "\<oddp("he=e-1 syn match skillFunction "(onep\>"hs=s+1 syn match skillFunction "\<onep("he=e-1 syn match skillFunction "(otherp\>"hs=s+1 syn match skillFunction "\<otherp("he=e-1 syn match skillFunction "(outfile\>"hs=s+1 syn match skillFunction "\<outfile("he=e-1 syn match skillFunction "(outportp\>"hs=s+1 syn match skillFunction "\<outportp("he=e-1 syn match skillFunction "(pairp\>"hs=s+1 syn match skillFunction "\<pairp("he=e-1 syn match skillFunction "(parseString\>"hs=s+1 syn match skillFunction "\<parseString("he=e-1 syn match skillFunction "(plist\>"hs=s+1 syn match skillFunction "\<plist("he=e-1 syn match skillFunction "(plusp\>"hs=s+1 syn match skillFunction "\<plusp("he=e-1 syn match skillFunction "(portp\>"hs=s+1 syn match skillFunction "\<portp("he=e-1 syn match skillFunction "(p\=print\>"hs=s+1 syn match skillFunction "\<p\=print("he=e-1 syn match skillFunction "(prependInstallPath\>"hs=s+1 syn match skillFunction "\<prependInstallPath("he=e-1 syn match skillFunction "(printl\(ev\|n\)\>"hs=s+1 syn match skillFunction "\<printl\(ev\|n\)("he=e-1 syn match skillFunction "(procedurep\>"hs=s+1 syn match skillFunction "\<procedurep("he=e-1 syn match skillKeywords "(prog[12n]\=\>"hs=s+1 syn match skillKeywords "\<prog[12n]\=("he=e-1 syn match skillFunction "(putd\>"hs=s+1 syn match skillFunction "\<putd("he=e-1 syn match skillFunction "(putpropq\{,2}\>"hs=s+1 syn match skillFunction "\<putpropq\{,2}("he=e-1 syn match skillFunction "(random\>"hs=s+1 syn match skillFunction "\<random("he=e-1 syn match skillFunction "(read\>"hs=s+1 syn match skillFunction "\<read("he=e-1 syn match skillFunction "(readString\>"hs=s+1 syn match skillFunction "\<readString("he=e-1 syn match skillFunction "(readTable\>"hs=s+1 syn match skillFunction "\<readTable("he=e-1 syn match skillFunction "(realp\>"hs=s+1 syn match skillFunction "\<realp("he=e-1 syn match skillFunction "(regExit\(After\|Before\)\>"hs=s+1 syn match skillFunction "\<regExit\(After\|Before\)("he=e-1 syn match skillFunction "(remainder\>"hs=s+1 syn match skillFunction "\<remainder("he=e-1 syn match skillFunction "(remdq\=\>"hs=s+1 syn match skillFunction "\<remdq\=("he=e-1 syn match skillFunction "(remExitProc\>"hs=s+1 syn match skillFunction "\<remExitProc("he=e-1 syn match skillFunction "(remove\>"hs=s+1 syn match skillFunction "\<remove("he=e-1 syn match skillFunction "(remprop\>"hs=s+1 syn match skillFunction "\<remprop("he=e-1 syn match skillFunction "(remq\>"hs=s+1 syn match skillFunction "\<remq("he=e-1 syn match skillKeywords "(return\>"hs=s+1 syn match skillKeywords "\<return("he=e-1 syn match skillFunction "(reverse\>"hs=s+1 syn match skillFunction "\<reverse("he=e-1 syn match skillFunction "(rexCompile\>"hs=s+1 syn match skillFunction "\<rexCompile("he=e-1 syn match skillFunction "(rexExecute\>"hs=s+1 syn match skillFunction "\<rexExecute("he=e-1 syn match skillFunction "(rexMagic\>"hs=s+1 syn match skillFunction "\<rexMagic("he=e-1 syn match skillFunction "(rexMatchAssocList\>"hs=s+1 syn match skillFunction "\<rexMatchAssocList("he=e-1 syn match skillFunction "(rexMatchList\>"hs=s+1 syn match skillFunction "\<rexMatchList("he=e-1 syn match skillFunction "(rexMatchp\>"hs=s+1 syn match skillFunction "\<rexMatchp("he=e-1 syn match skillFunction "(rexReplace\>"hs=s+1 syn match skillFunction "\<rexReplace("he=e-1 syn match skillFunction "(rexSubstitute\>"hs=s+1 syn match skillFunction "\<rexSubstitute("he=e-1 syn match skillFunction "(rindex\>"hs=s+1 syn match skillFunction "\<rindex("he=e-1 syn match skillFunction "(round\>"hs=s+1 syn match skillFunction "\<round("he=e-1 syn match skillFunction "(rplac[ad]\>"hs=s+1 syn match skillFunction "\<rplac[ad]("he=e-1 syn match skillFunction "(schemeTopLevelEnv\>"hs=s+1 syn match skillFunction "\<schemeTopLevelEnv("he=e-1 syn match skillFunction "(set\>"hs=s+1 syn match skillFunction "\<set("he=e-1 syn match skillFunction "(setarray\>"hs=s+1 syn match skillFunction "\<setarray("he=e-1 syn match skillFunction "(setc[ad]r\>"hs=s+1 syn match skillFunction "\<setc[ad]r("he=e-1 syn match skillFunction "(setFnWriteProtect\>"hs=s+1 syn match skillFunction "\<setFnWriteProtect("he=e-1 syn match skillFunction "(setof\>"hs=s+1 syn match skillFunction "\<setof("he=e-1 syn match skillFunction "(setplist\>"hs=s+1 syn match skillFunction "\<setplist("he=e-1 syn match skillFunction "(setq\>"hs=s+1 syn match skillFunction "\<setq("he=e-1 syn match skillFunction "(setShellEnvVar\>"hs=s+1 syn match skillFunction "\<setShellEnvVar("he=e-1 syn match skillFunction "(setSkillPath\>"hs=s+1 syn match skillFunction "\<setSkillPath("he=e-1 syn match skillFunction "(setVarWriteProtect\>"hs=s+1 syn match skillFunction "\<setVarWriteProtect("he=e-1 syn match skillFunction "(sh\(ell\)\=\>"hs=s+1 syn match skillFunction "\<sh\(ell\)\=("he=e-1 syn match skillFunction "(simplifyFilename\>"hs=s+1 syn match skillFunction "\<simplifyFilename("he=e-1 syn match skillFunction "(sort\(car\)\=\>"hs=s+1 syn match skillFunction "\<sort\(car\)\=("he=e-1 syn match skillFunction "(sqrt\>"hs=s+1 syn match skillFunction "\<sqrt("he=e-1 syn match skillFunction "(srandom\>"hs=s+1 syn match skillFunction "\<srandom("he=e-1 syn match skillFunction "(sstatus\>"hs=s+1 syn match skillFunction "\<sstatus("he=e-1 syn match skillFunction "(strn\=cat\>"hs=s+1 syn match skillFunction "\<strn\=cat("he=e-1 syn match skillFunction "(strn\=cmp\>"hs=s+1 syn match skillFunction "\<strn\=cmp("he=e-1 syn match skillFunction "(stringp\>"hs=s+1 syn match skillFunction "\<stringp("he=e-1 syn match skillFunction "(stringTo\(Function\|Symbol\|Time\)\>"hs=s+1 syn match skillFunction "\<stringTo\(Function\|Symbol\|Time\)("he=e-1 syn match skillFunction "(strlen\>"hs=s+1 syn match skillFunction "\<strlen("he=e-1 syn match skillFunction "(sub1\>"hs=s+1 syn match skillFunction "\<sub1("he=e-1 syn match skillFunction "(subst\>"hs=s+1 syn match skillFunction "\<subst("he=e-1 syn match skillFunction "(substring\>"hs=s+1 syn match skillFunction "\<substring("he=e-1 syn match skillFunction "(sxtd\>"hs=s+1 syn match skillFunction "\<sxtd("he=e-1 syn match skillFunction "(symbolp\>"hs=s+1 syn match skillFunction "\<symbolp("he=e-1 syn match skillFunction "(symbolToString\>"hs=s+1 syn match skillFunction "\<symbolToString("he=e-1 syn match skillFunction "(symeval\>"hs=s+1 syn match skillFunction "\<symeval("he=e-1 syn match skillFunction "(symstrp\>"hs=s+1 syn match skillFunction "\<symstrp("he=e-1 syn match skillFunction "(system\>"hs=s+1 syn match skillFunction "\<system("he=e-1 syn match skillFunction "(tablep\>"hs=s+1 syn match skillFunction "\<tablep("he=e-1 syn match skillFunction "(tableToList\>"hs=s+1 syn match skillFunction "\<tableToList("he=e-1 syn match skillFunction "(tailp\>"hs=s+1 syn match skillFunction "\<tailp("he=e-1 syn match skillFunction "(tconc\>"hs=s+1 syn match skillFunction "\<tconc("he=e-1 syn match skillFunction "(timeToString\>"hs=s+1 syn match skillFunction "\<timeToString("he=e-1 syn match skillFunction "(timeToTm\>"hs=s+1 syn match skillFunction "\<timeToTm("he=e-1 syn match skillFunction "(tmToTime\>"hs=s+1 syn match skillFunction "\<tmToTime("he=e-1 syn match skillFunction "(truncate\>"hs=s+1 syn match skillFunction "\<truncate("he=e-1 syn match skillFunction "(typep\=\>"hs=s+1 syn match skillFunction "\<typep\=("he=e-1 syn match skillFunction "(unalias\>"hs=s+1 syn match skillFunction "\<unalias("he=e-1 syn match skillConditional "(unless\>"hs=s+1 syn match skillConditional "\<unless("he=e-1 syn match skillFunction "(upperCase\>"hs=s+1 syn match skillFunction "\<upperCase("he=e-1 syn match skillFunction "(vector\(ToList\)\=\>"hs=s+1 syn match skillFunction "\<vector\(ToList\)\=("he=e-1 syn match skillFunction "(warn\>"hs=s+1 syn match skillFunction "\<warn("he=e-1 syn match skillConditional "(when\>"hs=s+1 syn match skillConditional "\<when("he=e-1 syn match skillRepeat "(while\>"hs=s+1 syn match skillRepeat "\<while("he=e-1 syn match skillFunction "(write\>"hs=s+1 syn match skillFunction "\<write("he=e-1 syn match skillFunction "(writeTable\>"hs=s+1 syn match skillFunction "\<writeTable("he=e-1 syn match skillFunction "(xcons\>"hs=s+1 syn match skillFunction "\<xcons("he=e-1 syn match skillFunction "(zerop\>"hs=s+1 syn match skillFunction "\<zerop("he=e-1 syn match skillFunction "(zxtd\>"hs=s+1 syn match skillFunction "\<zxtd("he=e-1 " DFII procedural interface routines " CDF functions syn match skillcdfFunctions "(cdf\u\a\+\>"hs=s+1 syn match skillcdfFunctions "\<cdf\u\a\+("he=e-1 " graphic editor functions syn match skillgeFunctions "(ge\u\a\+\>"hs=s+1 syn match skillgeFunctions "\<ge\u\a\+("he=e-1 " human interface functions syn match skillhiFunctions "(hi\u\a\+\>"hs=s+1 syn match skillhiFunctions "\<hi\u\a\+("he=e-1 " layout editor functions syn match skillleFunctions "(le\u\a\+\>"hs=s+1 syn match skillleFunctions "\<le\u\a\+("he=e-1 " database|design editor|design flow functions syn match skilldbefFunctions "(d[bef]\u\a\+\>"hs=s+1 syn match skilldbefFunctions "\<d[bef]\u\a\+("he=e-1 " design management & design data services functions syn match skillddFunctions "(dd[s]\=\u\a\+\>"hs=s+1 syn match skillddFunctions "\<dd[s]\=\u\a\+("he=e-1 " parameterized cell functions syn match skillpcFunctions "(pc\u\a\+\>"hs=s+1 syn match skillpcFunctions "\<pc\u\a\+("he=e-1 " tech file functions syn match skilltechFunctions "(\(tech\|tc\)\u\a\+\>"hs=s+1 syn match skilltechFunctions "\<\(tech\|tc\)\u\a\+("he=e-1 " strings syn region skillString start=+"+ skip=+\\"+ end=+"+ syn keyword skillTodo contained TODO FIXME XXX syn keyword skillNote contained NOTE IMPORTANT " comments are either C-style or begin with a semicolon syn region skillComment start="/\*" end="\*/" contains=skillTodo,skillNote syn match skillComment ";.*" contains=skillTodo,skillNote syn match skillCommentError "\*/" syn sync ccomment skillComment minlines=10 " 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_skill_syntax_inits") if version < 508 let did_skill_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink skillcdfFunctions Function HiLink skillgeFunctions Function HiLink skillhiFunctions Function HiLink skillleFunctions Function HiLink skilldbefFunctions Function HiLink skillddFunctions Function HiLink skillpcFunctions Function HiLink skilltechFunctions Function HiLink skillConstants Constant HiLink skillFunction Function HiLink skillKeywords Statement HiLink skillConditional Conditional HiLink skillRepeat Repeat HiLink skillString String HiLink skillTodo Todo HiLink skillNote Todo HiLink skillComment Comment HiLink skillCommentError Error delcommand HiLink endif let b:current_syntax = "skill" " vim: ts=4
zyz2011-vim
runtime/syntax/skill.vim
Vim Script
gpl2
26,116
" Vim syntax file " Language: Omnimark " Maintainer: Paul Terray <mailto:terray@4dconcept.fr> " Last Change: 11 Oct 2000 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif if version < 600 set iskeyword=@,48-57,_,128-167,224-235,- else setlocal iskeyword=@,48-57,_,128-167,224-235,- endif syn keyword omnimarkKeywords ACTIVATE AGAIN syn keyword omnimarkKeywords CATCH CLEAR CLOSE COPY COPY-CLEAR CROSS-TRANSLATE syn keyword omnimarkKeywords DEACTIVATE DECLARE DECREMENT DEFINE DISCARD DIVIDE DO DOCUMENT-END DOCUMENT-START DONE DTD-START syn keyword omnimarkKeywords ELEMENT ELSE ESCAPE EXIT syn keyword omnimarkKeywords FAIL FIND FIND-END FIND-START FORMAT syn keyword omnimarkKeywords GROUP syn keyword omnimarkKeywords HALT HALT-EVERYTHING syn keyword omnimarkKeywords IGNORE IMPLIED INCLUDE INCLUDE-END INCLUDE-START INCREMENT INPUT syn keyword omnimarkKeywords JOIN syn keyword omnimarkKeywords LINE-END LINE-START LOG LOOKAHEAD syn keyword omnimarkKeywords MACRO syn keyword omnimarkKeywords MACRO-END MARKED-SECTION MARKUP-COMMENT MARKUP-ERROR MARKUP-PARSER MASK MATCH MINUS MODULO syn keyword omnimarkKeywords NEW NEWLINE NEXT syn keyword omnimarkKeywords OPEN OUTPUT OUTPUT-TO OVER syn keyword omnimarkKeywords PROCESS PROCESS-END PROCESS-START PROCESSING-INSTRUCTION PROLOG-END PROLOG-IN-ERROR PUT syn keyword omnimarkKeywords REMOVE REOPEN REPEAT RESET RETHROW RETURN syn keyword omnimarkKeywords WHEN WHITE-SPACE syn keyword omnimarkKeywords SAVE SAVE-CLEAR SCAN SELECT SET SGML SGML-COMMENT SGML-DECLARATION-END SGML-DTD SGML-DTDS SGML-ERROR SGML-IN SGML-OUT SGML-PARSE SGML-PARSER SHIFT SUBMIT SUCCEED SUPPRESS syn keyword omnimarkKeywords SYSTEM-CALL syn keyword omnimarkKeywords TEST-SYSTEM THROW TO TRANSLATE syn keyword omnimarkKeywords UC UL UNLESS UP-TRANSLATE syn keyword omnimarkKeywords XML-PARSE syn keyword omnimarkCommands ACTIVE AFTER ANCESTOR AND ANOTHER ARG AS ATTACHED ATTRIBUTE ATTRIBUTES syn keyword omnimarkCommands BASE BEFORE BINARY BINARY-INPUT BINARY-MODE BINARY-OUTPUT BREAK-WIDTH BUFFER BY syn keyword omnimarkCommands CASE CHILDREN CLOSED COMPILED-DATE COMPLEMENT CONREF CONTENT CONTEXT-TRANSLATE COUNTER CREATED CREATING CREATOR CURRENT syn keyword omnimarkCommands DATA-ATTRIBUTE DATA-ATTRIBUTES DATA-CONTENT DATA-LETTERS DATE DECLARED-CONREF DECLARED-CURRENT DECLARED-DEFAULTED DECLARED-FIXED DECLARED-IMPLIED DECLARED-REQUIRED syn keyword omnimarkCommands DEFAULT-ENTITY DEFAULTED DEFAULTING DELIMITER DIFFERENCE DIRECTORY DOCTYPE DOCUMENT DOCUMENT-ELEMENT DOMAIN-FREE DOWN-TRANSLATE DTD DTD-END DTDS syn keyword omnimarkCommands ELEMENTS ELSEWHERE EMPTY ENTITIES ENTITY EPILOG-START EQUAL EXCEPT EXISTS EXTERNAL EXTERNAL-DATA-ENTITY EXTERNAL-ENTITY EXTERNAL-FUNCTION EXTERNAL-OUTPUT-FUNCTION syn keyword omnimarkCommands EXTERNAL-TEXT-ENTITY syn keyword omnimarkCommands FALSE FILE FUNCTION FUNCTION-LIBRARY syn keyword omnimarkCommands GENERAL GLOBAL GREATER-EQUAL GREATER-THAN GROUPS syn keyword omnimarkCommands HAS HASNT HERALDED-NAMES syn keyword omnimarkCommands ID ID-CHECKING IDREF IDREFS IN IN-LIBRARY INCLUSION INITIAL INITIAL-SIZE INSERTION-BREAK INSTANCE INTERNAL INVALID-DATA IS ISNT ITEM syn keyword omnimarkCommands KEY KEYED syn keyword omnimarkCommands LAST LASTMOST LC LENGTH LESS-EQUAL LESS-THAN LETTERS LIBRARY LITERAL LOCAL syn keyword omnimarkCommands MATCHES MIXED MODIFIABLE syn keyword omnimarkCommands NAME NAME-LETTERS NAMECASE NAMED NAMES NDATA-ENTITY NEGATE NESTED-REFERENTS NMTOKEN NMTOKENS NO NO-DEFAULT-IO NON-CDATA NON-IMPLIED NON-SDATA NOT NOTATION NUMBER-OF NUMBERS syn keyword omnimarkCommands NUTOKEN NUTOKENS syn keyword omnimarkCommands OCCURRENCE OF OPAQUE OPTIONAL OR syn keyword omnimarkCommands PARAMETER PARENT PAST PATTERN PLUS PREPARENT PREVIOUS PROPER PUBLIC syn keyword omnimarkCommands READ-ONLY READABLE REFERENT REFERENTS REFERENTS-ALLOWED REFERENTS-DISPLAYED REFERENTS-NOT-ALLOWED REMAINDER REPEATED REPLACEMENT-BREAK REVERSED syn keyword omnimarkCommands SILENT-REFERENT SIZE SKIP SOURCE SPECIFIED STATUS STREAM SUBDOC-ENTITY SUBDOCUMENT SUBDOCUMENTS SUBELEMENT SWITCH SYMBOL SYSTEM syn keyword omnimarkCommands TEXT-MODE THIS TIMES TOKEN TRUE syn keyword omnimarkCommands UNANCHORED UNATTACHED UNION USEMAP USING syn keyword omnimarkCommands VALUE VALUED VARIABLE syn keyword omnimarkCommands WITH WRITABLE syn keyword omnimarkCommands XML XML-DTD XML-DTDS syn keyword omnimarkCommands YES syn keyword omnimarkCommands #ADDITIONAL-INFO #APPINFO #CAPACITY #CHARSET #CLASS #COMMAND-LINE-NAMES #CONSOLE #CURRENT-INPUT #CURRENT-OUTPUT #DATA #DOCTYPE #DOCUMENT #DTD #EMPTY #ERROR #ERROR-CODE syn keyword omnimarkCommands #FILE-NAME #FIRST #GROUP #IMPLIED #ITEM #LANGUAGE-VERSION #LAST #LIBPATH #LIBRARY #LIBVALUE #LINE-NUMBER #MAIN-INPUT #MAIN-OUTPUT #MARKUP-ERROR-COUNT #MARKUP-ERROR-TOTAL syn keyword omnimarkCommands #MARKUP-PARSER #MARKUP-WARNING-COUNT #MARKUP-WARNING-TOTAL #MESSAGE #NONE #OUTPUT #PLATFORM-INFO #PROCESS-INPUT #PROCESS-OUTPUT #RECOVERY-INFO #SGML #SGML-ERROR-COUNT syn keyword omnimarkCommands #SGML-ERROR-TOTAL #SGML-WARNING-COUNT #SGML-WARNING-TOTAL #SUPPRESS #SYNTAX #! syn keyword omnimarkPatterns ANY ANY-TEXT syn keyword omnimarkPatterns BLANK syn keyword omnimarkPatterns CDATA CDATA-ENTITY CONTENT-END CONTENT-START syn keyword omnimarkPatterns DIGIT syn keyword omnimarkPatterns LETTER syn keyword omnimarkPatterns NUMBER syn keyword omnimarkPatterns PCDATA syn keyword omnimarkPatterns RCDATA syn keyword omnimarkPatterns SDATA SDATA-ENTITY SPACE syn keyword omnimarkPatterns TEXT syn keyword omnimarkPatterns VALUE-END VALUE-START syn keyword omnimarkPatterns WORD-END WORD-START syn region omnimarkComment start=";" end="$" " strings syn region omnimarkString matchgroup=Normal start=+'+ end=+'+ skip=+%'+ contains=omnimarkEscape syn region omnimarkString matchgroup=Normal start=+"+ end=+"+ skip=+%"+ contains=omnimarkEscape syn match omnimarkEscape contained +%.+ syn match omnimarkEscape contained +%[0-9][0-9]#+ "syn sync maxlines=100 syn sync minlines=2000 " 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_omnimark_syntax_inits") if version < 508 let did_omnimark_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink omnimarkCommands Statement HiLink omnimarkKeywords Identifier HiLink omnimarkString String HiLink omnimarkPatterns Macro " HiLink omnimarkNumber Number HiLink omnimarkComment Comment HiLink omnimarkEscape Special delcommand HiLink endif let b:current_syntax = "omnimark" " vim: ts=8
zyz2011-vim
runtime/syntax/omnimark.vim
Vim Script
gpl2
6,854
" Vim syntax file " Language: CWEB " Maintainer: Andreas Scherer <andreas.scherer@pobox.com> " Last Change: 2011 Dec 25 by Thilo Six " Details of the CWEB language can be found in the article by Donald E. Knuth " and Silvio Levy, "The CWEB System of Structured Documentation", included as " file "cwebman.tex" in the standard CWEB distribution, available for " anonymous ftp at ftp://labrea.stanford.edu/pub/cweb/. " TODO: Section names and C/C++ comments should be treated as TeX material. " TODO: The current version switches syntax highlighting off for section " TODO: names, and leaves C/C++ comments as such. (On the other hand, " TODO: switching to TeX mode in C/C++ comments might be colour overkill.) " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif " For starters, read the TeX syntax; TeX syntax items are allowed at the top " level in the CWEB syntax, e.g., in the preamble. In general, a CWEB source " code can be seen as a normal TeX document with some C/C++ material " interspersed in certain defined regions. if version < 600 source <sfile>:p:h/tex.vim else runtime! syntax/tex.vim unlet b:current_syntax endif " Read the C/C++ syntax too; C/C++ syntax items are treated as such in the " C/C++ section of a CWEB chunk or in inner C/C++ context in "|...|" groups. syntax include @webIncludedC <sfile>:p:h/cpp.vim let s:cpo_save = &cpo set cpo&vim " Inner C/C++ context (ICC) should be quite simple as it's comprised of " material in "|...|"; however the naive definition for this region would " hickup at the innocious "\|" TeX macro. Note: For the time being we expect " that an ICC begins either at the start of a line or after some white space. syntax region webInnerCcontext start="\(^\|[ \t\~`(]\)|" end="|" contains=@webIncludedC,webSectionName,webRestrictedTeX,webIgnoredStuff " Genuine C/C++ material. This syntactic region covers both the definition " part and the C/C++ part of a CWEB section; it is ended by the TeX part of " the next section. syntax region webCpart start="@[dfscp<(]" end="@[ \*]" contains=@webIncludedC,webSectionName,webRestrictedTeX,webIgnoredStuff " Section names contain C/C++ material only in inner context. syntax region webSectionName start="@[<(]" end="@>" contains=webInnerCcontext contained " The contents of "control texts" is not treated as TeX material, because in " non-trivial cases this completely clobbers the syntax recognition. Instead, " we highlight these elements as "strings". syntax region webRestrictedTeX start="@[\^\.:t=q]" end="@>" oneline " Double-@ means single-@, anywhere in the CWEB source. (This allows e-mail " address <someone@@fsf.org> without going into C/C++ mode.) syntax match webIgnoredStuff "@@" " 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_cweb_syntax_inits") if version < 508 let did_cweb_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink webRestrictedTeX String delcommand HiLink endif let b:current_syntax = "cweb" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8
zyz2011-vim
runtime/syntax/cweb.vim
Vim Script
gpl2
3,368
" Vim syntax file " Language: elinks(1) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2007-06-17 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim setlocal iskeyword+=- syn keyword elinksTodo contained TODO FIXME XXX NOTE syn region elinksComment display oneline start='#' end='$' \ contains=elinksTodo,@Spell syn match elinksNumber '\<\d\+\>' syn region elinksString start=+"+ skip=+\\\\\|\\"+ end=+"+ \ contains=@elinksColor syn keyword elinksKeyword set bind syn keyword elinksPrefix bookmarks syn keyword elinksOptions file_format syn keyword elinksPrefix config syn keyword elinksOptions comments indentation saving_style i18n \ saving_style_w show_template syn keyword elinksPrefix connection ssl client_cert syn keyword elinksOptions enable file cert_verify async_dns max_connections \ max_connections_to_host receive_timeout retries \ unrestartable_receive_timeout syn keyword elinksPrefix cookies syn keyword elinksOptions accept_policy max_age paranoid_security save resave syn keyword elinksPrefix document browse accesskey forms images links syn keyword elinksPrefix active_link colors search cache codepage colors syn keyword elinksPrefix format memory download dump history global html syn keyword elinksPrefix plain syn keyword elinksOptions auto_follow priority auto_submit confirm_submit \ input_size show_formhist file_tags \ image_link_tagging image_link_prefix \ image_link_suffix show_as_links \ show_any_as_links background text enable_color \ bold invert underline color_dirs numbering \ use_tabindex number_keys_select_link \ wraparound case regex show_hit_top_bottom \ wraparound show_not_found margin_width refresh \ minimum_refresh_time scroll_margin scroll_step \ table_move_order size size cache_redirects \ ignore_cache_control assume force_assumed text \ background link vlink dirs allow_dark_on_black \ ensure_contrast use_document_colors directory \ set_original_time overwrite notify_bell \ codepage width enable max_items display_type \ write_interval keep_unhistory display_frames \ display_tables expand_table_columns display_subs \ display_sups link_display underline_links \ wrap_nbsp display_links compress_empty_lines syn keyword elinksPrefix mime extension handler mailcap mimetypes type syn keyword elinksOptions ask block program enable path ask description \ prioritize enable path default_type syn keyword elinksPrefix protocol file cgi ftp proxy http bugs proxy syn keyword elinksPrefix referer https proxy rewrite dumb smart syn keyword elinksOptions path policy allow_special_files show_hidden_files \ try_encoding_extensions host anon_passwd \ use_pasv use_epsv accept_charset allow_blacklist \ broken_302_redirect post_no_keepalive http10 \ host user passwd policy fake accept_language \ accept_ui_language trace user_agent host \ enable-dumb enable-smart syn keyword elinksPrefix terminal syn keyword elinksOptions type m11_hack utf_8_io restrict_852 block_cursor \ colors transparency underline charset syn keyword elinksPrefix ui colors color mainmenu normal selected hotkey \ menu marked hotkey frame dialog generic \ frame scrollbar scrollbar-selected title text \ checkbox checkbox-label button button-selected \ field field-text meter shadow title title-bar \ title-text status status-bar status-text tabs \ unvisited normal loading separator searched mono syn keyword elinksOptions text background syn keyword elinksPrefix ui dialogs leds sessions tabs timer syn keyword elinksOptions listbox_min_height shadows underline_hotkeys enable \ auto_save auto_restore auto_save_foldername \ homepage show_bar wraparound confirm_close \ enable duration action language show_status_bar \ show_title_bar startup_goto_dialog \ success_msgbox window_title syn keyword elinksOptions secure_file_saving syn cluster elinksColor contains=elinksColorBlack,elinksColorDarkRed, \ elinksColorDarkGreen,elinksColorDarkYellow, \ elinksColorDarkBlue,elinksColorDarkMagenta, \ elinksColorDarkCyan,elinksColorGray, \ elinksColorDarkGray,elinksColorRed, \ elinksColorGreen,elinksColorYellow, \ elinksColorBlue,elinksColorMagenta, \ elinksColorCyan,elinksColorWhite syn keyword elinksColorBlack contained black syn keyword elinksColorDarkRed contained darkred sandybrown maroon crimson \ firebrick syn keyword elinksColorDarkGreen contained darkgreen darkolivegreen \ darkseagreen forestgreen \ mediumspringgreen seagreen syn keyword elinksColorDarkYellow contained brown blanchedalmond chocolate \ darkorange darkgoldenrod orange rosybrown \ saddlebrown peru olive olivedrab sienna syn keyword elinksColorDarkBlue contained darkblue cadetblue cornflowerblue \ darkslateblue deepskyblue midnightblue \ royalblue steelblue navy syn keyword elinksColorDarkMagenta contained darkmagenta mediumorchid \ mediumpurple mediumslateblue slateblue \ deeppink hotpink darkorchid orchid purple \ indigo syn keyword elinksColorDarkCyan contained darkcyan mediumaquamarine \ mediumturquoise darkturquoise teal syn keyword elinksColorGray contained silver dimgray lightslategray \ slategray lightgrey burlywood plum tan \ thistle syn keyword elinksColorDarkGray contained gray darkgray darkslategray \ darksalmon syn keyword elinksColorRed contained red indianred orangered tomato \ lightsalmon salmon coral lightcoral syn keyword elinksColorGreen contained green greenyellow lawngreen \ lightgreen lightseagreen limegreen \ mediumseagreen springgreen yellowgreen \ palegreen lime chartreuse syn keyword elinksColorYellow contained yellow beige darkkhaki \ lightgoldenrodyellow palegoldenrod gold \ goldenrod khaki lightyellow syn keyword elinksColorBlue contained blue aliceblue aqua aquamarine \ azure dodgerblue lightblue lightskyblue \ lightsteelblue mediumblue syn keyword elinksColorMagenta contained magenta darkviolet blueviolet \ lightpink mediumvioletred palevioletred \ violet pink fuchsia syn keyword elinksColorCyan contained cyan lightcyan powderblue skyblue \ turquoise paleturquoise syn keyword elinksColorWhite contained white antiquewhite floralwhite \ ghostwhite navajowhite whitesmoke linen \ lemonchiffon cornsilk lavender \ lavenderblush seashell mistyrose ivory \ papayawhip bisque gainsboro honeydew \ mintcream moccasin oldlace peachpuff snow \ wheat hi def link elinksTodo Todo hi def link elinksComment Comment hi def link elinksNumber Number hi def link elinksString String hi def link elinksKeyword Keyword hi def link elinksPrefix Identifier hi def link elinksOptions Identifier hi def elinksColorBlack ctermfg=Black guifg=Black hi def elinksColorDarkRed ctermfg=DarkRed guifg=DarkRed hi def elinksColorDarkGreen ctermfg=DarkGreen guifg=DarkGreen hi def elinksColorDarkYellow ctermfg=DarkYellow guifg=DarkYellow hi def elinksColorDarkBlue ctermfg=DarkBlue guifg=DarkBlue hi def elinksColorDarkMagenta ctermfg=DarkMagenta guifg=DarkMagenta hi def elinksColorDarkCyan ctermfg=DarkCyan guifg=DarkCyan hi def elinksColorGray ctermfg=Gray guifg=Gray hi def elinksColorDarkGray ctermfg=DarkGray guifg=DarkGray hi def elinksColorRed ctermfg=Red guifg=Red hi def elinksColorGreen ctermfg=Green guifg=Green hi def elinksColorYellow ctermfg=Yellow guifg=Yellow hi def elinksColorBlue ctermfg=Blue guifg=Blue hi def elinksColorMagenta ctermfg=Magenta guifg=Magenta hi def elinksColorCyan ctermfg=Cyan guifg=Cyan hi def elinksColorWhite ctermfg=White guifg=White let b:current_syntax = "elinks" let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/syntax/elinks.vim
Vim Script
gpl2
10,482
" Vim syntax file " Language: Informix 4GL " Maintainer: Rafal M. Sulejman <rms@poczta.onet.pl> " Update: 26 Sep 2002 " Changes: " - Dynamic 4GL/FourJs/4GL 7.30 pseudo comment directives (Julian Bridle) " - Conditionally allow case insensitive keywords (Julian Bridle) " " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif if exists("fgl_ignore_case") syntax case ignore else syntax case match endif syn keyword fglKeyword ABORT ABS ABSOLUTE ACCEPT ACCESS ACOS ADD AFTER ALL syn keyword fglKeyword ALLOCATE ALTER AND ANSI ANY APPEND ARG_VAL ARRAY ARR_COUNT syn keyword fglKeyword ARR_CURR AS ASC ASCENDING ASCII ASIN AT ATAN ATAN2 ATTACH syn keyword fglKeyword ATTRIBUTE ATTRIBUTES AUDIT AUTHORIZATION AUTO AUTONEXT AVERAGE AVG syn keyword fglKeyword BEFORE BEGIN BETWEEN BLACK BLINK BLUE BOLD BORDER BOTH BOTTOM syn keyword fglKeyword BREAK BUFFERED BY BYTE syn keyword fglKeyword CALL CASCADE CASE CHAR CHARACTER CHARACTER_LENGTH CHAR_LENGTH syn keyword fglKeyword CHECK CLASS_ORIGIN CLEAR CLIPPED CLOSE CLUSTER COLOR syn keyword fglKeyword COLUMN COLUMNS COMMAND COMMENT COMMENTS COMMIT COMMITTED syn keyword fglKeyword COMPOSITES COMPRESS CONCURRENT CONNECT CONNECTION syn keyword fglKeyword CONNECTION_ALIAS CONSTRAINED CONSTRAINT CONSTRAINTS CONSTRUCT syn keyword fglKeyword CONTINUE CONTROL COS COUNT CREATE CURRENT CURSOR CYAN syn keyword fglKeyword DATA DATABASE DATASKIP DATE DATETIME DAY DBA DBINFO DBSERVERNAME syn keyword fglKeyword DEALLOCATE DEBUG DEC DECIMAL DECLARE DEFAULT DEFAULTS DEFER syn keyword fglKeyword DEFERRED DEFINE DELETE DELIMITER DELIMITERS DESC DESCENDING syn keyword fglKeyword DESCRIBE DESCRIPTOR DETACH DIAGNOSTICS DIM DIRTY DISABLED syn keyword fglKeyword DISCONNECT DISPLAY DISTINCT DISTRIBUTIONS DO DORMANT DOUBLE syn keyword fglKeyword DOWN DOWNSHIFT DROP syn keyword fglKeyword EACH ELIF ELSE ENABLED END ENTRY ERROR ERRORLOG ERR_GET syn keyword fglKeyword ERR_PRINT ERR_QUIT ESC ESCAPE EVERY EXCEPTION EXCLUSIVE syn keyword fglKeyword EXEC EXECUTE EXISTS EXIT EXP EXPLAIN EXPRESSION EXTEND EXTENT syn keyword fglKeyword EXTERN EXTERNAL syn keyword fglKeyword F1 F10 F11 F12 F13 F14 F15 F16 F17 F18 F19 F2 F20 F21 F22 F23 syn keyword fglKeyword F24 F25 F26 F27 F28 F29 F3 F30 F31 F32 F33 F34 F35 F36 F37 F38 syn keyword fglKeyword F39 F4 F40 F41 F42 F43 F44 F45 F46 F47 F48 F49 F5 F50 F51 F52 syn keyword fglKeyword F53 F54 F55 F56 F57 F58 F59 F6 F60 F61 F62 F63 F64 F7 F8 F9 syn keyword fglKeyword FALSE FETCH FGL_GETENV FGL_KEYVAL FGL_LASTKEY FIELD FIELD_TOUCHED syn keyword fglKeyword FILE FILLFACTOR FILTERING FINISH FIRST FLOAT FLUSH FOR syn keyword fglKeyword FOREACH FOREIGN FORM FORMAT FORMONLY FORTRAN FOUND FRACTION syn keyword fglKeyword FRAGMENT FREE FROM FUNCTION GET_FLDBUF GLOBAL GLOBALS GO GOTO syn keyword fglKeyword GRANT GREEN GROUP HAVING HEADER HELP HEX HIDE HIGH HOLD HOUR syn keyword fglKeyword IDATA IF ILENGTH IMMEDIATE IN INCLUDE INDEX INDEXES INDICATOR syn keyword fglKeyword INFIELD INIT INITIALIZE INPUT INSERT INSTRUCTIONS INT INTEGER syn keyword fglKeyword INTERRUPT INTERVAL INTO INT_FLAG INVISIBLE IS ISAM ISOLATION syn keyword fglKeyword ITYPE syn keyword fglKeyword KEY LABEL syn keyword fglKeyword LANGUAGE LAST LEADING LEFT LENGTH LET LIKE LINE syn keyword fglKeyword LINENO LINES LOAD LOCATE LOCK LOG LOG10 LOGN LONG LOW syn keyword fglKeyword MAGENTA MAIN MARGIN MATCHES MAX MDY MEDIUM MEMORY MENU MESSAGE syn keyword fglKeyword MESSAGE_LENGTH MESSAGE_TEXT MIN MINUTE MOD MODE MODIFY MODULE syn keyword fglKeyword MONEY MONTH MORE syn keyword fglKeyword NAME NCHAR NEED NEW NEXT NEXTPAGE NO NOCR NOENTRY NONE NORMAL syn keyword fglKeyword NOT NOTFOUND NULL NULLABLE NUMBER NUMERIC NUM_ARGS NVARCHAR syn keyword fglKeyword OCTET_LENGTH OF OFF OLD ON ONLY OPEN OPTIMIZATION OPTION OPTIONS syn keyword fglKeyword OR ORDER OTHERWISE OUTER OUTPUT syn keyword fglKeyword PAGE PAGENO PAUSE PDQPRIORITY PERCENT PICTURE PIPE POW PRECISION syn keyword fglKeyword PREPARE PREVIOUS PREVPAGE PRIMARY PRINT PRINTER PRIOR PRIVATE syn keyword fglKeyword PRIVILEGES PROCEDURE PROGRAM PROMPT PUBLIC PUT syn keyword fglKeyword QUIT QUIT_FLAG syn keyword fglKeyword RAISE RANGE READ READONLY REAL RECORD RECOVER RED REFERENCES syn keyword fglKeyword REFERENCING REGISTER RELATIVE REMAINDER REMOVE RENAME REOPTIMIZATION syn keyword fglKeyword REPEATABLE REPORT REQUIRED RESOLUTION RESOURCE RESTRICT syn keyword fglKeyword RESUME RETURN RETURNED_SQLSTATE RETURNING REVERSE REVOKE RIGHT syn keyword fglKeyword ROBIN ROLE ROLLBACK ROLLFORWARD ROOT ROUND ROW ROWID ROWIDS syn keyword fglKeyword ROWS ROW_COUNT RUN syn keyword fglKeyword SCALE SCHEMA SCREEN SCROLL SCR_LINE SECOND SECTION SELECT syn keyword fglKeyword SERIAL SERIALIZABLE SERVER_NAME SESSION SET SET_COUNT SHARE syn keyword fglKeyword SHORT SHOW SITENAME SIZE SIZEOF SKIP SLEEP SMALLFLOAT SMALLINT syn keyword fglKeyword SOME SPACE SPACES SQL SQLAWARN SQLCA SQLCODE SQLERRD SQLERRM syn keyword fglKeyword SQLERROR SQLERRP SQLSTATE SQLWARNING SQRT STABILITY START syn keyword fglKeyword STARTLOG STATIC STATISTICS STATUS STDEV STEP STOP STRING STRUCT syn keyword fglKeyword SUBCLASS_ORIGIN SUM SWITCH SYNONYM SYSTEM syn keyword fglKeyword SysBlobs SysChecks SysColAuth SysColDepend SysColumns syn keyword fglKeyword SysConstraints SysDefaults SysDepend SysDistrib SysFragAuth syn keyword fglKeyword SysFragments SysIndexes SysObjState SysOpClstr SysProcAuth syn keyword fglKeyword SysProcBody SysProcPlan SysProcedures SysReferences SysRoleAuth syn keyword fglKeyword SysSynTable SysSynonyms SysTabAuth SysTables SysTrigBody syn keyword fglKeyword SysTriggers SysUsers SysViews SysViolations syn keyword fglKeyword TAB TABLE TABLES TAN TEMP TEXT THEN THROUGH THRU TIME TO syn keyword fglKeyword TODAY TOP TOTAL TRACE TRAILER TRAILING TRANSACTION TRIGGER syn keyword fglKeyword TRIGGERS TRIM TRUE TRUNC TYPE TYPEDEF syn keyword fglKeyword UNCOMMITTED UNCONSTRAINED UNDERLINE UNION UNIQUE UNITS UNLOAD syn keyword fglKeyword UNLOCK UNSIGNED UP UPDATE UPSHIFT USER USING syn keyword fglKeyword VALIDATE VALUE VALUES VARCHAR VARIABLES VARIANCE VARYING syn keyword fglKeyword VERIFY VIEW VIOLATIONS syn keyword fglKeyword WAIT WAITING WARNING WEEKDAY WHEN WHENEVER WHERE WHILE WHITE syn keyword fglKeyword WINDOW WITH WITHOUT WORDWRAP WORK WRAP WRITE syn keyword fglKeyword YEAR YELLOW syn keyword fglKeyword ZEROFILL " Strings and characters: syn region fglString start=+"+ skip=+\\\\\|\\"+ end=+"+ syn region fglString start=+'+ skip=+\\\\\|\\"+ end=+'+ " Numbers: syn match fglNumber "-\=\<[0-9]*\.\=[0-9_]\>" " Comments: syn region fglComment start="{" end="}" syn match fglComment "--.*" syn match fglComment "#.*" " Not a comment even though it looks like one (Dynamic 4GL/FourJs directive) syn match fglSpecial "--#" syn match fglSpecial "--@" syn sync ccomment fglComment " 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_fgl_syntax_inits") if version < 508 let did_fgl_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink fglComment Comment "HiLink fglKeyword fglSpecial HiLink fglKeyword fglStatement HiLink fglNumber Number HiLink fglOperator fglStatement HiLink fglSpecial Special HiLink fglStatement Statement HiLink fglString String HiLink fglType Type delcommand HiLink endif let b:current_syntax = "fgl" " vim: ts=8
zyz2011-vim
runtime/syntax/fgl.vim
Vim Script
gpl2
7,663
" Vim syntax file " Language: GNU Arch inventory file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2007-06-17 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim setlocal iskeyword+=- syn keyword archTodo TODO FIXME XXX NOTE syn region archComment display start='^\%(#\|\s\)' end='$' \ contains=archTodo,@Spell syn match archBegin display '^' nextgroup=archKeyword,archComment syn keyword archKeyword contained implicit tagline explicit names syn keyword archKeyword contained untagged-source \ nextgroup=archTMethod skipwhite syn keyword archKeyword contained exclude junk backup precious unrecognized \ source nextgroup=archRegex skipwhite syn keyword archTMethod contained source precious backup junk unrecognized syn match archRegex contained '\s*\zs.*' hi def link archTodo Todo hi def link archComment Comment hi def link archKeyword Keyword hi def link archTMethod Type hi def link archRegex String let b:current_syntax = "arch" let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/syntax/arch.vim
Vim Script
gpl2
1,137
" Vim syntax file " Language: Rebol " Maintainer: Mike Williams <mrw@eandem.co.uk> " Filenames: *.r " Last Change: 27th June 2002 " URL: http://www.eandem.co.uk/mrw/vim " " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif " Rebol is case insensitive syn case ignore " As per current users documentation if version < 600 set isk=@,48-57,?,!,.,',+,-,*,&,\|,=,_,~ else setlocal isk=@,48-57,?,!,.,',+,-,*,&,\|,=,_,~ endif " Yer TODO highlighter syn keyword rebolTodo contained TODO " Comments syn match rebolComment ";.*$" contains=rebolTodo " Words syn match rebolWord "\a\k*" syn match rebolWordPath "[^[:space:]]/[^[:space]]"ms=s+1,me=e-1 " Booleans syn keyword rebolBoolean true false on off yes no " Values " Integers syn match rebolInteger "\<[+-]\=\d\+\('\d*\)*\>" " Decimals syn match rebolDecimal "[+-]\=\(\d\+\('\d*\)*\)\=[,.]\d*\(e[+-]\=\d\+\)\=" syn match rebolDecimal "[+-]\=\d\+\('\d*\)*\(e[+-]\=\d\+\)\=" " Time syn match rebolTime "[+-]\=\(\d\+\('\d*\)*\:\)\{1,2}\d\+\('\d*\)*\([.,]\d\+\)\=\([AP]M\)\=\>" syn match rebolTime "[+-]\=:\d\+\([.,]\d*\)\=\([AP]M\)\=\>" " Dates " DD-MMM-YY & YYYY format syn match rebolDate "\d\{1,2}\([/-]\)\(Jan\|Feb\|Mar\|Apr\|May\|Jun\|Jul\|Aug\|Sep\|Oct\|Nov\|Dec\)\1\(\d\{2}\)\{1,2}\>" " DD-month-YY & YYYY format syn match rebolDate "\d\{1,2}\([/-]\)\(January\|February\|March\|April\|May\|June\|July\|August\|September\|October\|November\|December\)\1\(\d\{2}\)\{1,2}\>" " DD-MM-YY & YY format syn match rebolDate "\d\{1,2}\([/-]\)\d\{1,2}\1\(\d\{2}\)\{1,2}\>" " YYYY-MM-YY format syn match rebolDate "\d\{4}-\d\{1,2}-\d\{1,2}\>" " DD.MM.YYYY format syn match rebolDate "\d\{1,2}\.\d\{1,2}\.\d\{4}\>" " Money syn match rebolMoney "\a*\$\d\+\('\d*\)*\([,.]\d\+\)\=" " Strings syn region rebolString oneline start=+"+ skip=+^"+ end=+"+ contains=rebolSpecialCharacter syn region rebolString start=+[^#]{+ end=+}+ skip=+{[^}]*}+ contains=rebolSpecialCharacter " Binary syn region rebolBinary start=+\d*#{+ end=+}+ contains=rebolComment " Email syn match rebolEmail "\<\k\+@\(\k\+\.\)*\k\+\>" " File syn match rebolFile "%\(\k\+/\)*\k\+[/]\=" contains=rebolSpecialCharacter syn region rebolFile oneline start=+%"+ end=+"+ contains=rebolSpecialCharacter " URLs syn match rebolURL "http://\k\+\(\.\k\+\)*\(:\d\+\)\=\(/\(\k\+/\)*\(\k\+\)\=\)*" syn match rebolURL "file://\k\+\(\.\k\+\)*/\(\k\+/\)*\k\+" syn match rebolURL "ftp://\(\k\+:\k\+@\)\=\k\+\(\.\k\+\)*\(:\d\+\)\=/\(\k\+/\)*\k\+" syn match rebolURL "mailto:\k\+\(\.\k\+\)*@\k\+\(\.\k\+\)*" " Issues syn match rebolIssue "#\(\d\+-\)*\d\+" " Tuples syn match rebolTuple "\(\d\+\.\)\{2,}" " Characters syn match rebolSpecialCharacter contained "\^[^[:space:][]" syn match rebolSpecialCharacter contained "%\d\+" " Operators " Math operators syn match rebolMathOperator "\(\*\{1,2}\|+\|-\|/\{1,2}\)" syn keyword rebolMathFunction abs absolute add arccosine arcsine arctangent cosine syn keyword rebolMathFunction divide exp log-10 log-2 log-e max maximum min syn keyword rebolMathFunction minimum multiply negate power random remainder sine syn keyword rebolMathFunction square-root subtract tangent " Binary operators syn keyword rebolBinaryOperator complement and or xor ~ " Logic operators syn match rebolLogicOperator "[<>=]=\=" syn match rebolLogicOperator "<>" syn keyword rebolLogicOperator not syn keyword rebolLogicFunction all any syn keyword rebolLogicFunction head? tail? syn keyword rebolLogicFunction negative? positive? zero? even? odd? syn keyword rebolLogicFunction binary? block? char? date? decimal? email? empty? syn keyword rebolLogicFunction file? found? function? integer? issue? logic? money? syn keyword rebolLogicFunction native? none? object? paren? path? port? series? syn keyword rebolLogicFunction string? time? tuple? url? word? syn keyword rebolLogicFunction exists? input? same? value? " Datatypes syn keyword rebolType binary! block! char! date! decimal! email! file! syn keyword rebolType function! integer! issue! logic! money! native! syn keyword rebolType none! object! paren! path! port! string! time! syn keyword rebolType tuple! url! word! syn keyword rebolTypeFunction type? " Control statements syn keyword rebolStatement break catch exit halt reduce return shield syn keyword rebolConditional if else syn keyword rebolRepeat for forall foreach forskip loop repeat while until do " Series statements syn keyword rebolStatement change clear copy fifth find first format fourth free syn keyword rebolStatement func function head insert last match next parse past syn keyword rebolStatement pick remove second select skip sort tail third trim length? " Context syn keyword rebolStatement alias bind use " Object syn keyword rebolStatement import make make-object rebol info? " I/O statements syn keyword rebolStatement delete echo form format import input load mold prin syn keyword rebolStatement print probe read save secure send write syn keyword rebolOperator size? modified? " Debug statement syn keyword rebolStatement help probe trace " Misc statements syn keyword rebolStatement func function free " Constants syn keyword rebolConstant none " 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_rebol_syntax_inits") if version < 508 let did_rebol_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink rebolTodo Todo HiLink rebolStatement Statement HiLink rebolLabel Label HiLink rebolConditional Conditional HiLink rebolRepeat Repeat HiLink rebolOperator Operator HiLink rebolLogicOperator rebolOperator HiLink rebolLogicFunction rebolLogicOperator HiLink rebolMathOperator rebolOperator HiLink rebolMathFunction rebolMathOperator HiLink rebolBinaryOperator rebolOperator HiLink rebolBinaryFunction rebolBinaryOperator HiLink rebolType Type HiLink rebolTypeFunction rebolOperator HiLink rebolWord Identifier HiLink rebolWordPath rebolWord HiLink rebolFunction Function HiLink rebolCharacter Character HiLink rebolSpecialCharacter SpecialChar HiLink rebolString String HiLink rebolNumber Number HiLink rebolInteger rebolNumber HiLink rebolDecimal rebolNumber HiLink rebolTime rebolNumber HiLink rebolDate rebolNumber HiLink rebolMoney rebolNumber HiLink rebolBinary rebolNumber HiLink rebolEmail rebolString HiLink rebolFile rebolString HiLink rebolURL rebolString HiLink rebolIssue rebolNumber HiLink rebolTuple rebolNumber HiLink rebolFloat Float HiLink rebolBoolean Boolean HiLink rebolConstant Constant HiLink rebolComment Comment HiLink rebolError Error delcommand HiLink endif if exists("my_rebol_file") if file_readable(expand(my_rebol_file)) execute "source " . my_rebol_file endif endif let b:current_syntax = "rebol" " vim: ts=8
zyz2011-vim
runtime/syntax/rebol.vim
Vim Script
gpl2
7,549
" Vim syntax file " Language: SQL*Forms (Oracle 7), based on sql.vim (vim5.0) " Maintainer: Austin Ziegler (austin@halostatue.ca) " Last Change: 2003 May 11 " Prev Change: 19980710 " URL: http://www.halostatue.ca/vim/syntax/proc.vim " " TODO Find a new maintainer who knows SQL*Forms. " For version 5.x, clear all syntax items. " For version 6.x, quit when a syntax file was already loaded. if version < 600 syntax clear elseif exists("b:current_syntax") finish endif syntax case ignore if version >= 600 setlocal iskeyword=a-z,A-Z,48-57,_,.,-,> else set iskeyword=a-z,A-Z,48-57,_,.,-,> endif " The SQL reserved words, defined as keywords. syntax match sqlTriggers /on-.*$/ syntax match sqlTriggers /key-.*$/ syntax match sqlTriggers /post-.*$/ syntax match sqlTriggers /pre-.*$/ syntax match sqlTriggers /user-.*$/ syntax keyword sqlSpecial null false true syntax keyword sqlProcedure abort_query anchor_view bell block_menu break call syntax keyword sqlProcedure call_input call_query clear_block clear_eol syntax keyword sqlProcedure clear_field clear_form clear_record commit_form syntax keyword sqlProcedure copy count_query create_record default_value syntax keyword sqlProcedure delete_record display_error display_field down syntax keyword sqlProcedure duplicate_field duplicate_record edit_field syntax keyword sqlProcedure enter enter_query erase execute_query syntax keyword sqlProcedure execute_trigger exit_form first_Record go_block syntax keyword sqlProcedure go_field go_record help hide_menu hide_page host syntax keyword sqlProcedure last_record list_values lock_record message syntax keyword sqlProcedure move_view new_form next_block next_field next_key syntax keyword sqlProcedure next_record next_set pause post previous_block syntax keyword sqlProcedure previous_field previous_record print redisplay syntax keyword sqlProcedure replace_menu resize_view scroll_down scroll_up syntax keyword sqlProcedure set_field show_keys show_menu show_page syntax keyword sqlProcedure synchronize up user_exit syntax keyword sqlFunction block_characteristic error_code error_text syntax keyword sqlFunction error_type field_characteristic form_failure syntax keyword sqlFunction form_fatal form_success name_in syntax keyword sqlParameters hide no_hide replace no_replace ask_commit syntax keyword sqlParameters do_commit no_commit no_validate all_records syntax keyword sqlParameters for_update no_restrict restrict no_screen syntax keyword sqlParameters bar full_screen pull_down auto_help auto_skip syntax keyword sqlParameters fixed_length enterable required echo queryable syntax keyword sqlParameters updateable update_null upper_case attr_on syntax keyword sqlParameters attr_off base_table first_field last_field syntax keyword sqlParameters datatype displayed display_length field_length syntax keyword sqlParameters list page primary_key query_length x_pos y_pos syntax match sqlSystem /system\.block_status/ syntax match sqlSystem /system\.current_block/ syntax match sqlSystem /system\.current_field/ syntax match sqlSystem /system\.current_form/ syntax match sqlSystem /system\.current_value/ syntax match sqlSystem /system\.cursor_block/ syntax match sqlSystem /system\.cursor_field/ syntax match sqlSystem /system\.cursor_record/ syntax match sqlSystem /system\.cursor_value/ syntax match sqlSystem /system\.form_status/ syntax match sqlSystem /system\.last_query/ syntax match sqlSystem /system\.last_record/ syntax match sqlSystem /system\.message_level/ syntax match sqlSystem /system\.record_status/ syntax match sqlSystem /system\.trigger_block/ syntax match sqlSystem /system\.trigger_field/ syntax match sqlSystem /system\.trigger_record/ syntax match sqlSystem /\$\$date\$\$/ syntax match sqlSystem /\$\$time\$\$/ syntax keyword sqlKeyword accept access add as asc by check cluster column syntax keyword sqlKeyword compress connect current decimal default syntax keyword sqlKeyword desc exclusive file for from group syntax keyword sqlKeyword having identified immediate increment index syntax keyword sqlKeyword initial into is level maxextents mode modify syntax keyword sqlKeyword nocompress nowait of offline on online start syntax keyword sqlKeyword successful synonym table to trigger uid syntax keyword sqlKeyword unique user validate values view whenever syntax keyword sqlKeyword where with option order pctfree privileges syntax keyword sqlKeyword public resource row rowlabel rownum rows syntax keyword sqlKeyword session share size smallint sql\*forms_version syntax keyword sqlKeyword terse define form name title procedure begin syntax keyword sqlKeyword default_menu_application trigger block field syntax keyword sqlKeyword enddefine declare exception raise when cursor syntax keyword sqlKeyword definition base_table pragma syntax keyword sqlKeyword column_name global trigger_type text description syntax match sqlKeyword "<<<" syntax match sqlKeyword ">>>" syntax keyword sqlOperator not and or out to_number to_date message erase syntax keyword sqlOperator in any some all between exists substr nvl syntax keyword sqlOperator exception_init syntax keyword sqlOperator like escape trunc lpad rpad sum syntax keyword sqlOperator union intersect minus to_char greatest syntax keyword sqlOperator prior distinct decode least avg syntax keyword sqlOperator sysdate true false field_characteristic syntax keyword sqlOperator display_field call host syntax keyword sqlStatement alter analyze audit comment commit create syntax keyword sqlStatement delete drop explain grant insert lock noaudit syntax keyword sqlStatement rename revoke rollback savepoint select set syntax keyword sqlStatement truncate update if elsif loop then syntax keyword sqlStatement open fetch close else end syntax keyword sqlType char character date long raw mlslabel number rowid syntax keyword sqlType varchar varchar2 float integer boolean global syntax keyword sqlCodes sqlcode no_data_found too_many_rows others syntax keyword sqlCodes form_trigger_failure notfound found syntax keyword sqlCodes validate no_commit " Comments: syntax region sqlComment start="/\*" end="\*/" syntax match sqlComment "--.*" " Strings and characters: syntax region sqlString start=+"+ skip=+\\\\\|\\"+ end=+"+ syntax region sqlString start=+'+ skip=+\\\\\|\\"+ end=+'+ " Numbers: syntax match sqlNumber "-\=\<[0-9]*\.\=[0-9_]\>" syntax sync ccomment sqlComment if version >= 508 || !exists("did_sqlforms_syn_inits") if version < 508 let did_sqlforms_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink sqlComment Comment HiLink sqlKeyword Statement HiLink sqlNumber Number HiLink sqlOperator Statement HiLink sqlProcedure Statement HiLink sqlFunction Statement HiLink sqlSystem Identifier HiLink sqlSpecial Special HiLink sqlStatement Statement HiLink sqlString String HiLink sqlType Type HiLink sqlCodes Identifier HiLink sqlTriggers PreProc delcommand HiLink endif let b:current_syntax = "sqlforms" " vim: ts=8 sw=4
zyz2011-vim
runtime/syntax/sqlforms.vim
Vim Script
gpl2
7,136
" Vim syntax file " Language: R (GNU S) " Maintainer: Jakson Aquino <jalvesaq@gmail.com> " Former Maintainers: Vaidotas Zemlys <zemlys@gmail.com> " Tom Payne <tom@tompayne.org> " Last Change: Sun Feb 20, 2011 12:06PM " Filenames: *.R *.r *.Rhistory *.Rt " " NOTE: The highlighting of R functions is defined in the " r-plugin/functions.vim, which is part of vim-r-plugin2: " http://www.vim.org/scripts/script.php?script_id=2628 " " CONFIGURATION: " syntax folding can be turned on by " " let r_syntax_folding = 1 " " Some lines of code were borrowed from Zhuojun Chen. if exists("b:current_syntax") finish endif setlocal iskeyword=@,48-57,_,. if exists("g:r_syntax_folding") setlocal foldmethod=syntax endif syn case match " Comment syn match rComment contains=@Spell "\#.*" if &filetype == "rhelp" " string enclosed in double quotes syn region rString contains=rSpecial,@Spell start=/"/ skip=/\\\\\|\\"/ end=/"/ " string enclosed in single quotes syn region rString contains=rSpecial,@Spell start=/'/ skip=/\\\\\|\\'/ end=/'/ else " string enclosed in double quotes syn region rString contains=rSpecial,rStrError,@Spell start=/"/ skip=/\\\\\|\\"/ end=/"/ " string enclosed in single quotes syn region rString contains=rSpecial,rStrError,@Spell start=/'/ skip=/\\\\\|\\'/ end=/'/ endif syn match rStrError display contained "\\." " New line, carriage return, tab, backspace, bell, feed, vertical tab, backslash syn match rSpecial display contained "\\\(n\|r\|t\|b\|a\|f\|v\|'\|\"\)\|\\\\" " Hexadecimal and Octal digits syn match rSpecial display contained "\\\(x\x\{1,2}\|[0-8]\{1,3}\)" " Unicode characters syn match rSpecial display contained "\\u\x\{1,4}" syn match rSpecial display contained "\\U\x\{1,8}" syn match rSpecial display contained "\\u{\x\{1,4}}" syn match rSpecial display contained "\\U{\x\{1,8}}" " Statement syn keyword rStatement break next return syn keyword rConditional if else syn keyword rRepeat for in repeat while " Constant (not really) syn keyword rConstant T F LETTERS letters month.ab month.name pi syn keyword rConstant R.version.string syn keyword rNumber NA_integer_ NA_real_ NA_complex_ NA_character_ " Constants syn keyword rConstant NULL syn keyword rBoolean FALSE TRUE syn keyword rNumber NA Inf NaN " integer syn match rInteger "\<\d\+L" syn match rInteger "\<0x\([0-9]\|[a-f]\|[A-F]\)\+L" syn match rInteger "\<\d\+[Ee]+\=\d\+L" " number with no fractional part or exponent syn match rNumber "\<\d\+\>" " hexadecimal number syn match rNumber "\<0x\([0-9]\|[a-f]\|[A-F]\)\+" " floating point number with integer and fractional parts and optional exponent syn match rFloat "\<\d\+\.\d*\([Ee][-+]\=\d\+\)\=" " floating point number with no integer part and optional exponent syn match rFloat "\<\.\d\+\([Ee][-+]\=\d\+\)\=" " floating point number with no fractional part and optional exponent syn match rFloat "\<\d\+[Ee][-+]\=\d\+" " complex number syn match rComplex "\<\d\+i" syn match rComplex "\<\d\++\d\+i" syn match rComplex "\<0x\([0-9]\|[a-f]\|[A-F]\)\+i" syn match rComplex "\<\d\+\.\d*\([Ee][-+]\=\d\+\)\=i" syn match rComplex "\<\.\d\+\([Ee][-+]\=\d\+\)\=i" syn match rComplex "\<\d\+[Ee][-+]\=\d\+i" syn match rOperator "&" syn match rOperator '-' syn match rOperator '*' syn match rOperator '+' syn match rOperator '=' syn match rOperator "[|!<>^~`/:@]" syn match rOperator "%\{2}\|%\*%\|%\/%\|%in%\|%o%\|%x%" syn match rOpError '*\{3}' syn match rOpError '//' syn match rOpError '&&&' syn match rOpError '|||' syn match rOpError '<<' syn match rOpError '>>' syn match rArrow "<\{1,2}-" syn match rArrow "->\{1,2}" " Special syn match rDelimiter "[,;:]" " Error if exists("g:r_syntax_folding") syn region rRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError fold syn region rRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError fold syn region rRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError fold else syn region rRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError syn region rRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError syn region rRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError endif syn match rError "[)\]}]" syn match rBraceError "[)}]" contained syn match rCurlyError "[)\]]" contained syn match rParenError "[\]}]" contained " Source list of R functions. The list is produced by the Vim-R-plugin " http://www.vim.org/scripts/script.php?script_id=2628 runtime r-plugin/functions.vim syn match rDollar display contained "\$" " List elements will not be highlighted as functions: syn match rLstElmt "\$[a-zA-Z0-9\\._]*" contains=rDollar " Functions that may add new objects syn keyword rPreProc library require attach detach source if &filetype == "rhelp" syn match rHelpIdent '\\method' syn match rHelpIdent '\\S4method' endif " Type syn keyword rType array category character complex double function integer list logical matrix numeric vector data.frame " Name of object with spaces syn region rNameWSpace start="`" end="`" if &filetype == "rhelp" syn match rhPreProc "^#ifdef.*" syn match rhPreProc "^#endif.*" syn match rhSection "\\dontrun\>" endif " Define the default highlighting. hi def link rArrow Statement hi def link rBoolean Boolean hi def link rBraceError Error hi def link rComment Comment hi def link rComplex Number hi def link rConditional Conditional hi def link rConstant Constant hi def link rCurlyError Error hi def link rDelimiter Delimiter hi def link rDollar SpecialChar hi def link rError Error hi def link rFloat Float hi def link rFunction Function hi def link rHelpIdent Identifier hi def link rhPreProc PreProc hi def link rhSection PreCondit hi def link rInteger Number hi def link rLstElmt Normal hi def link rNameWSpace Normal hi def link rNumber Number hi def link rOperator Operator hi def link rOpError Error hi def link rParenError Error hi def link rPreProc PreProc hi def link rRepeat Repeat hi def link rSpecial SpecialChar hi def link rStatement Statement hi def link rString String hi def link rStrError Error hi def link rType Type let b:current_syntax="r" " vim: ts=8 sw=2
zyz2011-vim
runtime/syntax/r.vim
Vim Script
gpl2
6,716
" Vim syntax file " Language: PL/M " Maintainer: Philippe Coulonges <cphil@cphil.net> " Last change: 2003 May 11 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif " PL/M is a case insensitive language syn case ignore syn keyword plmTodo contained TODO FIXME XXX " String syn region plmString start=+'+ end=+'+ syn match plmOperator "[@=\+\-\*\/\<\>]" syn match plmIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>" syn match plmDelimiter "[();,]" syn region plmPreProc start="^\s*\$\s*" skip="\\$" end="$" " FIXME : No Number support for floats, as I'm working on an embedded " project that doesn't use any. syn match plmNumber "-\=\<\d\+\>" syn match plmNumber "\<[0-9a-fA-F]*[hH]*\>" " If you don't like tabs "syn match plmShowTab "\t" "syn match plmShowTabc "\t" "when wanted, highlight trailing white space if exists("c_space_errors") syn match plmSpaceError "\s*$" syn match plmSpaceError " \+\t"me=e-1 endif " " Use the same control variable as C language for I believe " users will want the same behavior if exists("c_comment_strings") " FIXME : don't work fine with c_comment_strings set, " which I don't care as I don't use " A comment can contain plmString, plmCharacter and plmNumber. " But a "*/" inside a plmString in a plmComment DOES end the comment! So we " need to use a special type of plmString: plmCommentString, which also ends on " "*/", and sees a "*" at the start of the line as comment again. syntax match plmCommentSkip contained "^\s*\*\($\|\s\+\)" syntax region plmCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=plmSpecial,plmCommentSkip syntax region plmComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=plmSpecial syntax region plmComment start="/\*" end="\*/" contains=plmTodo,plmCommentString,plmCharacter,plmNumber,plmFloat,plmSpaceError syntax match plmComment "//.*" contains=plmTodo,plmComment2String,plmCharacter,plmNumber,plmSpaceError else syn region plmComment start="/\*" end="\*/" contains=plmTodo,plmSpaceError syn match plmComment "//.*" contains=plmTodo,plmSpaceError endif syntax match plmCommentError "\*/" syn keyword plmReserved ADDRESS AND AT BASED BY BYTE CALL CASE syn keyword plmReserved DATA DECLARE DISABLE DO DWORD syn keyword plmReserved ELSE ENABLE END EOF EXTERNAL syn keyword plmReserved GO GOTO HALT IF INITIAL INTEGER INTERRUPT syn keyword plmReserved LABEL LITERALLY MINUS MOD NOT OR syn keyword plmReserved PLUS POINTER PROCEDURE PUBLIC syn keyword plmReserved REAL REENTRANT RETURN SELECTOR STRUCTURE syn keyword plmReserved THEN TO WHILE WORD XOR syn keyword plm386Reserved CHARINT HWORD LONGINT OFFSET QWORD SHORTINT syn keyword plmBuiltIn ABS ADJUSTRPL BLOCKINPUT BLOCKINWORD BLOCKOUTPUT syn keyword plmBuiltIn BLOCKOUTWORD BUILPTR CARRY CAUSEINTERRUPT CMPB syn keyword plmBuiltIn CMPW DEC DOUBLE FINDB FINDRB FINDRW FINDW FIX syn keyword plmBuiltIn FLAGS FLOAT GETREALERROR HIGH IABS INITREALMATHUNIT syn keyword plmBuiltIn INPUT INT INWORD LAST LOCKSET LENGTH LOW MOVB MOVE syn keyword plmBuiltIn MOVRB MOVRW MOVW NIL OUTPUT OUTWORD RESTOREREALSTATUS syn keyword plmBuiltIn ROL ROR SAL SAVEREALSTATUS SCL SCR SELECTOROF SETB syn keyword plmBuiltIn SETREALMODE SETW SHL SHR SIGN SIGNED SIZE SKIPB syn keyword plmBuiltIn SKIPRB SKIPRW SKIPW STACKBASE STACKPTR TIME SIZE syn keyword plmBuiltIn UNSIGN XLAT ZERO syn keyword plm386BuiltIn INTERRUPT SETINTERRUPT syn keyword plm286BuiltIn CLEARTASKSWITCHEDFLAG GETACCESSRIGHTS syn keyword plm286BuiltIn GETSEGMENTLIMIT LOCALTABLE MACHINESTATUS syn keyword plm286BuiltIn OFFSETOF PARITY RESTOREGLOBALTABLE syn keyword plm286BuiltIn RESTOREINTERRUPTTABLE SAVEGLOBALTABLE syn keyword plm286BuiltIn SAVEINTERRUPTTABLE SEGMENTREADABLE syn keyword plm286BuiltIn SEGMENTWRITABLE TASKREGISTER WAITFORINTERRUPT syn keyword plm386BuiltIn CONTROLREGISTER DEBUGREGISTER FINDHW syn keyword plm386BuiltIn FINDRHW INHWORD MOVBIT MOVRBIT MOVHW MOVRHW syn keyword plm386BuiltIn OUTHWORD SCANBIT SCANRBIT SETHW SHLD SHRD syn keyword plm386BuiltIn SKIPHW SKIPRHW TESTREGISTER syn keyword plm386w16BuiltIn BLOCKINDWORD BLOCKOUTDWORD CMPD FINDD syn keyword plm386w16BuiltIn FINDRD INDWORD MOVD MOVRD OUTDWORD syn keyword plm386w16BuiltIn SETD SKIPD SKIPRD syn sync lines=50 " 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_plm_syntax_inits") if version < 508 let did_plm_syntax_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 plmLabel Label " HiLink plmConditional Conditional " HiLink plmRepeat Repeat HiLink plmTodo Todo HiLink plmNumber Number HiLink plmOperator Operator HiLink plmDelimiter Operator "HiLink plmShowTab Error "HiLink plmShowTabc Error HiLink plmIdentifier Identifier HiLink plmBuiltIn Statement HiLink plm286BuiltIn Statement HiLink plm386BuiltIn Statement HiLink plm386w16BuiltIn Statement HiLink plmReserved Statement HiLink plm386Reserved Statement HiLink plmPreProc PreProc HiLink plmCommentError plmError HiLink plmCommentString plmString HiLink plmComment2String plmString HiLink plmCommentSkip plmComment HiLink plmString String HiLink plmComment Comment delcommand HiLink endif let b:current_syntax = "plm" " vim: ts=8 sw=2
zyz2011-vim
runtime/syntax/plm.vim
Vim Script
gpl2
5,703
" Vim syntax file " Language: Eviews (http://www.eviews.com) " Maintainer: Vaidotas Zemlys <zemlys@gmail.com> " Last Change: 2006 Apr 30 " Filenames: *.prg " URL: http://uosis.mif.vu.lt/~zemlys/vim-syntax/eviews.vim " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif if version >= 600 setlocal iskeyword=@,48-57,_,. else set iskeyword=@,48-57,_,. endif syn case match " Comment syn match eComment /\'.*/ " Constant " string enclosed in double quotes syn region eString start=/"/ skip=/\\\\\|\\"/ end=/"/ " number with no fractional part or exponent syn match eNumber /\d\+/ " floating point number with integer and fractional parts and optional exponent syn match eFloat /\d\+\.\d*\([Ee][-+]\=\d\+\)\=/ " floating point number with no integer part and optional exponent syn match eFloat /\.\d\+\([Ee][-+]\=\d\+\)\=/ " floating point number with no fractional part and optional exponent syn match eFloat /\d\+[Ee][-+]\=\d\+/ " Identifier " identifier with leading letter and optional following keyword characters syn match eIdentifier /\a\k*/ " Eviews Programing Language syn keyword eProgLang @date else endif @errorcount @evpath exitloop for if @isobject next poff pon return statusline step stop @temppath then @time to @toc wend while include call subroutine endsub and or " Eviews Objects, Views and Procedures syn keyword eOVP alpha coef equation graph group link logl matrix model pool rowvector sample scalar series sspace sym system table text valmap var vector " Standard Eviews Commands syn keyword eStdCmd 3sls add addassign addinit addtext align alpha append arch archtest area arlm arma arroots auto axis bar bdstest binary block boxplot boxplotby bplabel cause ccopy cd cdfplot cellipse censored cfetch checkderivs chow clabel cleartext close coef coefcov coint comment control copy cor correl correlsq count cov create cross data datelabel dates db dbcopy dbcreate dbdelete dbopen dbpack dbrebuild dbrename dbrepair decomp define delete derivs describe displayname do draw driconvert drop dtable ec edftest endog eqs equation errbar exclude exit expand fetch fill fiml fit forecast freeze freq frml garch genr gmm grads graph group hconvert hfetch hilo hist hlabel hpf impulse jbera kdensity kerfit label laglen legend line linefit link linkto load logit logl ls makecoint makederivs makeendog makefilter makegarch makegrads makegraph makegroup makelimits makemodel makeregs makeresids makesignals makestates makestats makesystem map matrix means merge metafile ml model msg name nnfit open options ordered output override pageappend pagecontract pagecopy pagecreate pagedelete pageload pagerename pagesave pageselect pagestack pagestruct pageunstack param pcomp pie pool predict print probit program qqplot qstats range read rename representations resample reset residcor residcov resids results rls rndint rndseed rowvector run sample save scalar scale scat scatmat scenario seas seasplot series set setbpelem setcell setcolwidth setconvert setelem setfillcolor setfont setformat setheight setindent setjust setline setlines setmerge settextcolor setwidth sheet show signalgraphs smooth smpl solve solveopt sort spec spike sspace statby statefinal stategraphs stateinit stats statusline stomna store structure sur svar sym system table template testadd testbtw testby testdrop testexog testfit testlags teststat text tic toc trace tramoseats tsls unlink update updatecoefs uroot usage valmap var vars vector wald wfcreate wfopen wfsave wfselect white wls workfile write wtsls x11 x12 xy xyline xypair " Constant Identifier syn match eConstant /\!\k*/ " String Identifier syn match eStringId /%\k*/ " Command Identifier syn match eCommand /@\k*/ " Special syn match eDelimiter /[,;:]/ " Error syn region eRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError syn region eRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError syn region eRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError syn match eError /[)\]}]/ syn match eBraceError /[)}]/ contained syn match eCurlyError /[)\]]/ contained syn match eParenError /[\]}]/ contained " 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_r_syn_inits") if version < 508 let did_r_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink eComment Comment HiLink eConstant Identifier HiLink eStringId Identifier HiLink eCommand Type HiLink eString String HiLink eNumber Number HiLink eBoolean Boolean HiLink eFloat Float HiLink eConditional Conditional HiLink eProgLang Statement HiLink eOVP Statement HiLink eStdCmd Statement HiLink eIdentifier Normal HiLink eDelimiter Delimiter HiLink eError Error HiLink eBraceError Error HiLink eCurlyError Error HiLink eParenError Error delcommand HiLink endif let b:current_syntax="eviews" " vim: ts=8 sw=2
zyz2011-vim
runtime/syntax/eviews.vim
Vim Script
gpl2
5,415
" Vim syntax file " Language: nanorc(5) - GNU nano configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword nanorcTodo contained TODO FIXME XXX NOTE syn region nanorcComment display oneline start='^\s*#' end='$' \ contains=nanorcTodo,@Spell syn match nanorcBegin display '^' \ nextgroup=nanorcKeyword,nanorcComment \ skipwhite syn keyword nanorcKeyword contained set unset \ nextgroup=nanorcBoolOption, \ nanorcStringOption,nanorcNumberOption \ skipwhite syn keyword nanorcKeyword contained syntax \ nextgroup=nanorcSynGroupName skipwhite syn keyword nanorcKeyword contained color \ nextgroup=@nanorcFGColor skipwhite syn keyword nanorcBoolOption contained autoindent backup const cut \ historylog morespace mouse multibuffer \ noconvert nofollow nohelp nowrap preserve \ rebinddelete regexp smarthome smooth suspend \ tempfile view syn keyword nanorcStringOption contained backupdir brackets operatingdir \ punct quotestr speller whitespace \ nextgroup=nanorcString skipwhite syn keyword nanorcNumberOption contained fill tabsize \ nextgroup=nanorcNumber skipwhite syn region nanorcSynGroupName contained display oneline start=+"+ \ end=+"\ze\%([[:blank:]]\|$\)+ \ nextgroup=nanorcRegexes skipwhite syn match nanorcString contained display '".*"' syn region nanorcRegexes contained display oneline start=+"+ \ end=+"\ze\%([[:blank:]]\|$\)+ \ nextgroup=nanorcRegexes skipwhite syn match nanorcNumber contained display '[+-]\=\<\d\+\>' syn cluster nanorcFGColor contains=nanorcFGWhite,nanorcFGBlack, \ nanorcFGRed,nanorcFGBlue,nanorcFGGreen, \ nanorcFGYellow,nanorcFGMagenta,nanorcFGCyan, \ nanorcFGBWhite,nanorcFGBBlack,nanorcFGBRed, \ nanorcFGBBlue,nanorcFGBGreen,nanorcFGBYellow, \ nanorcFGBMagenta,nanorcFGBCyan syn keyword nanorcFGWhite contained white \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGBlack contained black \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGRed contained red \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGBlue contained blue \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGGreen contained green \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGYellow contained yellow \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGMagenta contained magenta \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGCyan contained cyan \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGBWhite contained brightwhite \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGBBlack contained brightblack \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGBRed contained brightred \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGBBlue contained brightblue \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGBGreen contained brightgreen \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGBYellow contained brightyellow \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGBMagenta contained brightmagenta \ nextgroup=@nanorcFGSpec skipwhite syn keyword nanorcFGBCyan contained brightcyan \ nextgroup=@nanorcFGSpec skipwhite syn cluster nanorcBGColor contains=nanorcBGWhite,nanorcBGBlack, \ nanorcBGRed,nanorcBGBlue,nanorcBGGreen, \ nanorcBGYellow,nanorcBGMagenta,nanorcBGCyan, \ nanorcBGBWhite,nanorcBGBBlack,nanorcBGBRed, \ nanorcBGBBlue,nanorcBGBGreen,nanorcBGBYellow, \ nanorcBGBMagenta,nanorcBGBCyan syn keyword nanorcBGWhite contained white \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGBlack contained black \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGRed contained red \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGBlue contained blue \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGGreen contained green \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGYellow contained yellow \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGMagenta contained magenta \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGCyan contained cyan \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGBWhite contained brightwhite \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGBBlack contained brightblack \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGBRed contained brightred \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGBBlue contained brightblue \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGBGreen contained brightgreen \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGBYellow contained brightyellow \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGBMagenta contained brightmagenta \ nextgroup=@nanorcBGSpec skipwhite syn keyword nanorcBGBCyan contained brightcyan \ nextgroup=@nanorcBGSpec skipwhite syn match nanorcBGColorSep contained ',' nextgroup=@nanorcBGColor syn cluster nanorcFGSpec contains=nanorcBGColorSep,nanorcRegexes, \ nanorcStartRegion syn cluster nanorcBGSpec contains=nanorcRegexes,nanorcStartRegion syn keyword nanorcStartRegion contained start nextgroup=nanorcStartRegionEq syn match nanorcStartRegionEq contained '=' nextgroup=nanorcRegion syn region nanorcRegion contained display oneline start=+"+ \ end=+"\ze\%([[:blank:]]\|$\)+ \ nextgroup=nanorcEndRegion skipwhite syn keyword nanorcEndRegion contained end nextgroup=nanorcStartRegionEq syn match nanorcEndRegionEq contained '=' nextgroup=nanorcRegex syn region nanorcRegex contained display oneline start=+"+ \ end=+"\ze\%([[:blank:]]\|$\)+ hi def link nanorcTodo Todo hi def link nanorcComment Comment hi def link nanorcKeyword Keyword hi def link nanorcBoolOption Identifier hi def link nanorcStringOption Identifier hi def link nanorcNumberOption Identifier hi def link nanorcSynGroupName String hi def link nanorcString String hi def link nanorcRegexes nanorcString hi def link nanorcNumber Number hi def nanorcFGWhite ctermfg=Gray guifg=Gray hi def nanorcFGBlack ctermfg=Black guifg=Black hi def nanorcFGRed ctermfg=DarkRed guifg=DarkRed hi def nanorcFGBlue ctermfg=DarkBlue guifg=DarkBlue hi def nanorcFGGreen ctermfg=DarkGreen guifg=DarkGreen hi def nanorcFGYellow ctermfg=Brown guifg=Brown hi def nanorcFGMagenta ctermfg=DarkMagenta guifg=DarkMagenta hi def nanorcFGCyan ctermfg=DarkCyan guifg=DarkCyan hi def nanorcFGBWhite ctermfg=White guifg=White hi def nanorcFGBBlack ctermfg=DarkGray guifg=DarkGray hi def nanorcFGBRed ctermfg=Red guifg=Red hi def nanorcFGBBlue ctermfg=Blue guifg=Blue hi def nanorcFGBGreen ctermfg=Green guifg=Green hi def nanorcFGBYellow ctermfg=Yellow guifg=Yellow hi def nanorcFGBMagenta ctermfg=Magenta guifg=Magenta hi def nanorcFGBCyan ctermfg=Cyan guifg=Cyan hi def link nanorcBGColorSep Normal hi def nanorcBGWhite ctermbg=Gray guibg=Gray hi def nanorcBGBlack ctermbg=Black guibg=Black hi def nanorcBGRed ctermbg=DarkRed guibg=DarkRed hi def nanorcBGBlue ctermbg=DarkBlue guibg=DarkBlue hi def nanorcBGGreen ctermbg=DarkGreen guibg=DarkGreen hi def nanorcBGYellow ctermbg=Brown guibg=Brown hi def nanorcBGMagenta ctermbg=DarkMagenta guibg=DarkMagenta hi def nanorcBGCyan ctermbg=DarkCyan guibg=DarkCyan hi def nanorcBGBWhite ctermbg=White guibg=White hi def nanorcBGBBlack ctermbg=DarkGray guibg=DarkGray hi def nanorcBGBRed ctermbg=Red guibg=Red hi def nanorcBGBBlue ctermbg=Blue guibg=Blue hi def nanorcBGBGreen ctermbg=Green guibg=Green hi def nanorcBGBYellow ctermbg=Yellow guibg=Yellow hi def nanorcBGBMagenta ctermbg=Magenta guibg=Magenta hi def nanorcBGBCyan ctermbg=Cyan guibg=Cyan hi def link nanorcStartRegion Type hi def link nanorcStartRegionEq Operator hi def link nanorcRegion nanorcString hi def link nanorcEndRegion Type hi def link nanorcEndRegionEq Operator hi def link nanorcRegex nanoRegexes let b:current_syntax = "nanorc" let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/syntax/nanorc.vim
Vim Script
gpl2
10,608
" Vim syntax file " Language: Focus Executable " Maintainer: Rob Brady <robb@datatone.com> " Last Change: $Date: 2004/06/13 15:38:04 $ " URL: http://www.datatone.com/~robb/vim/syntax/focexec.vim " $Revision: 1.1 $ " this is a very simple syntax file - I will be improving it " one thing is how to do computes " I don't like that &vars and FUSE() functions highlight to the same color " I think some of these things should get different hilights - " should MODIFY commands look different than TABLE? " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif syn case match " A bunch of useful keywords syn keyword focexecTable TABLE SUM BY ACROSS END PRINT HOLD LIST NOPRINT syn keyword focexecTable SUBFOOT SUBHEAD HEADING FOOTING PAGE-BREAK AS syn keyword focexecTable WHERE AND OR NOSPLIT FORMAT syn keyword focexecModify MODIFY DATA ON FIXFORM PROMPT MATCH COMPUTE syn keyword focexecModify GOTO CASE ENDCASE TYPE NOMATCH REJECT INCLUDE syn keyword focexecModify CONTINUE FROM syn keyword focexecNormal CHECK FILE CREATE EX SET IF FILEDEF DEFINE syn keyword focexecNormal REBUILD IF RECORDLIMIT FI EQ JOIN syn keyword focexecJoin IN TO syn keyword focexecFileDef DISK syn keyword focexecSet MSG ALL syn match focexecDash "-RUN" syn match focexecDash "-PROMPT" syn match focexecDash "-WINFORM" " String and Character constants syn region focexecString1 start=+"+ end=+"+ syn region focexecString2 start=+'+ end=+'+ "amper variables syn match focexecAmperVar "&&\=[A-Z_]\+" "fuse functions syn keyword focexecFuse GETUSER GETUSR WHOAMI FEXERR ASIS GETTOK UPCASE LOCASE syn keyword focexecFuse SUBSTR TODAY TODAYI POSIT HHMMSS BYTVAL EDAUT1 BITVAL syn keyword focexecFuse BITSON FGETENV FPUTENV HEXBYT SPAWN YM YMI JULDAT syn keyword focexecFuse JULDATI DOWK DOWKI DOWKLI CHGDAT CHGDATI FTOA ATODBL syn keyword focexecFuse SOUNDEX RJUST REVERSE PARAG OVRLAY LJUST CTRFLD CTRAN syn keyword focexecFuse CHKFMT ARGLEN GREGDT GREGDTI DTYMD DTYMDI DTDMY DTDMYI syn keyword focexecFuse DTYDM DTYDMI DTMYD DTMYDI DTDYM DTDYMI DAYMD DAYMDI syn keyword focexecFuse DAMDY DAMDYI DADMY DADMYI AYM AYMI AYMD AYMDI CHKPCK syn keyword focexecFuse IMOD FMOD DMOD PCKOUT EXP BAR SPELLNM SPELLNUM RTCIVP syn keyword focexecFuse PRDUNI PRDNOR RDNORM RDUNIF LCWORD ITOZ RLPHLD IBIPRO syn keyword focexecFuse IBIPRW IBIPRC IBIPRU IBIRCP PTHDAT ITOPACK ITONUM syn keyword focexecFuse DSMEXEC DSMEVAL DSMERRC MSMEXEC MSMEVAL MSMERRC EXTDXI syn keyword focexecFuse BAANHASH EDAYSI DTOG GTOD HSETPT HPART HTIME HNAME syn keyword focexecFuse HADD HDIFF HDATE HGETC HCNVRT HDTTM HMIDNT TEMPPATH syn keyword focexecFuse DATEADD DATEDIF DATEMOV DATECVT EURHLD EURXCH FINDFOC syn keyword focexecFuse FERRMES CNCTUSR CURRPATH USERPATH SYSTEM ASKYN syn keyword focexecFuse FUSEMENU POPEDIT POPFILE syn match focexecNumber "\<\d\+\>" syn match focexecNumber "\<\d\+\.\d*\>" syn match focexecComment "-\*.*" " 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_focexec_syntax_inits") if version < 508 let did_focexec_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink focexecString1 String HiLink focexecString2 String HiLink focexecNumber Number HiLink focexecComment Comment HiLink focexecTable Keyword HiLink focexecModify Keyword HiLink focexecNormal Keyword HiLink focexecSet Keyword HiLink focexecDash Keyword HiLink focexecFileDef Keyword HiLink focexecJoin Keyword HiLink focexecAmperVar Identifier HiLink focexecFuse Function delcommand HiLink endif let b:current_syntax = "focexec" " vim: ts=8
zyz2011-vim
runtime/syntax/focexec.vim
Vim Script
gpl2
3,910
" Vim syntax file " Language: netrc(5) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2010-01-03 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword netrcKeyword machine nextgroup=netrcMachine skipwhite skipnl syn keyword netrcKeyword account \ login \ nextgroup=netrcLogin,netrcSpecial skipwhite skipnl syn keyword netrcKeyword password nextgroup=netrcPassword skipwhite skipnl syn keyword netrcKeyword default syn keyword netrcKeyword macdef \ nextgroup=netrcInit,netrcMacroName skipwhite skipnl syn region netrcMacro contained start='.' end='^$' syn match netrcMachine contained display '\S\+' syn match netrcMachine contained display '"[^\\"]*\(\\.[^\\"]*\)*"' syn match netrcLogin contained display '\S\+' syn match netrcLogin contained display '"[^\\"]*\(\\.[^\\"]*\)*"' syn match netrcPassword contained display '\S\+' syn match netrcPassword contained display '"[^\\"]*\(\\.[^\\"]*\)*"' syn match netrcMacroName contained display '\S\+' \ nextgroup=netrcMacro skipwhite skipnl syn match netrcMacroName contained display '"[^\\"]*\(\\.[^\\"]*\)*"' \ nextgroup=netrcMacro skipwhite skipnl syn keyword netrcSpecial contained anonymous syn match netrcInit contained '\<init$' \ nextgroup=netrcMacro skipwhite skipnl syn sync fromstart hi def link netrcKeyword Keyword hi def link netrcMacro PreProc hi def link netrcMachine Identifier hi def link netrcLogin String hi def link netrcPassword String hi def link netrcMacroName String hi def link netrcSpecial Special hi def link netrcInit Special let b:current_syntax = "netrc" let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/syntax/netrc.vim
Vim Script
gpl2
1,922
" Vim syntax file " Language: gitolite configuration " URL: https://github.com/tmatilai/gitolite.vim " Maintainer: Teemu Matilainen <teemu.matilainen@iki.fi> " Last Change: 2011-12-25 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim " Comment syn match gitoliteComment "\(^\|\s\)#.*" contains=gitoliteTodo syn keyword gitoliteTodo TODO FIXME XXX NOT contained " Groups, users and repos syn match gitoliteGroupDef "\(^\s*\)\@<=@[^=]\{-1,}\(\s*=\)\@=" contains=gitoliteSpaceError,gitoliteUserError nextgroup=gitoliteGroupDefSep syn match gitoliteGroupDefSep "\s*=" contained nextgroup=gitoliteRepoLine syn match gitoliteRepoDef "^\s*repo\s" nextgroup=gitoliteRepoLine syn match gitoliteRepoLine ".*" contained transparent contains=gitoliteGroup,gitoliteWildRepo,gitoliteCreator,gitoliteExtCmdHelper,gitoliteRepoError,gitoliteComment syn match gitoliteUserLine ".*" contained transparent contains=gitoliteGroup,gitolitePreProc,gitoliteUserError,gitoliteComment syn match gitoliteWildRepo "[ \t=]\@<=[^ \t]*[\\^$|()[\]*?{},][^ \t]*" contained contains=gitoliteCreator,gitoliteRepoError syn match gitoliteGroup "[ \t=]\@<=@[^ \t]\+" contained contains=gitoliteUserError syn keyword gitoliteCreator CREATER CREATOR contained syn keyword gitolitePreProc CREATER CREATOR READERS WRITERS contained syn match gitoliteExtCmdHelper "[ \t=]\@<=EXTCMD/" contained nextgroup=gitoliteExtCmd syn match gitoliteExtCmd "rsync\(\s\|$\)" contained " Illegal characters syn match gitoliteRepoError "[^ \t0-9a-zA-Z._@+/\\^$|()[\]*?{},-]\+" contained syn match gitoliteUserError "[^ \t0-9a-zA-Z._@+-]\+" contained syn match gitoliteSpaceError "\s\+" contained " Permission syn match gitoliteKeyword "^\s*\(C\|R\|RW\|RW+\|RWC\|RW+C\|RWD\|RW+D\|RWCD\|RW+CD\)[ \t=]\@=" nextgroup=gitoliteRefex syn match gitoliteKeyword "^\s*-[ \t=]\@=" nextgroup=gitoliteDenyRefex syn match gitoliteRefex "[^=]*="he=e-1 contained contains=gitoliteSpecialRefex,gitoliteGroup nextgroup=gitoliteUserLine syn match gitoliteDenyRefex "[^=]*="he=e-1 contained contains=gitoliteSpecialRefex,gitoliteGroup nextgroup=gitoliteDenyUsers syn match gitoliteSpecialRefex "\sNAME/"he=e-1 contained syn match gitoliteSpecialRefex "/USER/"hs=s+1,he=e-1 contained syn match gitoliteDenyUsers ".*" contained contains=gitoliteUserError,gitoliteComment " Configuration syn match gitoliteKeyword "^\s*config\s\+" nextgroup=gitoliteConfVariable syn match gitoliteConfVariable "[^=]*" contained " Include syn match gitoliteInclude "^\s*\(include\|subconf\)\s" " String syn region gitoliteString start=+"+ end=+"+ oneline " Define the default highlighting hi def link gitoliteComment Comment hi def link gitoliteTodo Todo hi def link gitoliteGroupDef gitoliteGroup hi def link gitoliteGroup Identifier hi def link gitoliteWildRepo Special hi def link gitoliteRepoError gitoliteError hi def link gitoliteUserError gitoliteError hi def link gitoliteSpaceError gitoliteError hi def link gitoliteError Error hi def link gitoliteCreator gitolitePreProc hi def link gitolitePreProc PreProc hi def link gitoliteExtCmdHelper PreProc hi def link gitoliteExtCmd Special hi def link gitoliteRepoDef Type hi def link gitoliteKeyword Keyword hi def link gitoliteRefex String hi def link gitoliteDenyRefex gitoliteRefex hi def link gitoliteSpecialRefex PreProc hi def link gitoliteDenyUsers WarningMsg hi def link gitoliteConfVariable Identifier hi def link gitoliteInclude Include hi def link gitoliteString String let b:current_syntax = "gitolite" let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/syntax/gitolite.vim
Vim Script
gpl2
3,586
" Vim syntax file " Config file: printcap " Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int> (defunct) " Modified by Bram " Last Change: 2003 May 11 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif "define keywords if version < 600 set isk=@,46-57,_,-,#,=,192-255 else setlocal isk=@,46-57,_,-,#,=,192-255 endif "first all the bad guys syn match pcapBad '^.\+$' "define any line as bad syn match pcapBadword '\k\+' contained "define any sequence of keywords as bad syn match pcapBadword ':' contained "define any single : as bad syn match pcapBadword '\\' contained "define any single \ as bad "then the good boys " Boolean keywords syn match pcapKeyword contained ':\(fo\|hl\|ic\|rs\|rw\|sb\|sc\|sf\|sh\)' " Numeric Keywords syn match pcapKeyword contained ':\(br\|du\|fc\|fs\|mx\|pc\|pl\|pw\|px\|py\|xc\|xs\)#\d\+' " String Keywords syn match pcapKeyword contained ':\(af\|cf\|df\|ff\|gf\|if\|lf\|lo\|lp\|nd\|nf\|of\|rf\|rg\|rm\|rp\|sd\|st\|tf\|tr\|vf\)=\k*' " allow continuation syn match pcapEnd ':\\$' contained " syn match pcapDefineLast '^\s.\+$' contains=pcapBadword,pcapKeyword syn match pcapDefine '^\s.\+$' contains=pcapBadword,pcapKeyword,pcapEnd syn match pcapHeader '^\k[^|]\+\(|\k[^|]\+\)*:\\$' syn match pcapComment "#.*$" syn sync minlines=50 " 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_pcap_syntax_inits") if version < 508 let did_pcap_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink pcapBad WarningMsg HiLink pcapBadword WarningMsg HiLink pcapComment Comment delcommand HiLink endif let b:current_syntax = "pcap" " vim: ts=8
zyz2011-vim
runtime/syntax/pcap.vim
Vim Script
gpl2
1,969
" Vim syntax file " Language: abc music notation language " Maintainer: James Allwright <J.R.Allwright@westminster.ac.uk> " URL: http://perun.hscs.wmin.ac.uk/~jra/vim/syntax/abc.vim " Last Change: 27th April 2001 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif " tags syn region abcGuitarChord start=+"[A-G]+ end=+"+ contained syn match abcNote "z[1-9]*[0-9]*" contained syn match abcNote "z[1-9]*[0-9]*/[248]\=" contained syn match abcNote "[=_\^]\{,2}[A-G],*[1-9]*[0-9]*" contained syn match abcNote "[=_\^]\{,2}[A-G],*[1-9]*[0-9]*/[248]\=" contained syn match abcNote "[=_\^]\{,2}[a-g]'*[1-9]*[0-9]*" contained syn match abcNote "[=_\^]\{,2}[a-g]'*[1-9]*[0-9]*/[248]\=" contained syn match abcBar "|" contained syn match abcBar "[:|][:|]" contained syn match abcBar ":|2" contained syn match abcBar "|1" contained syn match abcBar "\[[12]" contained syn match abcTuple "([1-9]\+:\=[0-9]*:\=[0-9]*" contained syn match abcBroken "<\|<<\|<<<\|>\|>>\|>>>" contained syn match abcTie "-" syn match abcHeadField "^[A-EGHIK-TVWXZ]:.*$" contained syn match abcBodyField "^[KLMPQWVw]:.*$" contained syn region abcHeader start="^X:" end="^K:.*$" contained contains=abcHeadField,abcComment keepend syn region abcTune start="^X:" end="^ *$" contains=abcHeader,abcComment,abcBar,abcNote,abcBodyField,abcGuitarChord,abcTuple,abcBroken,abcTie syn match abcComment "%.*$" " 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_abc_syn_inits") if version < 508 let did_abc_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink abcComment Comment HiLink abcHeadField Type HiLink abcBodyField Special HiLink abcBar Statement HiLink abcTuple Statement HiLink abcBroken Statement HiLink abcTie Statement HiLink abcGuitarChord Identifier HiLink abcNote Constant delcommand HiLink endif let b:current_syntax = "abc" " vim: ts=4
zyz2011-vim
runtime/syntax/abc.vim
Vim Script
gpl2
2,225
" Vim indent file " Language: Sass " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2010 May 21 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal autoindent sw=2 et setlocal indentexpr=GetSassIndent() setlocal indentkeys=o,O,*<Return>,<:>,!^F " Only define the function once. if exists("*GetSassIndent") finish endif let s:property = '^\s*:\|^\s*[[:alnum:]-]\+\%(:\|\s*=\)' function! GetSassIndent() let lnum = prevnonblank(v:lnum-1) let line = substitute(getline(lnum),'\s\+$','','') let cline = substitute(substitute(getline(v:lnum),'\s\+$','',''),'^\s\+','','') let lastcol = strlen(line) let line = substitute(line,'^\s\+','','') let indent = indent(lnum) let cindent = indent(v:lnum) if line !~ s:property && cline =~ s:property return indent + &sw "elseif line =~ s:property && cline !~ s:property "return indent - &sw else return -1 endif endfunction " vim:set sw=2:
zyz2011-vim
runtime/indent/sass.vim
Vim Script
gpl2
948
" Vim indent file " Language: YACC input file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-12-20 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetYaccIndent() setlocal indentkeys=!^F,o,O setlocal nosmartindent " Only define the function once. if exists("*GetYaccIndent") finish endif function GetYaccIndent() if v:lnum == 1 return 0 endif let ind = indent(v:lnum - 1) let line = getline(v:lnum - 1) if line == '' let ind = 0 elseif line =~ '^\w\+\s*:' let ind = ind + matchend(line, '^\w\+\s*') elseif line =~ '^\s*;' let ind = 0 else let ind = indent(v:lnum) endif return ind endfunction
zyz2011-vim
runtime/indent/yacc.vim
Vim Script
gpl2
769
" Vim indent file " Language: .xsd files (XML Schema) " Maintainer: Nobody " Last Change: 2005 Jun 09 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif " Use XML formatting rules runtime! indent/xml.vim
zyz2011-vim
runtime/indent/xsd.vim
Vim Script
gpl2
253
" vim: set sw=4 sts=4: " Maintainer : Gergely Kontra <kgergely@mcl.hu> " Revised on : 2002.02.18. 23:34:05 " Language : Prolog " TODO: " checking with respect to syntax highlighting " ignoring multiline comments " detecting multiline strings " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetPrologIndent() setlocal indentkeys-=:,0# setlocal indentkeys+=0%,-,0;,>,0) " Only define the function once. "if exists("*GetPrologIndent") " finish "endif function! GetPrologIndent() " Find a non-blank line above the current line. let pnum = prevnonblank(v:lnum - 1) " Hit the start of the file, use zero indent. if pnum == 0 return 0 endif let line = getline(v:lnum) let pline = getline(pnum) let ind = indent(pnum) " Previous line was comment -> use previous line's indent if pline =~ '^\s*%' retu ind endif " Check for clause head on previous line if pline =~ ':-\s*\(%.*\)\?$' let ind = ind + &sw " Check for end of clause on previous line elseif pline =~ '\.\s*\(%.*\)\?$' let ind = ind - &sw endif " Check for opening conditional on previous line if pline =~ '^\s*\([(;]\|->\)' let ind = ind + &sw endif " Check for closing an unclosed paren, or middle ; or -> if line =~ '^\s*\([);]\|->\)' let ind = ind - &sw endif return ind endfunction
zyz2011-vim
runtime/indent/prolog.vim
Vim Script
gpl2
1,454
" Vim indent file " Language: Pyrex " Maintainer: Marco Barisione <marco.bari@people.it> " URL: http://marcobari.altervista.org/pyrex_vim.html " Last Change: 2005 Jun 24 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif " Use Python formatting rules runtime! indent/python.vim
zyz2011-vim
runtime/indent/pyrex.vim
Vim Script
gpl2
326
" Vim indent file " Language: Hamster Script " Version: 2.0.6.0 " Last Change: Wed Nov 08 2006 12:02:42 PM " Maintainer: David Fishburn <fishburn@ianywhere.com> " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentkeys+==~if,=~else,=~endif,=~endfor,=~endwhile setlocal indentkeys+==~do,=~until,=~while,=~repeat,=~for,=~loop setlocal indentkeys+==~sub,=~endsub " Define the appropriate indent function but only once setlocal indentexpr=HamGetFreeIndent() if exists("*HamGetFreeIndent") finish endif function HamGetIndent(lnum) let ind = indent(a:lnum) let prevline=getline(a:lnum) " Add a shiftwidth to statements following if, else, elseif, " case, select, default, do, until, while, for, start if prevline =~? '^\s*\<\(if\|else\%(if\)\?\|for\|repeat\|do\|while\|sub\)\>' let ind = ind + &sw endif " Subtract a shiftwidth from else, elseif, end(if|while|for), until let line = getline(v:lnum) if line =~? '^\s*\(else\|elseif\|loop\|until\|end\%(if\|while\|for\|sub\)\)\>' let ind = ind - &sw endif return ind endfunction function HamGetFreeIndent() " Find the previous non-blank line let lnum = prevnonblank(v:lnum - 1) " Use zero indent at the top of the file if lnum == 0 return 0 endif let ind=HamGetIndent(lnum) return ind endfunction " vim:sw=2 tw=80
zyz2011-vim
runtime/indent/hamster.vim
Vim Script
gpl2
1,407
" Vim indent file " Language: Makefile " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2007-05-07 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetMakeIndent() setlocal indentkeys=!^F,o,O,<:>,=else,=endif setlocal nosmartindent if exists("*GetMakeIndent") finish endif let s:comment_rx = '^\s*#' let s:rule_rx = '^[^ \t#:][^#:]*:\{1,2}\%([^=:]\|$\)' let s:continued_rule_rx = '^[^#:]*:\{1,2}\%([^=:]\|$\)' let s:continuation_rx = '\\$' let s:assignment_rx = '^\s*\h\w*\s*[+?]\==\s*\zs.*\\$' let s:folded_assignment_rx = '^\s*\h\w*\s*[+?]\==' " TODO: This needs to be a lot more restrictive in what it matches. let s:just_inserted_rule_rx = '^\s*[^#:]\+:\{1,2}$' let s:conditional_directive_rx = '^ *\%(ifn\=\%(eq\|def\)\|else\)\>' let s:end_conditional_directive_rx = '^\s*\%(else\|endif\)\>' function s:remove_continuation(line) return substitute(a:line, s:continuation_rx, "", "") endfunction function GetMakeIndent() " TODO: Should this perhaps be v:lnum -1? " let prev_lnum = prevnonblank(v:lnum - 1) let prev_lnum = v:lnum - 1 if prev_lnum == 0 return 0 endif let prev_line = getline(prev_lnum) let prev_prev_lnum = prev_lnum - 1 let prev_prev_line = prev_prev_lnum != 0 ? getline(prev_prev_lnum) : "" " TODO: Deal with comments. In comments, continuations aren't interesting. if prev_line =~ s:continuation_rx if prev_prev_line =~ s:continuation_rx return indent(prev_lnum) elseif prev_line =~ s:rule_rx return &sw elseif prev_line =~ s:assignment_rx call cursor(prev_lnum, 1) if search(s:assignment_rx, 'W') != 0 return virtcol('.') - 1 else " TODO: ? return &sw endif else " TODO: OK, this might be a continued shell command, so perhaps indent " properly here? Leave this out for now, but in the next release this " should be using indent/sh.vim somehow. "if prev_line =~ '^\t' " s:rule_command_rx " if prev_line =~ '^\s\+[@-]\%(if\)\>' " return indent(prev_lnum) + 2 " endif "endif return indent(prev_lnum) + &sw endif elseif prev_prev_line =~ s:continuation_rx let folded_line = s:remove_continuation(prev_prev_line) . ' ' . s:remove_continuation(prev_line) let lnum = prev_prev_lnum - 1 let line = getline(lnum) while line =~ s:continuation_rx let folded_line = s:remove_continuation(line) . ' ' . folded_line let lnum -= 1 let line = getline(lnum) endwhile let folded_lnum = lnum + 1 if folded_line =~ s:rule_rx if getline(v:lnum) =~ s:rule_rx return 0 else return &ts endif else " elseif folded_line =~ s:folded_assignment_rx if getline(v:lnum) =~ s:rule_rx return 0 else return indent(folded_lnum) endif " else " " TODO: ? " return indent(prev_lnum) endif elseif prev_line =~ s:rule_rx if getline(v:lnum) =~ s:rule_rx return 0 else return &ts endif elseif prev_line =~ s:conditional_directive_rx return &sw else let line = getline(v:lnum) if line =~ s:just_inserted_rule_rx return 0 elseif line =~ s:end_conditional_directive_rx return v:lnum - 1 == 0 ? 0 : indent(v:lnum - 1) - &sw else return v:lnum - 1 == 0 ? 0 : indent(v:lnum - 1) endif endif endfunction
zyz2011-vim
runtime/indent/make.vim
Vim Script
gpl2
3,431
" Vim indent file " Language: BibTeX " Maintainer: Dorai Sitaram <ds26@gte.com> " URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html " Last Change: 2005 Mar 28 " Only do this when not done yet for this buffer if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal cindent let b:undo_indent = "setl cin<"
zyz2011-vim
runtime/indent/bib.vim
Vim Script
gpl2
346
" Vim indent file " Language: xinetd.conf(5) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-12-20 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetXinetdIndent() setlocal indentkeys=0{,0},!^F,o,O setlocal nosmartindent if exists("*GetXinetdIndent") finish endif let s:keepcpo= &cpo set cpo&vim function s:count_braces(lnum, count_open) let n_open = 0 let n_close = 0 let line = getline(a:lnum) let pattern = '[{}]' let i = match(line, pattern) while i != -1 if synIDattr(synID(a:lnum, i + 1, 0), 'name') !~ 'ld\%(Comment\|String\)' if line[i] == '{' let n_open += 1 elseif line[i] == '}' if n_open > 0 let n_open -= 1 else let n_close += 1 endif endif endif let i = match(line, pattern, i + 1) endwhile return a:count_open ? n_open : n_close endfunction function GetXinetdIndent() let pnum = prevnonblank(v:lnum - 1) if pnum == 0 return 0 endif return indent(pnum) + s:count_braces(pnum, 1) * &sw \ - s:count_braces(v:lnum, 0) * &sw endfunction let &cpo = s:keepcpo unlet s:keepcpo
zyz2011-vim
runtime/indent/xinetd.vim
Vim Script
gpl2
1,201
" Vim indent file " Language: Falcon " Maintainer: Steven Oliver <oliver.steven@gmail.com> " Website: https://steveno@github.com/steveno/falconpl-vim.git " Credits: Thanks to the ruby.vim authors, I borrow a lot! " Previous Maintainer: Brent A. Fulgham <bfulgham@debian.org> " ----------------------------------------------------------- " GetLatestVimScripts: 2752 1 :AutoInstall: falcon.vim "====================================== " SETUP "====================================== " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal nosmartindent " Setup indent function and when to use it setlocal indentexpr=FalconGetIndent() setlocal indentkeys=0{,0},0),0],!^F,o,O,e setlocal indentkeys+==~case,=~catch,=~default,=~elif,=~else,=~end,=~\" " Define the appropriate indent function but only once if exists("*FalconGetIndent") finish endif let s:cpo_save = &cpo set cpo&vim "====================================== " VARIABLES "====================================== " Regex of syntax group names that are strings AND comments let s:syng_strcom = '\<falcon\%(String\|StringEscape\|Comment\)\>' " Regex of syntax group names that are strings let s:syng_string = '\<falcon\%(String\|StringEscape\)\>' " Keywords to indent on let s:falcon_indent_keywords = '^\s*\(case\|catch\|class\|enum\|default\|elif\|else' . \ '\|for\|function\|if.*"[^"]*:.*"\|if \(\(:\)\@!.\)*$\|loop\|object\|select' . \ '\|switch\|try\|while\|\w*\s*=\s*\w*([$\)' " Keywords to deindent on let s:falcon_deindent_keywords = '^\s*\(case\|catch\|default\|elif\|else\|end\)' "====================================== " FUNCTIONS "====================================== " Check if the character at lnum:col is inside a string function s:IsInStringOrComment(lnum, col) return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_strcom endfunction "====================================== " INDENT ROUTINE "====================================== function FalconGetIndent() " Get the line to be indented let cline = getline(v:lnum) " Don't reindent comments on first column if cline =~ '^\/\/' return 0 endif " Find the previous non-blank line let lnum = prevnonblank(v:lnum - 1) " Use zero indent at the top of the file if lnum == 0 return 0 endif let prevline=getline(lnum) let ind = indent(lnum) let chg = 0 " If we are in a multi-line string or line-comment, don't do anything if s:IsInStringOrComment(v:lnum, matchend(cline, '^\s*') + 1 ) return indent('.') endif " If the start of the line equals a double quote, then indent to the " previous lines first double quote if cline =~? '^\s*"' let chg = chg + &sw endif " If previous line started with a double quote and this one " doesn't, unindent if prevline =~? '^\s*"' && cline =~? '^\s*' let chg = chg - &sw endif " Indent if proper keyword if prevline =~? s:falcon_indent_keywords let chg = &sw " If previous line opened a parenthesis, and did not close it, indent elseif prevline =~ '^.*(\s*[^)]*\((.*)\)*[^)]*$' " Make sure this isn't just a function split between two lines if prevline =~ ',\s*$' return indent(prevnonblank(v:lnum - 1)) + &sw else return match(prevline, '(.*\((.*)\|[^)]\)*.*$') + 1 endif elseif prevline =~ '^[^(]*)\s*$' " This line closes a parenthesis. Finds opening. let curr_line = prevnonblank(lnum - 1) while curr_line >= 0 let str = getline(curr_line) if str !~ '^.*(\s*[^)]*\((.*)\)*[^)]*$' let curr_line = prevnonblank(curr_line - 1) else break endif endwhile if curr_line < 0 return -1 endif let ind = indent(curr_line) endif " If previous line ends in a semi-colon reset indent to previous " lines setting if prevline =~? ';\s*$' && prevnonblank(prevline) =~? ',\s*$' return chg = chg - (2 * &sw) endif " If previous line ended in a comma, indent again if prevline =~? ',\s*$' let chg = chg + &sw endif " If previous line ended in a =>, indent again if prevline =~? '=>\s*$' let chg = chg + &sw endif " Deindent on proper keywords if cline =~? s:falcon_deindent_keywords let chg = chg - &sw endif return ind + chg endfunction let &cpo = s:cpo_save unlet s:cpo_save " vim: set sw=4 sts=4 et tw=80 :
zyz2011-vim
runtime/indent/falcon.vim
Vim Script
gpl2
4,652
" Language: xml " Maintainer: Johannes Zellner <johannes@zellner.org> " Last Change: 2012 May 18 " Notes: 1) does not indent pure non-xml code (e.g. embedded scripts) " 2) will be confused by unbalanced tags in comments " or CDATA sections. " 2009-05-26 patch by Nikolai Weibull " TODO: implement pre-like tags, see xml_indent_open / xml_indent_close " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 let s:keepcpo= &cpo set cpo&vim " [-- local settings (must come before aborting the script) --] setlocal indentexpr=XmlIndentGet(v:lnum,1) setlocal indentkeys=o,O,*<Return>,<>>,<<>,/,{,} if !exists('b:xml_indent_open') let b:xml_indent_open = '.\{-}<\a' " pre tag, e.g. <address> " let b:xml_indent_open = '.\{-}<[/]\@!\(address\)\@!' endif if !exists('b:xml_indent_close') let b:xml_indent_close = '.\{-}</' " end pre tag, e.g. </address> " let b:xml_indent_close = '.\{-}</\(address\)\@!' endif " [-- finish, if the function already exists --] if exists('*XmlIndentGet') | finish | endif fun! <SID>XmlIndentWithPattern(line, pat) let s = substitute('x'.a:line, a:pat, "\1", 'g') return strlen(substitute(s, "[^\1].*$", '', '')) endfun " [-- check if it's xml --] fun! <SID>XmlIndentSynCheck(lnum) if '' != &syntax let syn1 = synIDattr(synID(a:lnum, 1, 1), 'name') let syn2 = synIDattr(synID(a:lnum, strlen(getline(a:lnum)) - 1, 1), 'name') if '' != syn1 && syn1 !~ 'xml' && '' != syn2 && syn2 !~ 'xml' " don't indent pure non-xml code return 0 elseif syn1 =~ '^xmlComment' && syn2 =~ '^xmlComment' " indent comments specially return -1 endif endif return 1 endfun " [-- return the sum of indents of a:lnum --] fun! <SID>XmlIndentSum(lnum, style, add) let line = getline(a:lnum) if a:style == match(line, '^\s*</') return (&sw * \ (<SID>XmlIndentWithPattern(line, b:xml_indent_open) \ - <SID>XmlIndentWithPattern(line, b:xml_indent_close) \ - <SID>XmlIndentWithPattern(line, '.\{-}/>'))) + a:add else return a:add endif endfun fun! XmlIndentGet(lnum, use_syntax_check) " Find a non-empty line above the current line. let lnum = prevnonblank(a:lnum - 1) " Hit the start of the file, use zero indent. if lnum == 0 return 0 endif if a:use_syntax_check let check_lnum = <SID>XmlIndentSynCheck(lnum) let check_alnum = <SID>XmlIndentSynCheck(a:lnum) if 0 == check_lnum || 0 == check_alnum return indent(a:lnum) elseif -1 == check_lnum || -1 == check_alnum return -1 endif endif let ind = <SID>XmlIndentSum(lnum, -1, indent(lnum)) let ind = <SID>XmlIndentSum(a:lnum, 0, ind) return ind endfun let &cpo = s:keepcpo unlet s:keepcpo " vim:ts=8
zyz2011-vim
runtime/indent/xml.vim
Vim Script
gpl2
2,771
" Vim indent file " Language: Lisp " Maintainer: Sergey Khorev <sergey.khorev@gmail.com> " URL: http://sites.google.com/site/khorser/opensource/vim " Last Change: 2012 Jan 10 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal ai nosi let b:undo_indent = "setl ai< si<"
zyz2011-vim
runtime/indent/lisp.vim
Vim Script
gpl2
353
" IDL (Interactive Data Language) indent file. " Language: IDL (ft=idlang) " Last change: 2012 May 18 " Maintainer: Aleksandar Jelenak <ajelenak AT yahoo.com> " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentkeys=o,O,0=endif,0=ENDIF,0=endelse,0=ENDELSE,0=endwhile,0=ENDWHILE,0=endfor,0=ENDFOR,0=endrep,0=ENDREP setlocal indentexpr=GetIdlangIndent(v:lnum) " Only define the function once. if exists("*GetIdlangIndent") finish endif function GetIdlangIndent(lnum) " First non-empty line above the current line. let pnum = prevnonblank(v:lnum-1) " v:lnum is the first non-empty line -- zero indent. if pnum == 0 return 0 endif " Second non-empty line above the current line. let pnum2 = prevnonblank(pnum-1) " Current indent. let curind = indent(pnum) " Indenting of continued lines. if getline(pnum) =~ '\$\s*\(;.*\)\=$' if getline(pnum2) !~ '\$\s*\(;.*\)\=$' let curind = curind+&sw endif else if getline(pnum2) =~ '\$\s*\(;.*\)\=$' let curind = curind-&sw endif endif " Indenting blocks of statements. if getline(v:lnum) =~? '^\s*\(endif\|endelse\|endwhile\|endfor\|endrep\)\>' if getline(pnum) =~? 'begin\>' elseif indent(v:lnum) > curind-&sw let curind = curind-&sw else return -1 endif elseif getline(pnum) =~? 'begin\>' if indent(v:lnum) < curind+&sw let curind = curind+&sw else return -1 endif endif return curind endfunction
zyz2011-vim
runtime/indent/idlang.vim
Vim Script
gpl2
1,566
" Vim indent file " Language: Django HTML template " Maintainer: Dave Hodder <dmh@dmh.org.uk> " Last Change: 2007 Jan 25 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif " Use HTML formatting rules. runtime! indent/html.vim
zyz2011-vim
runtime/indent/htmldjango.vim
Vim Script
gpl2
273
" Matlab indent file " Language: Matlab " Maintainer: Christophe Poucet <christophe.poucet@pandora.be> " Last Change: 6 January, 2001 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 " Some preliminary setting setlocal indentkeys=!,o,O=end,=case,=else,=elseif,=otherwise,=catch setlocal indentexpr=GetMatlabIndent(v:lnum) " Only define the function once. if exists("*GetMatlabIndent") finish endif function GetMatlabIndent(lnum) " Give up if this line is explicitly joined. if getline(a:lnum - 1) =~ '\\$' return -1 endif " Search backwards for the first non-empty line. let plnum = a:lnum - 1 while plnum > 0 && getline(plnum) =~ '^\s*$' let plnum = plnum - 1 endwhile if plnum == 0 " This is the first non-empty line, use zero indent. return 0 endif let curind = indent(plnum) " If the current line is a stop-block statement... if getline(v:lnum) =~ '^\s*\(end\|else\|elseif\|case\|otherwise\|catch\)\>' " See if this line does not follow the line right after an openblock if getline(plnum) =~ '^\s*\(for\|if\|else\|elseif\|case\|while\|switch\|try\|otherwise\|catch\)\>' " See if the user has already dedented elseif indent(v:lnum) > curind - &sw " If not, recommend one dedent let curind = curind - &sw else " Otherwise, trust the user return -1 endif " endif " If the previous line opened a block elseif getline(plnum) =~ '^\s*\(for\|if\|else\|elseif\|case\|while\|switch\|try\|otherwise\|catch\)\>' " See if the user has already indented if indent(v:lnum) < curind + &sw "If not, recommend indent let curind = curind + &sw else " Otherwise, trust the user return -1 endif endif " If we got to here, it means that the user takes the standardversion, so we return it return curind endfunction " vim:sw=2
zyz2011-vim
runtime/indent/matlab.vim
Vim Script
gpl2
1,928
" Description: Comshare Dimension Definition Language (CDL) " Author: Raul Segura Acevedo <raulseguraaceved@netscape.net> " Last Change: Fri Nov 30 13:35:48 2001 CST if exists("b:did_indent") "finish endif let b:did_indent = 1 setlocal indentexpr=CdlGetIndent(v:lnum) setlocal indentkeys& setlocal indentkeys+==~else,=~endif,=~then,;,),= " Only define the function once. if exists("*CdlGetIndent") "finish endif " find out if an "...=..." expresion its an asignment (or a conditional) " it scans 'line' first, and then the previos lines fun! CdlAsignment(lnum, line) let f = -1 let lnum = a:lnum let line = a:line while lnum > 0 && f == -1 " line without members [a] of [b]:[c]... let inicio = 0 while 1 " keywords that help to decide let inicio = matchend(line, '\c\<\(expr\|\a*if\|and\|or\|not\|else\|then\|memberis\|\k\+of\)\>\|[<>;]', inicio) if inicio < 0 break endif " it's formula if there's a ';', 'elsE', 'theN', 'enDif' or 'expr' " conditional if there's a '<', '>', 'elseif', 'if', 'and', 'or', 'not', " 'memberis', 'childrenof' and other \k\+of funcions let f = line[inicio-1] =~? '[en;]' || strpart(line, inicio-4, 4) =~? 'ndif\|expr' endw let lnum = prevnonblank(lnum-1) let line = substitute(getline(lnum), '\c\(\[[^]]*]\(\s*of\s*\|:\)*\)\+', ' ', 'g') endw " if we hit the start of the file then f = -1, return 1 (formula) return f != 0 endf fun! CdlGetIndent(lnum) let thisline = getline(a:lnum) if match(thisline, '^\s*\(\k\+\|\[[^]]*]\)\s*\(,\|;\s*$\)') >= 0 " it's an attributes line return &sw elseif match(thisline, '^\c\s*\([{}]\|\/[*/]\|dimension\|schedule\|group\|hierarchy\|class\)') >= 0 " it's a header or '{' or '}' or a comment return 0 end let lnum = prevnonblank(a:lnum-1) " Hit the start of the file, use zero indent. if lnum == 0 return 0 endif " PREVIOUS LINE let ind = indent(lnum) let line = getline(lnum) let f = -1 " wether a '=' is a conditional or a asignment, -1 means we don't know yet " one 'closing' element at the beginning of the line has already reduced the " indent, but 'else', 'elseif' & 'then' increment it for the next line " '=' at the beginning has already de right indent (increased for asignments) let inicio = matchend(line, '^\c\s*\(else\a*\|then\|endif\|/[*/]\|[);={]\)') if inicio > 0 let c = line[inicio-1] " ')' and '=' don't change indent and are useless to set 'f' if c == '{' return &sw elseif c != ')' && c != '=' let f = 1 " all but 'elseif' are followed by a formula if c ==? 'n' || c ==? 'e' " 'then', 'else' let ind = ind + &sw elseif strpart(line, inicio-6, 6) ==? 'elseif' " elseif, set f to conditional let ind = ind + &sw let f = 0 end end end " remove members [a] of [b]:[c]... (inicio remainds valid) let line = substitute(line, '\c\(\[[^]]*]\(\s*of\s*\|:\)*\)\+', ' ', 'g') while 1 " search for the next interesting element let inicio=matchend(line, '\c\<if\|endif\|[()=;]', inicio) if inicio < 0 break end let c = line[inicio-1] " 'expr(...)' containing the formula if strpart(line, inicio-5, 5) ==? 'expr(' let ind = 0 let f = 1 elseif c == ')' || c== ';' || strpart(line, inicio-5, 5) ==? 'endif' let ind = ind - &sw elseif c == '(' || c ==? 'f' " '(' or 'if' let ind = ind + &sw else " c == '=' " if it is an asignment increase indent if f == -1 " we don't know yet, find out let f = CdlAsignment(lnum, strpart(line, 0, inicio)) end if f == 1 " formula increase it let ind = ind + &sw end end endw " CURRENT LINE, if it starts with a closing element, decrease indent " or if it starts with '=' (asignment), increase indent if match(thisline, '^\c\s*\(else\|then\|endif\|[);]\)') >= 0 let ind = ind - &sw elseif match(thisline, '^\s*=') >= 0 if f == -1 " we don't know yet if is an asignment, find out let f = CdlAsignment(lnum, "") end if f == 1 " formula increase it let ind = ind + &sw end end return ind endfun
zyz2011-vim
runtime/indent/cdl.vim
Vim Script
gpl2
4,172
" Vim indent file " Language: Shell Script " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2010-01-06 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetShIndent() setlocal indentkeys+=0=then,0=do,0=else,0=elif,0=fi,0=esac,0=done,),0=;;,0=;& setlocal indentkeys+=0=fin,0=fil,0=fip,0=fir,0=fix setlocal indentkeys-=:,0# setlocal nosmartindent if exists("*GetShIndent") finish endif let s:cpo_save = &cpo set cpo&vim function s:buffer_shiftwidth() return &shiftwidth endfunction let s:sh_indent_defaults = { \ 'default': function('s:buffer_shiftwidth'), \ 'continuation-line': function('s:buffer_shiftwidth'), \ 'case-labels': function('s:buffer_shiftwidth'), \ 'case-statements': function('s:buffer_shiftwidth'), \ 'case-breaks': 0 } function! s:indent_value(option) let Value = exists('b:sh_indent_options') \ && has_key(b:sh_indent_options, a:option) ? \ b:sh_indent_options[a:option] : \ s:sh_indent_defaults[a:option] if type(Value) == type(function('type')) return Value() endif return Value endfunction function! GetShIndent() let lnum = prevnonblank(v:lnum - 1) if lnum == 0 return 0 endif let pnum = prevnonblank(lnum - 1) let ind = indent(lnum) let line = getline(lnum) if line =~ '^\s*\%(if\|then\|do\|else\|elif\|case\|while\|until\|for\|select\)\>' if line !~ '\<\%(fi\|esac\|done\)\>\s*\%(#.*\)\=$' let ind += s:indent_value('default') endif elseif s:is_case_label(line, pnum) if !s:is_case_ended(line) let ind += s:indent_value('case-statements') endif elseif line =~ '^\s*\<\k\+\>\s*()\s*{' || line =~ '^\s*{' if line !~ '}\s*\%(#.*\)\=$' let ind += s:indent_value('default') endif elseif s:is_continuation_line(line) if pnum == 0 || !s:is_continuation_line(getline(pnum)) let ind += s:indent_value('continuation-line') endif elseif pnum != 0 && s:is_continuation_line(getline(pnum)) let ind = indent(s:find_continued_lnum(pnum)) endif let pine = line let line = getline(v:lnum) if line =~ '^\s*\%(then\|do\|else\|elif\|fi\|done\)\>' || line =~ '^\s*}' let ind -= s:indent_value('default') elseif line =~ '^\s*esac\>' let ind -= (s:is_case_label(pine, lnum) && s:is_case_ended(pine) ? \ 0 : s:indent_value('case-statements')) + \ s:indent_value('case-labels') if s:is_case_break(pine) let ind += s:indent_value('case-breaks') endif elseif s:is_case_label(line, lnum) if s:is_case(pine) let ind = indent(lnum) + s:indent_value('case-labels') else let ind -= s:indent_value('case-statements') - s:indent_value('case-breaks') endif elseif s:is_case_break(line) let ind -= s:indent_value('case-breaks') endif return ind endfunction function! s:is_continuation_line(line) return a:line =~ '\%(\%(^\|[^\\]\)\\\|&&\|||\)$' endfunction function! s:find_continued_lnum(lnum) let i = a:lnum while i > 1 && s:is_continuation_line(getline(i - 1)) let i -= 1 endwhile return i endfunction function! s:is_case_label(line, pnum) if a:line !~ '^\s*(\=.*)' return 0 endif if a:pnum > 0 let pine = getline(a:pnum) if !(s:is_case(pine) || s:is_case_ended(pine)) return 0 endif endif let suffix = substitute(a:line, '^\s*(\=', "", "") let nesting = 0 let i = 0 let n = strlen(suffix) while i < n let c = suffix[i] let i += 1 if c == '\\' let i += 1 elseif c == '(' let nesting += 1 elseif c == ')' if nesting == 0 return 1 endif let nesting -= 1 endif endwhile return 0 endfunction function! s:is_case(line) return a:line =~ '^\s*case\>' endfunction function! s:is_case_break(line) return a:line =~ '^\s*;[;&]' endfunction function! s:is_case_ended(line) return s:is_case_break(a:line) || a:line =~ ';[;&]\s*\%(#.*\)\=$' endfunction let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/indent/sh.vim
Vim Script
gpl2
4,040
" Vim indent file " Language: SCSS " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2010 Jul 26 if exists("b:did_indent") finish endif runtime! indent/css.vim " vim:set sw=2:
zyz2011-vim
runtime/indent/scss.vim
Vim Script
gpl2
191
" Language: Verilog HDL " Maintainer: Chih-Tsun Huang <cthuang@larc.ee.nthu.edu.tw> " Last Change: 2011 Dec 10 by Thilo Six " URL: http://larc.ee.nthu.edu.tw/~cthuang/vim/indent/verilog.vim " " Credits: " Suggestions for improvement, bug reports by " Leo Butlero <lbutler@brocade.com> " " Buffer Variables: " b:verilog_indent_modules : indenting after the declaration " of module blocks " b:verilog_indent_width : indenting width " b:verilog_indent_verbose : verbose to each indenting " " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetVerilogIndent() setlocal indentkeys=!^F,o,O,0),=begin,=end,=join,=endcase setlocal indentkeys+==endmodule,=endfunction,=endtask,=endspecify setlocal indentkeys+==`else,=`endif " Only define the function once. if exists("*GetVerilogIndent") finish endif let s:cpo_save = &cpo set cpo&vim function GetVerilogIndent() if exists('b:verilog_indent_width') let offset = b:verilog_indent_width else let offset = &sw endif if exists('b:verilog_indent_modules') let indent_modules = offset else let indent_modules = 0 endif " Find a non-blank line above the current line. let lnum = prevnonblank(v:lnum - 1) " At the start of the file use zero indent. if lnum == 0 return 0 endif let lnum2 = prevnonblank(lnum - 1) let curr_line = getline(v:lnum) let last_line = getline(lnum) let last_line2 = getline(lnum2) let ind = indent(lnum) let ind2 = indent(lnum - 1) let offset_comment1 = 1 " Define the condition of an open statement " Exclude the match of //, /* or */ let vlog_openstat = '\(\<or\>\|\([*/]\)\@<![*(,{><+-/%^&|!=?:]\([*/]\)\@!\)' " Define the condition when the statement ends with a one-line comment let vlog_comment = '\(//.*\|/\*.*\*/\s*\)' if exists('b:verilog_indent_verbose') let vverb_str = 'INDENT VERBOSE:' let vverb = 1 else let vverb = 0 endif " Indent accoding to last line " End of multiple-line comment if last_line =~ '\*/\s*$' && last_line !~ '/\*.\{-}\*/' let ind = ind - offset_comment1 if vverb echo vverb_str "De-indent after a multiple-line comment." endif " Indent after if/else/for/case/always/initial/specify/fork blocks elseif last_line =~ '`\@<!\<\(if\|else\)\>' || \ last_line =~ '^\s*\<\(for\|case\%[[zx]]\)\>' || \ last_line =~ '^\s*\<\(always\|initial\)\>' || \ last_line =~ '^\s*\<\(specify\|fork\)\>' if last_line !~ '\(;\|\<end\>\)\s*' . vlog_comment . '*$' || \ last_line =~ '\(//\|/\*\).*\(;\|\<end\>\)\s*' . vlog_comment . '*$' let ind = ind + offset if vverb | echo vverb_str "Indent after a block statement." | endif endif " Indent after function/task blocks elseif last_line =~ '^\s*\<\(function\|task\)\>' if last_line !~ '\<end\>\s*' . vlog_comment . '*$' || \ last_line =~ '\(//\|/\*\).*\(;\|\<end\>\)\s*' . vlog_comment . '*$' let ind = ind + offset if vverb echo vverb_str "Indent after function/task block statement." endif endif " Indent after module/function/task/specify/fork blocks elseif last_line =~ '^\s*\<module\>' let ind = ind + indent_modules if vverb && indent_modules echo vverb_str "Indent after module statement." endif if last_line =~ '[(,]\s*' . vlog_comment . '*$' && \ last_line !~ '\(//\|/\*\).*[(,]\s*' . vlog_comment . '*$' let ind = ind + offset if vverb echo vverb_str "Indent after a multiple-line module statement." endif endif " Indent after a 'begin' statement elseif last_line =~ '\(\<begin\>\)\(\s*:\s*\w\+\)*' . vlog_comment . '*$' && \ last_line !~ '\(//\|/\*\).*\(\<begin\>\)' && \ ( last_line2 !~ vlog_openstat . '\s*' . vlog_comment . '*$' || \ last_line2 =~ '^\s*[^=!]\+\s*:\s*' . vlog_comment . '*$' ) let ind = ind + offset if vverb | echo vverb_str "Indent after begin statement." | endif " De-indent for the end of one-line block elseif ( last_line !~ '\<begin\>' || \ last_line =~ '\(//\|/\*\).*\<begin\>' ) && \ last_line2 =~ '\<\(`\@<!if\|`\@<!else\|for\|always\|initial\)\>.*' . \ vlog_comment . '*$' && \ last_line2 !~ \ '\(//\|/\*\).*\<\(`\@<!if\|`\@<!else\|for\|always\|initial\)\>' && \ last_line2 !~ vlog_openstat . '\s*' . vlog_comment . '*$' && \ ( last_line2 !~ '\<begin\>' || \ last_line2 =~ '\(//\|/\*\).*\<begin\>' ) let ind = ind - offset if vverb echo vverb_str "De-indent after the end of one-line statement." endif " Multiple-line statement (including case statement) " Open statement " Ident the first open line elseif last_line =~ vlog_openstat . '\s*' . vlog_comment . '*$' && \ last_line !~ '\(//\|/\*\).*' . vlog_openstat . '\s*$' && \ last_line2 !~ vlog_openstat . '\s*' . vlog_comment . '*$' let ind = ind + offset if vverb | echo vverb_str "Indent after an open statement." | endif " Close statement " De-indent for an optional close parenthesis and a semicolon, and only " if there exists precedent non-whitespace char elseif last_line =~ ')*\s*;\s*' . vlog_comment . '*$' && \ last_line !~ '^\s*)*\s*;\s*' . vlog_comment . '*$' && \ last_line !~ '\(//\|/\*\).*\S)*\s*;\s*' . vlog_comment . '*$' && \ ( last_line2 =~ vlog_openstat . '\s*' . vlog_comment . '*$' && \ last_line2 !~ ';\s*//.*$') && \ last_line2 !~ '^\s*' . vlog_comment . '$' let ind = ind - offset if vverb | echo vverb_str "De-indent after a close statement." | endif " `ifdef and `else elseif last_line =~ '^\s*`\<\(ifdef\|else\)\>' let ind = ind + offset if vverb echo vverb_str "Indent after a `ifdef or `else statement." endif endif " Re-indent current line " De-indent on the end of the block " join/end/endcase/endfunction/endtask/endspecify if curr_line =~ '^\s*\<\(join\|end\|endcase\)\>' || \ curr_line =~ '^\s*\<\(endfunction\|endtask\|endspecify\)\>' let ind = ind - offset if vverb | echo vverb_str "De-indent the end of a block." | endif elseif curr_line =~ '^\s*\<endmodule\>' let ind = ind - indent_modules if vverb && indent_modules echo vverb_str "De-indent the end of a module." endif " De-indent on a stand-alone 'begin' elseif curr_line =~ '^\s*\<begin\>' if last_line !~ '^\s*\<\(function\|task\|specify\|module\)\>' && \ last_line !~ '^\s*\()*\s*;\|)\+\)\s*' . vlog_comment . '*$' && \ ( last_line =~ \ '\<\(`\@<!if\|`\@<!else\|for\|case\%[[zx]]\|always\|initial\)\>' || \ last_line =~ ')\s*' . vlog_comment . '*$' || \ last_line =~ vlog_openstat . '\s*' . vlog_comment . '*$' ) let ind = ind - offset if vverb echo vverb_str "De-indent a stand alone begin statement." endif endif " De-indent after the end of multiple-line statement elseif curr_line =~ '^\s*)' && \ ( last_line =~ vlog_openstat . '\s*' . vlog_comment . '*$' || \ last_line !~ vlog_openstat . '\s*' . vlog_comment . '*$' && \ last_line2 =~ vlog_openstat . '\s*' . vlog_comment . '*$' ) let ind = ind - offset if vverb echo vverb_str "De-indent the end of a multiple statement." endif " De-indent `else and `endif elseif curr_line =~ '^\s*`\<\(else\|endif\)\>' let ind = ind - offset if vverb | echo vverb_str "De-indent `else and `endif statement." | endif endif " Return the indention return ind endfunction let &cpo = s:cpo_save unlet s:cpo_save " vim:sw=2
zyz2011-vim
runtime/indent/verilog.vim
Vim Script
gpl2
7,620
" Vim indent file " Language: Javascript " Maintainer: None! Wanna improve this? " Last Change: 2007 Jan 22 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 " C indenting is not too bad. setlocal cindent setlocal cinoptions+=j1,J1 let b:undo_indent = "setl cin<"
zyz2011-vim
runtime/indent/javascript.vim
Vim Script
gpl2
336
" Vim indent file " Language: C++ " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2008 Nov 29 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 " C++ indenting is built-in, thus this is very simple setlocal cindent let b:undo_indent = "setl cin<"
zyz2011-vim
runtime/indent/cpp.vim
Vim Script
gpl2
329
" PostScript indent file " Language: PostScript " Maintainer: Mike Williams <mrw@netcomuk.co.uk> " Last Change: 2nd July 2001 " " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=PostscrIndentGet(v:lnum) setlocal indentkeys+=0],0=>>,0=%%,0=end,0=restore,0=grestore indentkeys-=:,0#,e " Catch multiple instantiations if exists("*PostscrIndentGet") finish endif function! PostscrIndentGet(lnum) " Find a non-empty non-comment line above the current line. " Note: ignores DSC comments as well! let lnum = a:lnum - 1 while lnum != 0 let lnum = prevnonblank(lnum) if getline(lnum) !~ '^\s*%.*$' break endif let lnum = lnum - 1 endwhile " Hit the start of the file, use user indent. if lnum == 0 return -1 endif " Start with the indent of the previous line let ind = indent(lnum) let pline = getline(lnum) " Indent for dicts, arrays, and saves with possible trailing comment if pline =~ '\(begin\|<<\|g\=save\|{\|[\)\s*\(%.*\)\=$' let ind = ind + &sw endif " Remove indent for popped dicts, and restores. if pline =~ '\(end\|g\=restore\)\s*$' let ind = ind - &sw " Else handle immediate dedents of dicts, restores, and arrays. elseif getline(a:lnum) =~ '\(end\|>>\|g\=restore\|}\|]\)' let ind = ind - &sw " Else handle DSC comments - always start of line. elseif getline(a:lnum) =~ '^\s*%%' let ind = 0 endif " For now catch excessive left indents if they occur. if ind < 0 let ind = -1 endif return ind endfunction " vim:sw=2
zyz2011-vim
runtime/indent/postscr.vim
Vim Script
gpl2
1,622
" Vim indent file " Language: ANT files " Maintainer: David Fishburn <fishburn@ianywhere.com> " Last Change: Thu May 15 2003 10:02:54 PM " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif " Use XML formatting rules runtime! indent/xml.vim
zyz2011-vim
runtime/indent/ant.vim
Vim Script
gpl2
290
" Vim indent file " Language: PoV-Ray Scene Description Language " Maintainer: David Necas (Yeti) <yeti@physics.muni.cz> " Last Change: 2002-10-20 " URI: http://trific.ath.cx/Ftp/vim/indent/pov.vim " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 " Some preliminary settings. setlocal nolisp " Make sure lisp indenting doesn't supersede us. setlocal indentexpr=GetPoVRayIndent() setlocal indentkeys+==else,=end,0] " Only define the function once. if exists("*GetPoVRayIndent") finish endif " Counts matches of a regexp <rexp> in line number <line>. " Doesn't count matches inside strings and comments (as defined by current " syntax). function! s:MatchCount(line, rexp) let str = getline(a:line) let i = 0 let n = 0 while i >= 0 let i = matchend(str, a:rexp, i) if i >= 0 && synIDattr(synID(a:line, i, 0), "name") !~? "string\|comment" let n = n + 1 endif endwhile return n endfunction " The main function. Returns indent amount. function GetPoVRayIndent() " If we are inside a comment (may be nested in obscure ways), give up if synIDattr(synID(v:lnum, indent(v:lnum)+1, 0), "name") =~? "string\|comment" return -1 endif " Search backwards for the frist non-empty, non-comment line. let plnum = prevnonblank(v:lnum - 1) let plind = indent(plnum) while plnum > 0 && synIDattr(synID(plnum, plind+1, 0), "name") =~? "comment" let plnum = prevnonblank(plnum - 1) let plind = indent(plnum) endwhile " Start indenting from zero if plnum == 0 return 0 endif " Analyse previous nonempty line. let chg = 0 let chg = chg + s:MatchCount(plnum, '[[{(]') let chg = chg + s:MatchCount(plnum, '#\s*\%(if\|ifdef\|ifndef\|switch\|while\|macro\|else\)\>') let chg = chg - s:MatchCount(plnum, '#\s*end\>') let chg = chg - s:MatchCount(plnum, '[]})]') " Dirty hack for people writing #if and #else on the same line. let chg = chg - s:MatchCount(plnum, '#\s*\%(if\|ifdef\|ifndef\|switch\)\>.*#\s*else\>') " When chg > 0, then we opened groups and we should indent more, but when " chg < 0, we closed groups and this already affected the previous line, " so we should not dedent. And when everything else fails, scream. let chg = chg > 0 ? chg : 0 " Analyse current line " FIXME: If we have to dedent, we should try to find the indentation of the " opening line. let cur = s:MatchCount(v:lnum, '^\s*\%(#\s*\%(end\|else\)\>\|[]})]\)') if cur > 0 let final = plind + (chg - cur) * &sw else let final = plind + chg * &sw endif return final < 0 ? 0 : final endfunction
zyz2011-vim
runtime/indent/pov.vim
Vim Script
gpl2
2,643
" Vim indent file " Language: Tcl " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-12-20 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetTclIndent() setlocal indentkeys=0{,0},!^F,o,O,0] setlocal nosmartindent if exists("*GetTclIndent") finish endif function s:prevnonblanknoncomment(lnum) let lnum = prevnonblank(a:lnum) while lnum > 0 let line = getline(lnum) if line !~ '^\s*\(#\|$\)' break endif let lnum = prevnonblank(lnum - 1) endwhile return lnum endfunction function s:count_braces(lnum, count_open) let n_open = 0 let n_close = 0 let line = getline(a:lnum) let pattern = '[{}]' let i = match(line, pattern) while i != -1 if synIDattr(synID(a:lnum, i + 1, 0), 'name') !~ 'tcl\%(Comment\|String\)' if line[i] == '{' let n_open += 1 elseif line[i] == '}' if n_open > 0 let n_open -= 1 else let n_close += 1 endif endif endif let i = match(line, pattern, i + 1) endwhile return a:count_open ? n_open : n_close endfunction function GetTclIndent() let line = getline(v:lnum) if line =~ '^\s*\*' return cindent(v:lnum) elseif line =~ '^\s*}' return indent(v:lnum) - &sw endif let pnum = s:prevnonblanknoncomment(v:lnum - 1) if pnum == 0 return 0 endif let ind = indent(pnum) + s:count_braces(pnum, 1) * &sw let pline = getline(pnum) if pline =~ '}\s*$' let ind -= (s:count_braces(pnum, 0) - (pline =~ '^\s*}' ? 1 : 0)) * &sw endif return ind endfunction
zyz2011-vim
runtime/indent/tcl.vim
Vim Script
gpl2
1,602
" Vim indent file " Language: Treetop " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2011-03-14 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetTreetopIndent() setlocal indentkeys=0{,0},!^F,o,O,=end setlocal nosmartindent if exists("*GetTreetopIndent") finish endif function GetTreetopIndent() let pnum = prevnonblank(v:lnum - 1) if pnum == 0 return 0 endif let ind = indent(pnum) let line = getline(pnum) if line =~ '^\s*\%(grammar\|module\|rule\)\>' let ind += &sw endif let line = getline(v:lnum) if line =~ '^\s*end\>' let ind -= &sw end retur ind endfunction
zyz2011-vim
runtime/indent/treetop.vim
Vim Script
gpl2
677
" Vim indent file " Language: PHP " Author: John Wellesz <John.wellesz (AT) teaser (DOT) fr> " URL: http://www.2072productions.com/vim/indent/php.vim " Last Change: 2010 Jully 26th " Newsletter: http://www.2072productions.com/?to=php-indent-for-vim-newsletter.php " Version: 1.33 " " " If you find a bug, please report it on GitHub: " http://github.com/2072/PHP-Indenting-for-VIm/issues " with an example of code that breaks the algorithm. " " " Thanks a lot for using this script. " " " NOTE: This script must be used with PHP syntax ON and with the php syntax " script by Lutz Eymers (http://www.ipdienste.net/data/php.vim ) or with the " script by Peter Hodge (http://www.vim.org/scripts/script.php?script_id=1571 ) " the later is bunbdled by default with Vim 7. " " " In the case you have syntax errors in your script such as HereDoc end " identifiers not at col 1 you'll have to indent your file 2 times (This " script will automatically put HereDoc end identifiers at col 1 if " they are followed by a ';'). " " " NOTE: If you are editing files in Unix file format and that (by accident) " there are '\r' before new lines, this script won't be able to proceed " correctly and will make many mistakes because it won't be able to match " '\s*$' correctly. " So you have to remove those useless characters first with a command like: " " :%s /\r$//g " " or simply 'let' the option PHP_removeCRwhenUnix to 1 and the script will " silently remove them when VIM load this script (at each bufread). " " Options: See :help php-indent for available options. if exists("b:did_indent") finish endif let b:did_indent = 1 let php_sync_method = 0 if exists("PHP_default_indenting") let b:PHP_default_indenting = PHP_default_indenting * &sw else let b:PHP_default_indenting = 0 endif if exists("PHP_BracesAtCodeLevel") let b:PHP_BracesAtCodeLevel = PHP_BracesAtCodeLevel else let b:PHP_BracesAtCodeLevel = 0 endif if exists("PHP_autoformatcomment") let b:PHP_autoformatcomment = PHP_autoformatcomment else let b:PHP_autoformatcomment = 1 endif if exists("PHP_outdentphpescape") let b:PHP_outdentphpescape = PHP_outdentphpescape else let b:PHP_outdentphpescape = 1 endif if exists("PHP_vintage_case_default_indent") && PHP_vintage_case_default_indent let b:PHP_vintage_case_default_indent = 1 else let b:PHP_vintage_case_default_indent = 0 endif let b:PHP_lastindented = 0 let b:PHP_indentbeforelast = 0 let b:PHP_indentinghuge = 0 let b:PHP_CurrentIndentLevel = b:PHP_default_indenting let b:PHP_LastIndentedWasComment = 0 let b:PHP_InsideMultilineComment = 0 let b:InPHPcode = 0 let b:InPHPcode_checked = 0 let b:InPHPcode_and_script = 0 let b:InPHPcode_tofind = "" let b:PHP_oldchangetick = b:changedtick let b:UserIsTypingComment = 0 let b:optionsset = 0 setlocal nosmartindent setlocal noautoindent setlocal nocindent setlocal nolisp setlocal indentexpr=GetPhpIndent() setlocal indentkeys=0{,0},0),:,!^F,o,O,e,*<Return>,=?>,=<?,=*/ let s:searchpairflags = 'bWr' if &fileformat == "unix" && exists("PHP_removeCRwhenUnix") && PHP_removeCRwhenUnix silent! %s/\r$//g endif if exists("*GetPhpIndent") call ResetPhpOptions() finish endif let s:endline= '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$' let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!' function! GetLastRealCodeLNum(startline) " {{{ let lnum = a:startline if b:GetLastRealCodeLNum_ADD && b:GetLastRealCodeLNum_ADD == lnum + 1 let lnum = b:GetLastRealCodeLNum_ADD endif let old_lnum = lnum while lnum > 1 let lnum = prevnonblank(lnum) let lastline = getline(lnum) if b:InPHPcode_and_script && lastline =~ '?>\s*$' let lnum = lnum - 1 elseif lastline =~ '^\s*?>.*<?\%(php\)\=\s*$' let lnum = lnum - 1 elseif lastline =~ '^\s*\%(//\|#\|/\*.*\*/\s*$\)' let lnum = lnum - 1 elseif lastline =~ '\*/\s*$' call cursor(lnum, 1) if lastline !~ '^\*/' call search('\*/', 'W') endif let lnum = searchpair('/\*', '', '\*/', s:searchpairflags, 'Skippmatch2()') let lastline = getline(lnum) if lastline =~ '^\s*/\*' let lnum = lnum - 1 else break endif elseif lastline =~? '\%(//\s*\|?>.*\)\@<!<?\%(php\)\=\s*$\|^\s*<script\>' while lastline !~ '\(<?.*\)\@<!?>' && lnum > 1 let lnum = lnum - 1 let lastline = getline(lnum) endwhile if lastline =~ '^\s*?>' let lnum = lnum - 1 else break endif elseif lastline =~? '^\a\w*;\=$' && lastline !~? s:notPhpHereDoc let tofind=substitute( lastline, '\(\a\w*\);\=', '<<<''\\=\1''\\=$', '') while getline(lnum) !~? tofind && lnum > 1 let lnum = lnum - 1 endwhile else break endif endwhile if lnum==1 && getline(lnum) !~ '<?' let lnum=0 endif if b:InPHPcode_and_script && !b:InPHPcode let b:InPHPcode_and_script = 0 endif return lnum endfunction " }}} function! Skippmatch2() let line = getline(".") if line =~ '\%(".*\)\@<=/\*\%(.*"\)\@=' || line =~ '\%(\%(//\|#\).*\)\@<=/\*' return 1 else return 0 endif endfun function! Skippmatch() " {{{ let synname = synIDattr(synID(line("."), col("."), 0), "name") if synname == "Delimiter" || synname == "phpRegionDelimiter" || synname =~# "^phpParent" || synname == "phpArrayParens" || synname =~# '^php\%(Block\|Brace\)' || synname == "javaScriptBraces" || synname =~# "^phpComment" && b:UserIsTypingComment return 0 else return 1 endif endfun " }}} function! FindOpenBracket(lnum) " {{{ call cursor(a:lnum, 1) return searchpair('{', '', '}', 'bW', 'Skippmatch()') endfun " }}} function! FindTheIfOfAnElse (lnum, StopAfterFirstPrevElse) " {{{ if getline(a:lnum) =~# '^\s*}\s*else\%(if\)\=\>' let beforeelse = a:lnum else let beforeelse = GetLastRealCodeLNum(a:lnum - 1) endif if !s:level let s:iftoskip = 0 endif if getline(beforeelse) =~# '^\s*\%(}\s*\)\=else\%(\s*if\)\@!\>' let s:iftoskip = s:iftoskip + 1 endif if getline(beforeelse) =~ '^\s*}' let beforeelse = FindOpenBracket(beforeelse) if getline(beforeelse) =~ '^\s*{' let beforeelse = GetLastRealCodeLNum(beforeelse - 1) endif endif if !s:iftoskip && a:StopAfterFirstPrevElse && getline(beforeelse) =~# '^\s*\%([}]\s*\)\=else\%(if\)\=\>' return beforeelse endif if getline(beforeelse) !~# '^\s*if\>' && beforeelse>1 || s:iftoskip && beforeelse>1 if s:iftoskip && getline(beforeelse) =~# '^\s*if\>' let s:iftoskip = s:iftoskip - 1 endif let s:level = s:level + 1 let beforeelse = FindTheIfOfAnElse(beforeelse, a:StopAfterFirstPrevElse) endif return beforeelse endfunction " }}} let s:defaultORcase = '^\s*\%(default\|case\).*:' function! FindTheSwitchIndent (lnum) " {{{ let test = GetLastRealCodeLNum(a:lnum - 1) if test <= 1 return indent(1) - &sw * b:PHP_vintage_case_default_indent end if getline(test) =~ '^\s*}' let test = FindOpenBracket(test) if getline(test) =~ '^\s*{' let test = GetLastRealCodeLNum(GetLastRealCodeLNum(test - 1) - 1) endif endif if getline(test) =~# '^\s*switch\>' return indent(test) elseif getline(test) =~# s:defaultORcase return indent(test) - &sw * b:PHP_vintage_case_default_indent else return FindTheSwitchIndent(test) endif endfunction "}}} function! IslinePHP (lnum, tofind) " {{{ let cline = getline(a:lnum) if a:tofind=="" let tofind = "^\\s*[\"']*\\s*\\zs\\S" else let tofind = a:tofind endif let tofind = tofind . '\c' let coltotest = match (cline, tofind) + 1 let synname = synIDattr(synID(a:lnum, coltotest, 0), "name") if synname =~ '^php' || synname=="Delimiter" || synname =~? '^javaScript' return synname else return "" endif endfunction " }}} let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\|else\)' let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|else\>\|while\>\|switch\>\|case\>\|default\>\|for\%(each\)\=\>\|declare\>\|class\>\|interface\>\|abstract\>\|try\>\|catch\>\)' let s:autoresetoptions = 0 if ! s:autoresetoptions let s:autoresetoptions = 1 endif function! ResetPhpOptions() if ! b:optionsset && &filetype == "php" if b:PHP_autoformatcomment setlocal comments=s1:/*,mb:*,ex:*/,://,:# setlocal formatoptions-=t setlocal formatoptions+=q setlocal formatoptions+=r setlocal formatoptions+=o setlocal formatoptions+=w setlocal formatoptions+=c setlocal formatoptions+=b endif let b:optionsset = 1 endif endfunc call ResetPhpOptions() function! GetPhpIndent() let b:GetLastRealCodeLNum_ADD = 0 let UserIsEditing=0 if b:PHP_oldchangetick != b:changedtick let b:PHP_oldchangetick = b:changedtick let UserIsEditing=1 endif if b:PHP_default_indenting let b:PHP_default_indenting = g:PHP_default_indenting * &sw endif let cline = getline(v:lnum) if !b:PHP_indentinghuge && b:PHP_lastindented > b:PHP_indentbeforelast if b:PHP_indentbeforelast let b:PHP_indentinghuge = 1 echom 'Large indenting detected, speed optimizations engaged (v1.33)' endif let b:PHP_indentbeforelast = b:PHP_lastindented endif if b:InPHPcode_checked && prevnonblank(v:lnum - 1) != b:PHP_lastindented if b:PHP_indentinghuge echom 'Large indenting deactivated' let b:PHP_indentinghuge = 0 let b:PHP_CurrentIndentLevel = b:PHP_default_indenting endif let b:PHP_lastindented = v:lnum let b:PHP_LastIndentedWasComment=0 let b:PHP_InsideMultilineComment=0 let b:PHP_indentbeforelast = 0 let b:InPHPcode = 0 let b:InPHPcode_checked = 0 let b:InPHPcode_and_script = 0 let b:InPHPcode_tofind = "" elseif v:lnum > b:PHP_lastindented let real_PHP_lastindented = b:PHP_lastindented let b:PHP_lastindented = v:lnum endif if !b:InPHPcode_checked " {{{ One time check let b:InPHPcode_checked = 1 let synname = "" if cline !~ '<?.*?>' let synname = IslinePHP (prevnonblank(v:lnum), "") endif if synname!="" if synname != "phpHereDoc" && synname != "phpHereDocDelimiter" let b:InPHPcode = 1 let b:InPHPcode_tofind = "" if synname =~# "^phpComment" let b:UserIsTypingComment = 1 else let b:UserIsTypingComment = 0 endif if synname =~? '^javaScript' let b:InPHPcode_and_script = 1 endif else let b:InPHPcode = 0 let b:UserIsTypingComment = 0 let lnum = v:lnum - 1 while getline(lnum) !~? '<<<''\=\a\w*''\=$' && lnum > 1 let lnum = lnum - 1 endwhile let b:InPHPcode_tofind = substitute( getline(lnum), '^.*<<<''\=\(\a\w*\)''\=$', '^\\s*\1;\\=$', '') endif else let b:InPHPcode = 0 let b:UserIsTypingComment = 0 let b:InPHPcode_tofind = '<?\%(.*?>\)\@!\|<script.*>' endif endif "!b:InPHPcode_checked }}} " Test if we are indenting PHP code {{{ let lnum = prevnonblank(v:lnum - 1) let last_line = getline(lnum) if b:InPHPcode_tofind!="" if cline =~? b:InPHPcode_tofind let b:InPHPcode = 1 let b:InPHPcode_tofind = "" let b:UserIsTypingComment = 0 if cline =~ '\*/' call cursor(v:lnum, 1) if cline !~ '^\*/' call search('\*/', 'W') endif let lnum = searchpair('/\*', '', '\*/', s:searchpairflags, 'Skippmatch2()') let b:PHP_CurrentIndentLevel = b:PHP_default_indenting let b:PHP_LastIndentedWasComment = 0 if cline =~ '^\s*\*/' return indent(lnum) + 1 else return indent(lnum) endif elseif cline =~? '<script\>' let b:InPHPcode_and_script = 1 let b:GetLastRealCodeLNum_ADD = v:lnum endif endif endif if b:InPHPcode if !b:InPHPcode_and_script && last_line =~ '\%(<?.*\)\@<!?>\%(.*<?\)\@!' && IslinePHP(lnum, '?>')=~"Delimiter" if cline !~? s:PHP_startindenttag let b:InPHPcode = 0 let b:InPHPcode_tofind = s:PHP_startindenttag elseif cline =~? '<script\>' let b:InPHPcode_and_script = 1 endif elseif last_line =~? '<<<''\=\a\w*''\=$' let b:InPHPcode = 0 let b:InPHPcode_tofind = substitute( last_line, '^.*<<<''\=\(\a\w*\)''\=$', '^\\s*\1;\\=$', '') elseif !UserIsEditing && cline =~ '^\s*/\*\%(.*\*/\)\@!' && getline(v:lnum + 1) !~ '^\s*\*' let b:InPHPcode = 0 let b:InPHPcode_tofind = '\*/' elseif cline =~? '^\s*</script>' let b:InPHPcode = 0 let b:InPHPcode_tofind = s:PHP_startindenttag endif endif " }}} if !b:InPHPcode && !b:InPHPcode_and_script return -1 endif " Indent successive // or # comment the same way the first is {{{ if cline =~ '^\s*\%(//\|#\|/\*.*\*/\s*$\)' if b:PHP_LastIndentedWasComment == 1 return indent(real_PHP_lastindented) endif let b:PHP_LastIndentedWasComment = 1 else let b:PHP_LastIndentedWasComment = 0 endif " }}} " Indent multiline /* comments correctly {{{ if b:PHP_InsideMultilineComment || b:UserIsTypingComment if cline =~ '^\s*\*\%(\/\)\@!' if last_line =~ '^\s*/\*' return indent(lnum) + 1 else return indent(lnum) endif else let b:PHP_InsideMultilineComment = 0 endif endif if !b:PHP_InsideMultilineComment && cline =~ '^\s*/\*' && cline !~ '\*/\s*$' if getline(v:lnum + 1) !~ '^\s*\*' return -1 endif let b:PHP_InsideMultilineComment = 1 endif " }}} " Things always indented at col 1 (PHP delimiter: <?, ?>, Heredoc end) {{{ if cline =~# '^\s*<?' && cline !~ '?>' && b:PHP_outdentphpescape return 0 endif if cline =~ '^\s*?>' && cline !~# '<?' && b:PHP_outdentphpescape return 0 endif if cline =~? '^\s*\a\w*;$\|^\a\w*$' && cline !~? s:notPhpHereDoc return 0 endif " }}} let s:level = 0 let lnum = GetLastRealCodeLNum(v:lnum - 1) let last_line = getline(lnum) let ind = indent(lnum) let endline= s:endline if ind==0 && b:PHP_default_indenting let ind = b:PHP_default_indenting endif if lnum == 0 return b:PHP_default_indenting endif if cline =~ '^\s*}\%(}}\)\@!' let ind = indent(FindOpenBracket(v:lnum)) let b:PHP_CurrentIndentLevel = b:PHP_default_indenting return ind endif if cline =~ '^\s*\*/' call cursor(v:lnum, 1) if cline !~ '^\*/' call search('\*/', 'W') endif let lnum = searchpair('/\*', '', '\*/', s:searchpairflags, 'Skippmatch2()') let b:PHP_CurrentIndentLevel = b:PHP_default_indenting if cline =~ '^\s*\*/' return indent(lnum) + 1 else return indent(lnum) endif endif if last_line =~ '[;}]'.endline && last_line !~ '^)' && last_line !~# s:defaultORcase if ind==b:PHP_default_indenting return b:PHP_default_indenting elseif b:PHP_indentinghuge && ind==b:PHP_CurrentIndentLevel && cline !~# '^\s*\%(else\|\%(case\|default\).*:\|[})];\=\)' && last_line !~# '^\s*\%(\%(}\s*\)\=else\)' && getline(GetLastRealCodeLNum(lnum - 1))=~';'.endline return b:PHP_CurrentIndentLevel endif endif let LastLineClosed = 0 let terminated = '\%(;\%(\s*?>\)\=\|<<<''\=\a\w*''\=$\|^\s*}\)'.endline let unstated = '\%(^\s*'.s:blockstart.'.*)\|\%(//.*\)\@<!\<e'.'lse\>\)'.endline if ind != b:PHP_default_indenting && cline =~# '^\s*else\%(if\)\=\>' let b:PHP_CurrentIndentLevel = b:PHP_default_indenting return indent(FindTheIfOfAnElse(v:lnum, 1)) elseif cline =~# s:defaultORcase return FindTheSwitchIndent(v:lnum) + &sw * b:PHP_vintage_case_default_indent elseif cline =~ '^\s*)\=\s*{' let previous_line = last_line let last_line_num = lnum while last_line_num > 1 if previous_line =~ '^\s*\%(' . s:blockstart . '\|\%([a-zA-Z]\s*\)*function\)' let ind = indent(last_line_num) if b:PHP_BracesAtCodeLevel let ind = ind + &sw endif return ind endif let last_line_num = last_line_num - 1 let previous_line = getline(last_line_num) endwhile elseif last_line =~# unstated && cline !~ '^\s*);\='.endline let ind = ind + &sw return ind elseif (ind != b:PHP_default_indenting || last_line =~ '^)' ) && last_line =~ terminated let previous_line = last_line let last_line_num = lnum let LastLineClosed = 1 while 1 if previous_line =~ '^\s*}' let last_line_num = FindOpenBracket(last_line_num) if getline(last_line_num) =~ '^\s*{' let last_line_num = GetLastRealCodeLNum(last_line_num - 1) endif let previous_line = getline(last_line_num) continue else if getline(last_line_num) =~# '^\s*else\%(if\)\=\>' let last_line_num = FindTheIfOfAnElse(last_line_num, 0) continue endif let last_match = last_line_num let one_ahead_indent = indent(last_line_num) let last_line_num = GetLastRealCodeLNum(last_line_num - 1) let two_ahead_indent = indent(last_line_num) let after_previous_line = previous_line let previous_line = getline(last_line_num) if previous_line =~# s:defaultORcase.'\|{'.endline break endif if after_previous_line=~# '^\s*'.s:blockstart.'.*)'.endline && previous_line =~# '[;}]'.endline break endif if one_ahead_indent == two_ahead_indent || last_line_num < 1 if previous_line =~# '\%(;\|^\s*}\)'.endline || last_line_num < 1 break endif endif endif endwhile if indent(last_match) != ind let ind = indent(last_match) let b:PHP_CurrentIndentLevel = b:PHP_default_indenting return ind endif endif let plinnum = GetLastRealCodeLNum(lnum - 1) let AntepenultimateLine = getline(plinnum) let last_line = substitute(last_line,"\\(//\\|#\\)\\(\\(\\([^\"']*\\([\"']\\)[^\"']*\\5\\)\\+[^\"']*$\\)\\|\\([^\"']*$\\)\\)",'','') if ind == b:PHP_default_indenting if last_line =~ terminated let LastLineClosed = 1 endif endif if !LastLineClosed if last_line =~# '[{(]'.endline || last_line =~? '\h\w*\s*(.*,$' && AntepenultimateLine !~ '[,(]'.endline if !b:PHP_BracesAtCodeLevel || last_line !~# '^\s*{' let ind = ind + &sw endif if b:PHP_BracesAtCodeLevel || b:PHP_vintage_case_default_indent == 1 let b:PHP_CurrentIndentLevel = ind return ind endif elseif last_line =~ '\S\+\s*),'.endline call cursor(lnum, 1) call search('),'.endline, 'W') let openedparent = searchpair('(', '', ')', 'bW', 'Skippmatch()') if openedparent != lnum let ind = indent(openedparent) endif elseif last_line =~ '^\s*'.s:blockstart let ind = ind + &sw elseif AntepenultimateLine =~ '\%(;\%(\s*?>\)\=\|<<<''\=\a\w*''\=$\|^\s*}\|{\)'.endline . '\|' . s:defaultORcase let ind = ind + &sw endif endif if cline =~ '^\s*);\=' let ind = ind - &sw endif let b:PHP_CurrentIndentLevel = ind return ind endfunction
zyz2011-vim
runtime/indent/php.vim
Vim Script
gpl2
18,603
" Vim indent file " Language: Vim script " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2012 May 20 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetVimIndent() setlocal indentkeys+==end,=else,=cat,=fina,=END,0\\ let b:undo_indent = "setl indentkeys< indentexpr<" " Only define the function once. if exists("*GetVimIndent") finish endif let s:keepcpo= &cpo set cpo&vim function GetVimIndent() " Find a non-blank line above the current line. let lnum = prevnonblank(v:lnum - 1) " If the current line doesn't start with '\' and below a line that starts " with '\', use the indent of the line above it. if getline(v:lnum) !~ '^\s*\\' while lnum > 0 && getline(lnum) =~ '^\s*\\' let lnum = lnum - 1 endwhile endif " At the start of the file use zero indent. if lnum == 0 return 0 endif " Add a 'shiftwidth' after :if, :while, :try, :catch, :finally, :function " and :else. Add it three times for a line that starts with '\' after " a line that doesn't (or g:vim_indent_cont if it exists). let ind = indent(lnum) if getline(v:lnum) =~ '^\s*\\' && v:lnum > 1 && getline(lnum) !~ '^\s*\\' if exists("g:vim_indent_cont") let ind = ind + g:vim_indent_cont else let ind = ind + &sw * 3 endif elseif getline(lnum) =~ '^\s*aug\%[roup]' && getline(lnum) !~ '^\s*aug\%[roup]\s*!\=\s\+END' let ind = ind + &sw else let line = getline(lnum) let i = match(line, '\(^\||\)\s*\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\%[lly]\|fu\%[nction]\|el\%[seif]\)\>') if i >= 0 let ind += &sw if strpart(line, i, 1) == '|' && has('syntax_items') \ && synIDattr(synID(lnum, i, 1), "name") =~ '\(Comment\|String\)$' let ind -= &sw endif endif endif " If the previous line contains an "end" after a pipe, but not in an ":au" " command. And not when there is a backslash before the pipe. " And when syntax HL is enabled avoid a match inside a string. let line = getline(lnum) let i = match(line, '[^\\]|\s*\(ene\@!\)') if i > 0 && line !~ '^\s*au\%[tocmd]' if !has('syntax_items') || synIDattr(synID(lnum, i + 2, 1), "name") !~ '\(Comment\|String\)$' let ind = ind - &sw endif endif " Subtract a 'shiftwidth' on a :endif, :endwhile, :catch, :finally, :endtry, " :endfun, :else and :augroup END. if getline(v:lnum) =~ '^\s*\(ene\@!\|cat\|fina\|el\|aug\%[roup]\s*!\=\s\+END\)' let ind = ind - &sw endif return ind endfunction let &cpo = s:keepcpo unlet s:keepcpo " vim:sw=2
zyz2011-vim
runtime/indent/vim.vim
Vim Script
gpl2
2,636
" Vim indent file " Language: reStructuredText Documentation Format " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2011-08-03 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetRSTIndent() setlocal indentkeys=!^F,o,O setlocal nosmartindent if exists("*GetRSTIndent") finish endif let s:itemization_pattern = '^\s*[-*+]\s' let s:enumeration_pattern = '^\s*\%(\d\+\|#\)\.\s\+' function GetRSTIndent() let lnum = prevnonblank(v:lnum - 1) if lnum == 0 return 0 endif let ind = indent(lnum) let line = getline(lnum) if line =~ s:itemization_pattern let ind += 2 elseif line =~ s:enumeration_pattern let ind += matchend(line, s:enumeration_pattern) endif let line = getline(v:lnum - 1) " Indent :FIELD: lines. Don’t match if there is no text after the field or " if the text ends with a sent-ender. if line =~ '^:.\+:\s\{-1,\}\S.\+[^.!?:]$' return matchend(line, '^:.\{-1,}:\s\+') endif if line =~ '^\s*$' execute lnum call search('^\s*\%([-*+]\s\|\%(\d\+\|#\)\.\s\|\.\.\|$\)', 'bW') let line = getline('.') if line =~ s:itemization_pattern let ind -= 2 elseif line =~ s:enumeration_pattern let ind -= matchend(line, s:enumeration_pattern) elseif line =~ '^\s*\.\.' let ind -= 3 endif endif return ind endfunction
zyz2011-vim
runtime/indent/rst.vim
Vim Script
gpl2
1,387
" Vim indent file " Language: SQL " Maintainer: David Fishburn <fishburn at ianywhere dot com> " Last Change: Mon Apr 02 2007 9:13:47 AM " Version: 1.5 " Download: http://vim.sourceforge.net/script.php?script_id=495 " Notes: " Indenting keywords are based on Oracle and Sybase Adaptive Server " Anywhere (ASA). Test indenting was done with ASA stored procedures and " fuctions and Oracle packages which contain stored procedures and " functions. " This has not been tested against Microsoft SQL Server or " Sybase Adaptive Server Enterprise (ASE) which use the Transact-SQL " syntax. That syntax does not have end tags for IF's, which makes " indenting more difficult. " " Known Issues: " The Oracle MERGE statement does not have an end tag associated with " it, this can leave the indent hanging to the right one too many. " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 let b:current_indent = "sqlanywhere" setlocal indentkeys-=0{ setlocal indentkeys-=0} setlocal indentkeys-=: setlocal indentkeys-=0# setlocal indentkeys-=e " This indicates formatting should take place when one of these " expressions is used. These expressions would normally be something " you would type at the BEGINNING of a line " SQL is generally case insensitive, so this files assumes that " These keywords are something that would trigger an indent LEFT, not " an indent right, since the SQLBlockStart is used for those keywords setlocal indentkeys+==~end,=~else,=~elseif,=~elsif,0=~when,0=) " GetSQLIndent is executed whenever one of the expressions " in the indentkeys is typed setlocal indentexpr=GetSQLIndent() " Only define the functions once. if exists("*GetSQLIndent") finish endif let s:keepcpo= &cpo set cpo&vim " List of all the statements that start a new block. " These are typically words that start a line. " IS is excluded, since it is difficult to determine when the " ending block is (especially for procedures/functions). let s:SQLBlockStart = '^\s*\%('. \ 'if\|else\|elseif\|elsif\|'. \ 'while\|loop\|do\|'. \ 'begin\|'. \ 'case\|when\|merge\|exception'. \ '\)\>' let s:SQLBlockEnd = '^\s*\(end\)\>' " The indent level is also based on unmatched paranethesis " If a line has an extra "(" increase the indent " If a line has an extra ")" decrease the indent function s:CountUnbalancedParan( line, paran_to_check ) let l = a:line let lp = substitute(l, '[^(]', '', 'g') let l = a:line let rp = substitute(l, '[^)]', '', 'g') if a:paran_to_check =~ ')' " echom 'CountUnbalancedParan ) returning: ' . " \ (strlen(rp) - strlen(lp)) return (strlen(rp) - strlen(lp)) elseif a:paran_to_check =~ '(' " echom 'CountUnbalancedParan ( returning: ' . " \ (strlen(lp) - strlen(rp)) return (strlen(lp) - strlen(rp)) else " echom 'CountUnbalancedParan unknown paran to check: ' . " \ a:paran_to_check return 0 endif endfunction " Unindent commands based on previous indent level function s:CheckToIgnoreRightParan( prev_lnum, num_levels ) let lnum = a:prev_lnum let line = getline(lnum) let ends = 0 let num_right_paran = a:num_levels let ignore_paran = 0 let vircol = 1 while num_right_paran > 0 silent! exec 'norm! '.lnum."G\<bar>".vircol."\<bar>" let right_paran = search( ')', 'W' ) if right_paran != lnum " This should not happen since there should be at least " num_right_paran matches for this line break endif let vircol = virtcol(".") " if getline(".") =~ '^)' let matching_paran = searchpair('(', '', ')', 'bW', \ 's:IsColComment(line("."), col("."))') if matching_paran < 1 " No match found " echom 'CTIRP - no match found, ignoring' break endif if matching_paran == lnum " This was not an unmatched parantenses, start the search again " again after this column " echom 'CTIRP - same line match, ignoring' continue endif " echom 'CTIRP - match: ' . line(".") . ' ' . getline(".") if getline(matching_paran) =~? '\(if\|while\)\>' " echom 'CTIRP - if/while ignored: ' . line(".") . ' ' . getline(".") let ignore_paran = ignore_paran + 1 endif " One match found, decrease and check for further matches let num_right_paran = num_right_paran - 1 endwhile " Fallback - just move back one " return a:prev_indent - &sw return ignore_paran endfunction " Based on the keyword provided, loop through previous non empty " non comment lines to find the statement that initated the keyword. " Return its indent level " CASE .. " WHEN ... " Should return indent level of CASE " EXCEPTION .. " WHEN ... " something; " WHEN ... " Should return indent level of exception. function s:GetStmtStarterIndent( keyword, curr_lnum ) let lnum = a:curr_lnum " Default - reduce indent by 1 let ind = indent(a:curr_lnum) - &sw if a:keyword =~? 'end' exec 'normal! ^' let stmts = '^\s*\%('. \ '\<begin\>\|' . \ '\%(\%(\<end\s\+\)\@<!\<loop\>\)\|' . \ '\%(\%(\<end\s\+\)\@<!\<case\>\)\|' . \ '\%(\%(\<end\s\+\)\@<!\<for\>\)\|' . \ '\%(\%(\<end\s\+\)\@<!\<if\>\)'. \ '\)' let matching_lnum = searchpair(stmts, '', '\<end\>\zs', 'bW', \ 's:IsColComment(line("."), col(".")) == 1') exec 'normal! $' if matching_lnum > 0 && matching_lnum < a:curr_lnum let ind = indent(matching_lnum) endif elseif a:keyword =~? 'when' exec 'normal! ^' let matching_lnum = searchpair( \ '\%(\<end\s\+\)\@<!\<case\>\|\<exception\>\|\<merge\>', \ '', \ '\%(\%(\<when\s\+others\>\)\|\%(\<end\s\+case\>\)\)', \ 'bW', \ 's:IsColComment(line("."), col(".")) == 1') exec 'normal! $' if matching_lnum > 0 && matching_lnum < a:curr_lnum let ind = indent(matching_lnum) else let ind = indent(a:curr_lnum) endif endif return ind endfunction " Check if the line is a comment function s:IsLineComment(lnum) let rc = synIDattr( \ synID(a:lnum, \ match(getline(a:lnum), '\S')+1, 0) \ , "name") \ =~? "comment" return rc endfunction " Check if the column is a comment function s:IsColComment(lnum, cnum) let rc = synIDattr(synID(a:lnum, a:cnum, 0), "name") \ =~? "comment" return rc endfunction " Instead of returning a column position, return " an appropriate value as a factor of shiftwidth. function s:ModuloIndent(ind) let ind = a:ind if ind > 0 let modulo = ind % &shiftwidth if modulo > 0 let ind = ind - modulo endif endif return ind endfunction " Find correct indent of a new line based upon the previous line function GetSQLIndent() let lnum = v:lnum let ind = indent(lnum) " If the current line is a comment, leave the indent as is " Comment out this additional check since it affects the " indenting of =, and will not reindent comments as it should " if s:IsLineComment(lnum) == 1 " return ind " endif " while 1 " Get previous non-blank line let prevlnum = prevnonblank(lnum - 1) if prevlnum <= 0 return ind endif if s:IsLineComment(prevlnum) == 1 if getline(v:lnum) =~ '^\s*\*' let ind = s:ModuloIndent(indent(prevlnum)) return ind + 1 endif " If the previous line is a comment, then return -1 " to tell Vim to use the formatoptions setting to determine " the indent to use " But only if the next line is blank. This would be true if " the user is typing, but it would not be true if the user " is reindenting the file if getline(v:lnum) =~ '^\s*$' return -1 endif endif " let prevline = getline(prevlnum) " if prevline !~ '^\s*$' " " echom 'previous non blank - break: ' . prevline " break " endif " endwhile " echom 'PREVIOUS INDENT: ' . indent(prevlnum) . ' LINE: ' . getline(prevlnum) " This is the line you just hit return on, it is not the current line " which is new and empty " Based on this line, we can determine how much to indent the new " line " Get default indent (from prev. line) let ind = indent(prevlnum) let prevline = getline(prevlnum) " Now check what's on the previous line to determine if the indent " should be changed, for example IF, BEGIN, should increase the indent " where END IF, END, should decrease the indent. if prevline =~? s:SQLBlockStart " Move indent in let ind = ind + &sw " echom 'prevl - SQLBlockStart - indent ' . ind . ' line: ' . prevline elseif prevline =~ '[()]' if prevline =~ '(' let num_unmatched_left = s:CountUnbalancedParan( prevline, '(' ) else let num_unmatched_left = 0 endif if prevline =~ ')' let num_unmatched_right = s:CountUnbalancedParan( prevline, ')' ) else let num_unmatched_right = 0 " let num_unmatched_right = s:CountUnbalancedParan( prevline, ')' ) endif if num_unmatched_left > 0 " There is a open left paranethesis " increase indent let ind = ind + ( &sw * num_unmatched_left ) elseif num_unmatched_right > 0 " if it is an unbalanced paranethesis only unindent if " it was part of a command (ie create table(..) ) " instead of part of an if (ie if (....) then) which should " maintain the indent level let ignore = s:CheckToIgnoreRightParan( prevlnum, num_unmatched_right ) " echom 'prevl - ) unbalanced - CTIRP - ignore: ' . ignore if prevline =~ '^\s*)' let ignore = ignore + 1 " echom 'prevl - begins ) unbalanced ignore: ' . ignore endif if (num_unmatched_right - ignore) > 0 let ind = ind - ( &sw * (num_unmatched_right - ignore) ) endif endif endif " echom 'CURRENT INDENT: ' . ind . ' LINE: ' . getline(v:lnum) " This is a new blank line since we just typed a carriage return " Check current line; search for simplistic matching start-of-block let line = getline(v:lnum) if line =~? '^\s*els' " Any line when you type else will automatically back up one " ident level (ie else, elseif, elsif) let ind = ind - &sw " echom 'curr - else - indent ' . ind elseif line =~? '^\s*end\>' let ind = s:GetStmtStarterIndent('end', v:lnum) " General case for end " let ind = ind - &sw " echom 'curr - end - indent ' . ind elseif line =~? '^\s*when\>' let ind = s:GetStmtStarterIndent('when', v:lnum) " If the WHEN clause is used with a MERGE or EXCEPTION " clause, do not change the indent level, since these " statements do not have a corresponding END statement. " if stmt_starter =~? 'case' " let ind = ind - &sw " endif " elseif line =~ '^\s*)\s*;\?\s*$' " elseif line =~ '^\s*)' elseif line =~ '^\s*)' let num_unmatched_right = s:CountUnbalancedParan( line, ')' ) let ignore = s:CheckToIgnoreRightParan( v:lnum, num_unmatched_right ) " If the line ends in a ), then reduce the indent " This catches items like: " CREATE TABLE T1( " c1 int, " c2 int " ); " But we do not want to unindent a line like: " IF ( c1 = 1 " AND c2 = 3 ) THEN " let num_unmatched_right = s:CountUnbalancedParan( line, ')' ) " if num_unmatched_right > 0 " elseif strpart( line, strlen(line)-1, 1 ) =~ ')' " let ind = ind - &sw if line =~ '^\s*)' " let ignore = ignore + 1 " echom 'curr - begins ) unbalanced ignore: ' . ignore endif if (num_unmatched_right - ignore) > 0 let ind = ind - ( &sw * (num_unmatched_right - ignore) ) endif " endif endif " echom 'final - indent ' . ind return s:ModuloIndent(ind) endfunction let &cpo = s:keepcpo unlet s:keepcpo " vim:sw=4:
zyz2011-vim
runtime/indent/sqlanywhere.vim
Vim Script
gpl2
13,076
" Vim indent file " Language: Scheme " Maintainer: Sergey Khorev <sergey.khorev@gmail.com> " Last Change: 2005 Jun 24 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif runtime! indent/lisp.vim
zyz2011-vim
runtime/indent/scheme.vim
Vim Script
gpl2
241
" Vim indent file " Language: Python " Maintainer: Bram Moolenaar <Bram@vim.org> " Original Author: David Bustos <bustos@caltech.edu> " Last Change: 2012 May 01 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 " Some preliminary settings setlocal nolisp " Make sure lisp indenting doesn't supersede us setlocal autoindent " indentexpr isn't much help otherwise setlocal indentexpr=GetPythonIndent(v:lnum) setlocal indentkeys+=<:>,=elif,=except " Only define the function once. if exists("*GetPythonIndent") finish endif let s:keepcpo= &cpo set cpo&vim " Come here when loading the script the first time. let s:maxoff = 50 " maximum number of lines to look backwards for () function GetPythonIndent(lnum) " If this line is explicitly joined: If the previous line was also joined, " line it up with that one, otherwise add two 'shiftwidth' if getline(a:lnum - 1) =~ '\\$' if a:lnum > 1 && getline(a:lnum - 2) =~ '\\$' return indent(a:lnum - 1) endif return indent(a:lnum - 1) + (exists("g:pyindent_continue") ? eval(g:pyindent_continue) : (&sw * 2)) endif " If the start of the line is in a string don't change the indent. if has('syntax_items') \ && synIDattr(synID(a:lnum, 1, 1), "name") =~ "String$" return -1 endif " Search backwards for the previous non-empty line. let plnum = prevnonblank(v:lnum - 1) if plnum == 0 " This is the first non-empty line, use zero indent. return 0 endif " If the previous line is inside parenthesis, use the indent of the starting " line. " Trick: use the non-existing "dummy" variable to break out of the loop when " going too far back. call cursor(plnum, 1) let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbW', \ "line('.') < " . (plnum - s:maxoff) . " ? dummy :" \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" \ . " =~ '\\(Comment\\|String\\)$'") if parlnum > 0 let plindent = indent(parlnum) let plnumstart = parlnum else let plindent = indent(plnum) let plnumstart = plnum endif " When inside parenthesis: If at the first line below the parenthesis add " two 'shiftwidth', otherwise same as previous line. " i = (a " + b " + c) call cursor(a:lnum, 1) let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" \ . " =~ '\\(Comment\\|String\\)$'") if p > 0 if p == plnum " When the start is inside parenthesis, only indent one 'shiftwidth'. let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" \ . " =~ '\\(Comment\\|String\\)$'") if pp > 0 return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : &sw) endif return indent(plnum) + (exists("g:pyindent_open_paren") ? eval(g:pyindent_open_paren) : (&sw * 2)) endif if plnumstart == p return indent(plnum) endif return plindent endif " Get the line and remove a trailing comment. " Use syntax highlighting attributes when possible. let pline = getline(plnum) let pline_len = strlen(pline) if has('syntax_items') " If the last character in the line is a comment, do a binary search for " the start of the comment. synID() is slow, a linear search would take " too long on a long line. if synIDattr(synID(plnum, pline_len, 1), "name") =~ "Comment$" let min = 1 let max = pline_len while min < max let col = (min + max) / 2 if synIDattr(synID(plnum, col, 1), "name") =~ "Comment$" let max = col else let min = col + 1 endif endwhile let pline = strpart(pline, 0, min - 1) endif else let col = 0 while col < pline_len if pline[col] == '#' let pline = strpart(pline, 0, col) break endif let col = col + 1 endwhile endif " If the previous line ended with a colon, indent this line if pline =~ ':\s*$' return plindent + &sw endif " If the previous line was a stop-execution statement... if getline(plnum) =~ '^\s*\(break\|continue\|raise\|return\|pass\)\>' " See if the user has already dedented if indent(a:lnum) > indent(plnum) - &sw " If not, recommend one dedent return indent(plnum) - &sw endif " Otherwise, trust the user return -1 endif " If the current line begins with a keyword that lines up with "try" if getline(a:lnum) =~ '^\s*\(except\|finally\)\>' let lnum = a:lnum - 1 while lnum >= 1 if getline(lnum) =~ '^\s*\(try\|except\)\>' let ind = indent(lnum) if ind >= indent(a:lnum) return -1 " indent is already less than this endif return ind " line up with previous try or except endif let lnum = lnum - 1 endwhile return -1 " no matching "try"! endif " If the current line begins with a header keyword, dedent if getline(a:lnum) =~ '^\s*\(elif\|else\)\>' " Unless the previous line was a one-liner if getline(plnumstart) =~ '^\s*\(for\|if\|try\)\>' return plindent endif " Or the user has already dedented if indent(a:lnum) <= plindent - &sw return -1 endif return plindent - &sw endif " When after a () construct we probably want to go back to the start line. " a = (b " + c) " here if parlnum > 0 return plindent endif return -1 endfunction let &cpo = s:keepcpo unlet s:keepcpo " vim:sw=2
zyz2011-vim
runtime/indent/python.vim
Vim Script
gpl2
5,626
" Vim indent file for the D programming language (version 0.137). " " Language: D " Maintainer: Jason Mills<jmills@cs.mun.ca> " Last Change: 2005 Nov 22 " Version: 0.1 " " Please email me with bugs, comments, and suggestion. Put vim in the subject " to ensure the email will not be marked has spam. " " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 " D indenting is a lot like the built-in C indenting. setlocal cindent " vim: ts=8 noet
zyz2011-vim
runtime/indent/d.vim
Vim Script
gpl2
510
" Vim indent file " Language: Objective-C " Maintainer: Kazunobu Kuriyama <kazunobu.kuriyama@nifty.com> " Last Change: 2004 May 16 " " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal cindent " Set the function to do the work. setlocal indentexpr=GetObjCIndent() " To make a colon (:) suggest an indentation other than a goto/swich label, setlocal indentkeys-=: setlocal indentkeys+=<:> " Only define the function once. if exists("*GetObjCIndent") finish endif function s:GetWidth(line, regexp) let end = matchend(a:line, a:regexp) let width = 0 let i = 0 while i < end if a:line[i] != "\t" let width = width + 1 else let width = width + &ts - (width % &ts) endif let i = i + 1 endwhile return width endfunction function s:LeadingWhiteSpace(line) let end = strlen(a:line) let width = 0 let i = 0 while i < end let char = a:line[i] if char != " " && char != "\t" break endif if char != "\t" let width = width + 1 else let width = width + &ts - (width % &ts) endif let i = i + 1 endwhile return width endfunction function GetObjCIndent() let theIndent = cindent(v:lnum) let prev_line = getline(v:lnum - 1) let cur_line = getline(v:lnum) if prev_line !~# ":" || cur_line !~# ":" return theIndent endif if prev_line !~# ";" let prev_colon_pos = s:GetWidth(prev_line, ":") let delta = s:GetWidth(cur_line, ":") - s:LeadingWhiteSpace(cur_line) let theIndent = prev_colon_pos - delta endif return theIndent endfunction
zyz2011-vim
runtime/indent/objc.vim
Vim Script
gpl2
1,645
" Vim indent file " Language: ld(1) script " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-12-20 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetLDIndent() setlocal indentkeys=0{,0},!^F,o,O setlocal nosmartindent if exists("*GetLDIndent") finish endif function s:prevnonblanknoncomment(lnum) let lnum = a:lnum while lnum > 1 let lnum = prevnonblank(lnum) let line = getline(lnum) if line =~ '\*/' while lnum > 1 && line !~ '/\*' let lnum -= 1 endwhile if line =~ '^\s*/\*' let lnum -= 1 else break endif else break endif endwhile return lnum endfunction function s:count_braces(lnum, count_open) let n_open = 0 let n_close = 0 let line = getline(a:lnum) let pattern = '[{}]' let i = match(line, pattern) while i != -1 if synIDattr(synID(a:lnum, i + 1, 0), 'name') !~ 'ld\%(Comment\|String\)' if line[i] == '{' let n_open += 1 elseif line[i] == '}' if n_open > 0 let n_open -= 1 else let n_close += 1 endif endif endif let i = match(line, pattern, i + 1) endwhile return a:count_open ? n_open : n_close endfunction function GetLDIndent() let line = getline(v:lnum) if line =~ '^\s*\*' return cindent(v:lnum) elseif line =~ '^\s*}' return indent(v:lnum) - &sw endif let pnum = s:prevnonblanknoncomment(v:lnum - 1) if pnum == 0 return 0 endif let ind = indent(pnum) + s:count_braces(pnum, 1) * &sw let pline = getline(pnum) if pline =~ '}\s*$' let ind -= (s:count_braces(pnum, 0) - (pline =~ '^\s*}' ? 1 : 0)) * &sw endif return ind endfunction
zyz2011-vim
runtime/indent/ld.vim
Vim Script
gpl2
1,753
" Vim indent file " Language: Eiffel " Maintainer: Jocelyn Fiat <jfiat@eiffel.com> " Previous-Maintainer: David Clarke <gadicath@dishevelled.net> " Contributions from: Thilo Six " $Date: 2004/12/09 21:33:52 $ " $Revision: 1.3 $ " URL: https://github.com/eiffelhub/vim-eiffel " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetEiffelIndent() setlocal nolisp setlocal nosmartindent setlocal nocindent setlocal autoindent setlocal comments=:-- setlocal indentkeys+==end,=else,=ensure,=require,=check,=loop,=until setlocal indentkeys+==creation,=feature,=inherit,=class,=is,=redefine,=rename,=variant setlocal indentkeys+==invariant,=do,=local,=export let b:undo_indent = "setl smartindent< indentkeys< indentexpr< autoindent< comments< " " Define some stuff " keywords grouped by indenting let s:trust_user_indent = '\(+\)\(\s*\(--\).*\)\=$' let s:relative_indent = '^\s*\(deferred\|class\|feature\|creation\|inherit\|loop\|from\|until\|if\|else\|elseif\|ensure\|require\|check\|do\|local\|invariant\|variant\|rename\|redefine\|do\|export\)\>' let s:outdent = '^\s*\(else\|invariant\|variant\|do\|require\|until\|loop\|local\)\>' let s:no_indent = '^\s*\(class\|feature\|creation\|inherit\)\>' let s:single_dent = '^[^-]\+[[:alnum:]]\+ is\(\s*\(--\).*\)\=$' let s:inheritance_dent = '\s*\(redefine\|rename\|export\)\>' " Only define the function once. if exists("*GetEiffelIndent") finish endif let s:keepcpo= &cpo set cpo&vim function GetEiffelIndent() " Eiffel Class indenting " " Find a non-blank line above the current line. let lnum = prevnonblank(v:lnum - 1) " At the start of the file use zero indent. if lnum == 0 return 0 endif " trust the user's indenting if getline(lnum) =~ s:trust_user_indent return -1 endif " Add a 'shiftwidth' after lines that start with an indent word let ind = indent(lnum) if getline(lnum) =~ s:relative_indent let ind = ind + &sw endif " Indent to single indent if getline(v:lnum) =~ s:single_dent && getline(v:lnum) !~ s:relative_indent \ && getline(v:lnum) !~ '\s*\<\(and\|or\|implies\)\>' let ind = &sw endif " Indent to double indent if getline(v:lnum) =~ s:inheritance_dent let ind = 2 * &sw endif " Indent line after the first line of the function definition if getline(lnum) =~ s:single_dent let ind = ind + &sw endif " The following should always be at the start of a line, no indenting if getline(v:lnum) =~ s:no_indent let ind = 0 endif " Subtract a 'shiftwidth', if this isn't the first thing after the 'is' " or first thing after the 'do' if getline(v:lnum) =~ s:outdent && getline(v:lnum - 1) !~ s:single_dent \ && getline(v:lnum - 1) !~ '^\s*do\>' let ind = ind - &sw endif " Subtract a shiftwidth for end statements if getline(v:lnum) =~ '^\s*end\>' let ind = ind - &sw endif " set indent of zero end statements that are at an indent of 3, this should " only ever be the class's end. if getline(v:lnum) =~ '^\s*end\>' && ind == &sw let ind = 0 endif return ind endfunction let &cpo = s:keepcpo unlet s:keepcpo " vim:sw=2
zyz2011-vim
runtime/indent/eiffel.vim
Vim Script
gpl2
3,208
" Vim indent file " Language: C# " Maintainer: Johannes Zellner <johannes@zellner.org> " Last Change: Fri, 15 Mar 2002 07:53:54 CET " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 " C# is like indenting C setlocal cindent let b:undo_indent = "setl cin<"
zyz2011-vim
runtime/indent/cs.vim
Vim Script
gpl2
327
" Vim indent file " Language: D script as described in "Solaris Dynamic Tracing Guide", " http://docs.sun.com/app/docs/doc/817-6223 " Last Change: 2008/03/20 " Version: 1.2 " Maintainer: Nicolas Weber <nicolasweber@gmx.de> " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 " Built-in C indenting works nicely for dtrace. setlocal cindent let b:undo_indent = "setl cin<"
zyz2011-vim
runtime/indent/dtrace.vim
Vim Script
gpl2
451
" Vim indent file " Language: Eterm configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-12-20 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetEtermIndent() setlocal indentkeys=!^F,o,O,=end setlocal nosmartindent if exists("*GetEtermIndent") finish endif function GetEtermIndent() let lnum = prevnonblank(v:lnum - 1) if lnum == 0 return 0 endif let ind = indent(lnum) if getline(lnum) =~ '^\s*begin\>' let ind = ind + &sw endif if getline(v:lnum) =~ '^\s*end\>' let ind = ind - &sw endif return ind endfunction
zyz2011-vim
runtime/indent/eterm.vim
Vim Script
gpl2
638
" Vim indent file " Language: SDL " Maintainer: Michael Piefel <entwurf@piefel.de> " Last Change: 10 December 2011 " Shamelessly stolen from the Vim-Script indent file " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetSDLIndent() setlocal indentkeys+==~end,=~state,*<Return> " Only define the function once. if exists("*GetSDLIndent") " finish endif let s:cpo_save = &cpo set cpo&vim function! GetSDLIndent() " Find a non-blank line above the current line. let lnum = prevnonblank(v:lnum - 1) " At the start of the file use zero indent. if lnum == 0 return 0 endif let ind = indent(lnum) let virtuality = '^\s*\(\(virtual\|redefined\|finalized\)\s\+\)\=\s*' " Add a single space to comments which use asterisks if getline(lnum) =~ '^\s*\*' let ind = ind - 1 endif if getline(v:lnum) =~ '^\s*\*' let ind = ind + 1 endif " Add a 'shiftwidth' after states, different blocks, decision (and alternatives), inputs if (getline(lnum) =~? '^\s*\(start\|state\|system\|package\|connection\|channel\|alternative\|macro\|operator\|newtype\|select\|substructure\|decision\|generator\|refinement\|service\|method\|exceptionhandler\|asntype\|syntype\|value\|(.*):\|\(priority\s\+\)\=input\|provided\)' \ || getline(lnum) =~? virtuality . '\(process\|procedure\|block\|object\)') \ && getline(lnum) !~? 'end[[:alpha:]]\+;$' let ind = ind + &sw endif " Subtract a 'shiftwidth' after states if getline(lnum) =~? '^\s*\(stop\|return\>\|nextstate\)' let ind = ind - &sw endif " Subtract a 'shiftwidth' on on end (uncompleted line) if getline(v:lnum) =~? '^\s*end\>' let ind = ind - &sw endif " Put each alternatives where the corresponding decision was if getline(v:lnum) =~? '^\s*\((.*)\|else\):' normal k let ind = indent(searchpair('^\s*decision', '', '^\s*enddecision', 'bW', \ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "sdlString"')) endif " Put each state where the preceding state was if getline(v:lnum) =~? '^\s*state\>' let ind = indent(search('^\s*start', 'bW')) endif " Systems and packages are always in column 0 if getline(v:lnum) =~? '^\s*\(\(end\)\=system\|\(end\)\=package\)' return 0; endif " Put each end* where the corresponding begin was if getline(v:lnum) =~? '^\s*end[[:alpha:]]' normal k let partner=matchstr(getline(v:lnum), '\(' . virtuality . 'end\)\@<=[[:alpha:]]\+') let ind = indent(searchpair(virtuality . partner, '', '^\s*end' . partner, 'bW', \ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "sdlString"')) endif return ind endfunction let &cpo = s:cpo_save unlet s:cpo_save " vim:sw=2
zyz2011-vim
runtime/indent/sdl.vim
Vim Script
gpl2
2,768
" VHDL indent ('93 syntax) " Language: VHDL " Maintainer: Gerald Lai <laigera+vim?gmail.com> " Version: 1.58 " Last Change: 2011 Sep 27 " URL: http://www.vim.org/scripts/script.php?script_id=1450 " only load this indent file when no other was loaded if exists("b:did_indent") finish endif let b:did_indent = 1 " setup indent options for local VHDL buffer setlocal indentexpr=GetVHDLindent() setlocal indentkeys=!^F,o,O,0(,0) setlocal indentkeys+==~begin,=~end\ ,=~end\ ,=~is,=~select,=~when setlocal indentkeys+==~if,=~then,=~elsif,=~else setlocal indentkeys+==~case,=~loop,=~for,=~generate,=~record,=~units,=~process,=~block,=~function,=~component,=~procedure setlocal indentkeys+==~architecture,=~configuration,=~entity,=~package " constants " not a comment let s:NC = '\%(--.*\)\@<!' " end of string let s:ES = '\s*\%(--.*\)\=$' " no "end" keyword in front let s:NE = '\%(\<end\s\+\)\@<!' " option to disable alignment of generic/port mappings if !exists("g:vhdl_indent_genportmap") let g:vhdl_indent_genportmap = 1 endif " option to disable alignment of right-hand side assignment "<=" statements if !exists("g:vhdl_indent_rhsassign") let g:vhdl_indent_rhsassign = 1 endif " only define indent function once if exists("*GetVHDLindent") finish endif function GetVHDLindent() " store current line & string let curn = v:lnum let curs = getline(curn) " find previous line that is not a comment let prevn = prevnonblank(curn - 1) let prevs = getline(prevn) while prevn > 0 && prevs =~ '^\s*--' let prevn = prevnonblank(prevn - 1) let prevs = getline(prevn) endwhile let prevs_noi = substitute(prevs, '^\s*', '', '') " default indent starts as previous non-comment line's indent let ind = prevn > 0 ? indent(prevn) : 0 " backup default let ind2 = ind " indent: special; kill string so it would not affect other filters " keywords: "report" + string " where: anywhere in current or previous line let s0 = s:NC.'\<report\>\s*".*"' if curs =~? s0 let curs = "" endif if prevs =~? s0 let prevs = "" endif " indent: previous line's comment position, otherwise follow next non-comment line if possible " keyword: "--" " where: start of current line if curs =~ '^\s*--' let pn = curn - 1 let ps = getline(pn) if curs =~ '^\s*--\s' && ps =~ '--' return indent(pn) + stridx(substitute(ps, '^\s*', '', ''), '--') else " find nextnonblank line that is not a comment let nn = nextnonblank(curn + 1) let ns = getline(nn) while nn > 0 && ns =~ '^\s*--' let nn = nextnonblank(nn + 1) let ns = getline(nn) endwhile let n = indent(nn) return n != -1 ? n : ind endif endif " **************************************************************************************** " indent: align generic variables & port names " keywords: "procedure" + name, "generic", "map", "port" + "(", provided current line is part of mapping " where: anywhere in previous 2 lines " find following previous non-comment line let pn = prevnonblank(prevn - 1) let ps = getline(pn) while pn > 0 && ps =~ '^\s*--' let pn = prevnonblank(pn - 1) let ps = getline(pn) endwhile if (curs =~ '^\s*)' || curs =~? '^\s*\%(\<\%(procedure\|generic\|map\|port\)\>.*\)\@<!\w\+\s*\w*\s*\%(=>\s*\S\+\|:[^=]\@=\s*\%(\%(in\|out\|inout\|buffer\|linkage\)\>\|\w\+\s\+:=\)\)') && (prevs =~? s:NC.'\<\%(procedure\s\+\S\+\|generic\|map\|port\)\s*(\%(\s*\w\)\=' || (ps =~? s:NC.'\<\%(procedure\|generic\|map\|port\)'.s:ES && prevs =~ '^\s*(')) " align closing ")" with opening "(" if curs =~ '^\s*)' return ind2 + stridx(prevs_noi, '(') endif let m = matchend(prevs_noi, '(\s*\ze\w') if m != -1 return ind2 + m else if g:vhdl_indent_genportmap return ind2 + stridx(prevs_noi, '(') + &sw else return ind2 + &sw endif endif endif " indent: align conditional/select statement " keywords: variable + "<=" without ";" ending " where: start of previous line if prevs =~? '^\s*\S\+\s*<=[^;]*'.s:ES if g:vhdl_indent_rhsassign return ind2 + matchend(prevs_noi, '<=\s*\ze.') else return ind2 + &sw endif endif " indent: backtrace previous non-comment lines for next smaller or equal size indent " keywords: "end" + "record", "units" " where: start of previous line " keyword: ")" " where: start of previous line " keyword: without "<=" + ";" ending " where: anywhere in previous line " keyword: "=>" + ")" ending, provided current line does not begin with ")" " where: anywhere in previous line " _note_: indent allowed to leave this filter let m = 0 if prevs =~? '^\s*end\s\+\%(record\|units\)\>' let m = 3 elseif prevs =~ '^\s*)' let m = 1 elseif prevs =~ s:NC.'\%(<=.*\)\@<!;'.s:ES || (curs !~ '^\s*)' && prevs =~ s:NC.'=>.*'.s:NC.')'.s:ES) let m = 2 endif if m > 0 let pn = prevnonblank(prevn - 1) let ps = getline(pn) while pn > 0 let t = indent(pn) if ps !~ '^\s*--' && (t < ind || (t == ind && m == 3)) " make sure one of these is true " keywords: variable + "<=" without ";" ending " where: start of previous non-comment line " keywords: "procedure", "generic", "map", "port" " where: anywhere in previous non-comment line " keyword: "(" " where: start of previous non-comment line if m < 3 && ps !~? '^\s*\S\+\s*<=[^;]*'.s:ES if ps =~? s:NC.'\<\%(procedure\|generic\|map\|port\)\>' || ps =~ '^\s*(' let ind = t endif break endif let ind = t if m > 1 " find following previous non-comment line let ppn = prevnonblank(pn - 1) let pps = getline(ppn) while ppn > 0 && pps =~ '^\s*--' let ppn = prevnonblank(ppn - 1) let pps = getline(ppn) endwhile " indent: follow " keyword: "select" " where: end of following previous non-comment line " keyword: "type" " where: start of following previous non-comment line if m == 2 let s1 = s:NC.'\<select'.s:ES if ps !~? s1 && pps =~? s1 let ind = indent(ppn) endif elseif m == 3 let s1 = '^\s*type\>' if ps !~? s1 && pps =~? s1 let ind = indent(ppn) endif endif endif break endif let pn = prevnonblank(pn - 1) let ps = getline(pn) endwhile endif " indent: follow indent of previous opening statement, otherwise -sw " keyword: "begin" " where: anywhere in current line if curs =~? s:NC.'\<begin\>' " find previous opening statement of " keywords: "architecture", "block", "entity", "function", "generate", "procedure", "process" let s2 = s:NC.s:NE.'\<\%(architecture\|block\|entity\|function\|generate\|procedure\|process\)\>' let pn = prevnonblank(curn - 1) let ps = getline(pn) while pn > 0 && (ps =~ '^\s*--' || ps !~? s2) let pn = prevnonblank(pn - 1) let ps = getline(pn) if (ps =~? s:NC.'\<begin\>') return indent(pn) - &sw endif endwhile if (pn == 0) return ind - &sw else return indent(pn) endif endif " indent: +sw if previous line is previous opening statement " keywords: "record", "units" " where: anywhere in current line if curs =~? s:NC.s:NE.'\<\%(record\|units\)\>' " find previous opening statement of " keyword: "type" let s3 = s:NC.s:NE.'\<type\>' if curs !~? s3.'.*'.s:NC.'\<\%(record\|units\)\>.*'.s:ES && prevs =~? s3 let ind = ind + &sw endif return ind endif " **************************************************************************************** " indent: 0 " keywords: "architecture", "configuration", "entity", "library", "package" " where: start of current line if curs =~? '^\s*\%(architecture\|configuration\|entity\|library\|package\)\>' return 0 endif " indent: maintain indent of previous opening statement " keyword: "is" " where: start of current line " find previous opening statement of " keywords: "architecture", "block", "configuration", "entity", "function", "package", "procedure", "process", "type" if curs =~? '^\s*\<is\>' && prevs =~? s:NC.s:NE.'\<\%(architecture\|block\|configuration\|entity\|function\|package\|procedure\|process\|type\)\>' return ind2 endif " indent: maintain indent of previous opening statement " keyword: "then" " where: start of current line " find previous opening statement of " keywords: "elsif", "if" if curs =~? '^\s*\<then\>' && prevs =~? s:NC.'\%(\<elsif\>\|'.s:NE.'\<if\>\)' return ind2 endif " indent: maintain indent of previous opening statement " keyword: "generate" " where: start of current line " find previous opening statement of " keywords: "for", "if" if curs =~? '^\s*\<generate\>' && prevs =~? s:NC.s:NE.'\%(\%(\<wait\s\+\)\@<!\<for\|\<if\)\>' return ind2 endif " indent: +sw " keywords: "block", "process" " removed: "begin", "case", "elsif", "if", "loop", "record", "units", "while" " where: anywhere in previous line if prevs =~? s:NC.s:NE.'\<\%(block\|process\)\>' return ind + &sw endif " indent: +sw " keywords: "architecture", "configuration", "entity", "package" " removed: "component", "for", "when", "with" " where: start of previous line if prevs =~? '^\s*\%(architecture\|configuration\|entity\|package\)\>' return ind + &sw endif " indent: +sw " keyword: "select" " removed: "generate", "is", "=>" " where: end of previous line if prevs =~? s:NC.'\<select'.s:ES return ind + &sw endif " indent: +sw " keyword: "begin", "loop", "record", "units" " where: anywhere in previous line " keyword: "component", "else", "for" " where: start of previous line " keyword: "generate", "is", "then", "=>" " where: end of previous line " _note_: indent allowed to leave this filter if prevs =~? s:NC.'\%(\<begin\>\|'.s:NE.'\<\%(loop\|record\|units\)\>\)' || prevs =~? '^\s*\%(component\|else\|for\)\>' || prevs =~? s:NC.'\%('.s:NE.'\<generate\|\<\%(is\|then\)\|=>\)'.s:ES let ind = ind + &sw endif " **************************************************************************************** " indent: -sw " keywords: "when", provided previous line does not begin with "when", does not end with "is" " where: start of current line let s4 = '^\s*when\>' if curs =~? s4 if prevs =~? s:NC.'\<is'.s:ES return ind elseif prevs !~? s4 return ind - &sw else return ind2 endif endif " indent: -sw " keywords: "else", "elsif", "end" + "block", "for", "function", "generate", "if", "loop", "procedure", "process", "record", "units" " where: start of current line let s5 = 'block\|for\|function\|generate\|if\|loop\|procedure\|process\|record\|units' if curs =~? '^\s*\%(else\|elsif\|end\s\+\%('.s5.'\)\)\>' if prevs =~? '^\s*\%(elsif\|'.s5.'\)' return ind else return ind - &sw endif endif " indent: backtrace previous non-comment lines " keyword: "end" + "case", "component" " where: start of current line let m = 0 if curs =~? '^\s*end\s\+case\>' let m = 1 elseif curs =~? '^\s*end\s\+component\>' let m = 2 endif if m > 0 " find following previous non-comment line let pn = prevn let ps = getline(pn) while pn > 0 if ps !~ '^\s*--' "indent: -2sw "keywords: "end" + "case" "where: start of previous non-comment line "indent: -sw "keywords: "when" "where: start of previous non-comment line "indent: follow "keywords: "case" "where: start of previous non-comment line if m == 1 if ps =~? '^\s*end\s\+case\>' return indent(pn) - 2 * &sw elseif ps =~? '^\s*when\>' return indent(pn) - &sw elseif ps =~? '^\s*case\>' return indent(pn) endif "indent: follow "keyword: "component" "where: start of previous non-comment line elseif m == 2 if ps =~? '^\s*component\>' return indent(pn) endif endif endif let pn = prevnonblank(pn - 1) let ps = getline(pn) endwhile return ind - &sw endif " indent: -sw " keyword: ")" " where: start of current line if curs =~ '^\s*)' return ind - &sw endif " indent: 0 " keywords: "end" + "architecture", "configuration", "entity", "package" " where: start of current line if curs =~? '^\s*end\s\+\%(architecture\|configuration\|entity\|package\)\>' return 0 endif " indent: -sw " keywords: "end" + identifier, ";" " where: start of current line "if curs =~? '^\s*end\s\+\w\+\>' if curs =~? '^\s*end\%(\s\|;'.s:ES.'\)' return ind - &sw endif " **************************************************************************************** " indent: maintain indent of previous opening statement " keywords: without "procedure", "generic", "map", "port" + ":" but not ":=" + "in", "out", "inout", "buffer", "linkage", variable & ":=" " where: start of current line if curs =~? '^\s*\%(\<\%(procedure\|generic\|map\|port\)\>.*\)\@<!\w\+\s*\w*\s*:[^=]\@=\s*\%(\%(in\|out\|inout\|buffer\|linkage\)\>\|\w\+\s\+:=\)' return ind2 endif " return leftover filtered indent return ind endfunction
zyz2011-vim
runtime/indent/vhdl.vim
Vim Script
gpl2
13,801
" Vim indent file " Language: Ch " Maintainer: SoftIntegration, Inc. <info@softintegration.com> " URL: http://www.softintegration.com/download/vim/indent/ch.vim " Last change: 2006 Apr 30 " Created based on cpp.vim " " Ch is a C/C++ interpreter with many high level extensions " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 " Ch indenting is built-in, thus this is very simple setlocal cindent
zyz2011-vim
runtime/indent/ch.vim
Vim Script
gpl2
470
" Description: InstallShield indenter " Author: Johannes Zellner <johannes@zellner.org> " Last Change: Tue, 27 Apr 2004 14:54:59 CEST " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal autoindent setlocal indentexpr=GetIshdIndent(v:lnum) setlocal indentkeys& setlocal indentkeys+==else,=elseif,=endif,=end,=begin,<:> " setlocal indentkeys-=0# let b:undo_indent = "setl ai< indentexpr< indentkeys<" " Only define the function once. if exists("*GetIshdIndent") finish endif fun! GetIshdIndent(lnum) " labels and preprocessor get zero indent immediately let this_line = getline(a:lnum) let LABELS_OR_PREPROC = '^\s*\(\<\k\+\>:\s*$\|#.*\)' let LABELS_OR_PREPROC_EXCEPT = '^\s*\<default\+\>:' if this_line =~ LABELS_OR_PREPROC && this_line !~ LABELS_OR_PREPROC_EXCEPT return 0 endif " Find a non-blank line above the current line. " Skip over labels and preprocessor directives. let lnum = a:lnum while lnum > 0 let lnum = prevnonblank(lnum - 1) let previous_line = getline(lnum) if previous_line !~ LABELS_OR_PREPROC || previous_line =~ LABELS_OR_PREPROC_EXCEPT break endif endwhile " Hit the start of the file, use zero indent. if lnum == 0 return 0 endif let ind = indent(lnum) " Add if previous_line =~ '^\s*\<\(function\|begin\|switch\|case\|default\|if.\{-}then\|else\|elseif\|while\|repeat\)\>' let ind = ind + &sw endif " Subtract if this_line =~ '^\s*\<endswitch\>' let ind = ind - 2 * &sw elseif this_line =~ '^\s*\<\(begin\|end\|endif\|endwhile\|else\|elseif\|until\)\>' let ind = ind - &sw elseif this_line =~ '^\s*\<\(case\|default\)\>' if previous_line !~ '^\s*\<switch\>' let ind = ind - &sw endif endif return ind endfun
zyz2011-vim
runtime/indent/ishd.vim
Vim Script
gpl2
1,841
" Vim indent file " Program: CMake - Cross-Platform Makefile Generator " Module: $RCSfile: cmake-indent.vim,v $ " Language: CMake (ft=cmake) " Author: Andy Cedilnik <andy.cedilnik@kitware.com> " Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com> " Last Change: $Date: 2008-01-16 16:53:53 $ " Version: $Revision: 1.9 $ " " Licence: The CMake license applies to this file. See " http://www.cmake.org/HTML/Copyright.html " This implies that distribution with Vim is allowed if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=CMakeGetIndent(v:lnum) setlocal indentkeys+==ENDIF(,ENDFOREACH(,ENDMACRO(,ELSE(,ELSEIF(,ENDWHILE( " Only define the function once. if exists("*CMakeGetIndent") finish endif let s:keepcpo= &cpo set cpo&vim fun! CMakeGetIndent(lnum) let this_line = getline(a:lnum) " Find a non-blank line above the current line. let lnum = a:lnum let lnum = prevnonblank(lnum - 1) let previous_line = getline(lnum) " Hit the start of the file, use zero indent. if lnum == 0 return 0 endif let ind = indent(lnum) let or = '\|' " Regular expressions used by line indentation function. let cmake_regex_comment = '#.*' let cmake_regex_identifier = '[A-Za-z][A-Za-z0-9_]*' let cmake_regex_quoted = '"\([^"\\]\|\\.\)*"' let cmake_regex_arguments = '\(' . cmake_regex_quoted . \ or . '\$(' . cmake_regex_identifier . ')' . \ or . '[^()\\#"]' . or . '\\.' . '\)*' let cmake_indent_comment_line = '^\s*' . cmake_regex_comment let cmake_indent_blank_regex = '^\s*$' let cmake_indent_open_regex = '^\s*' . cmake_regex_identifier . \ '\s*(' . cmake_regex_arguments . \ '\(' . cmake_regex_comment . '\)\?$' let cmake_indent_close_regex = '^' . cmake_regex_arguments . \ ')\s*' . \ '\(' . cmake_regex_comment . '\)\?$' let cmake_indent_begin_regex = '^\s*\(IF\|MACRO\|FOREACH\|ELSE\|ELSEIF\|WHILE\|FUNCTION\)\s*(' let cmake_indent_end_regex = '^\s*\(ENDIF\|ENDFOREACH\|ENDMACRO\|ELSE\|ELSEIF\|ENDWHILE\|ENDFUNCTION\)\s*(' " Add if previous_line =~? cmake_indent_comment_line " Handle comments let ind = ind else if previous_line =~? cmake_indent_begin_regex let ind = ind + &sw endif if previous_line =~? cmake_indent_open_regex let ind = ind + &sw endif endif " Subtract if this_line =~? cmake_indent_end_regex let ind = ind - &sw endif if previous_line =~? cmake_indent_close_regex let ind = ind - &sw endif return ind endfun let &cpo = s:keepcpo unlet s:keepcpo
zyz2011-vim
runtime/indent/cmake.vim
Vim Script
gpl2
2,754
" Vim indent file " Language: SML " Maintainer: Saikat Guha <sg266@cornell.edu> " Hubert Chao <hc85@cornell.edu> " Original OCaml Version: " Jean-Francois Yuen <jfyuen@ifrance.com> " Mike Leary <leary@nwlink.com> " Markus Mottl <markus@oefai.at> " OCaml URL: http://www.oefai.at/~markus/vim/indent/ocaml.vim " Last Change: 2003 Jan 04 - Adapted to SML " 2002 Nov 06 - Some fixes (JY) " 2002 Oct 28 - Fixed bug with indentation of ']' (MM) " 2002 Oct 22 - Major rewrite (JY) " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal expandtab setlocal indentexpr=GetSMLIndent() setlocal indentkeys+=0=and,0=else,0=end,0=handle,0=if,0=in,0=let,0=then,0=val,0=fun,0=\|,0=*),0) setlocal nolisp setlocal nosmartindent setlocal textwidth=80 setlocal shiftwidth=2 " Comment formatting if (has("comments")) set comments=sr:(*,mb:*,ex:*) set fo=cqort endif " Only define the function once. "if exists("*GetSMLIndent") "finish "endif " Define some patterns: let s:beflet = '^\s*\(initializer\|method\|try\)\|\(\<\(begin\|do\|else\|in\|then\|try\)\|->\|;\)\s*$' let s:letpat = '^\s*\(let\|type\|module\|class\|open\|exception\|val\|include\|external\)\>' let s:letlim = '\(\<\(sig\|struct\)\|;;\)\s*$' let s:lim = '^\s*\(exception\|external\|include\|let\|module\|open\|type\|val\)\>' let s:module = '\<\%(let\|sig\|struct\)\>' let s:obj = '^\s*\(constraint\|inherit\|initializer\|method\|val\)\>\|\<\(object\|object\s*(.*)\)\s*$' let s:type = '^\s*\%(let\|type\)\>.*=' let s:val = '^\s*\(val\|external\)\>.*:' " Skipping pattern, for comments function! s:SkipPattern(lnum, pat) let def = prevnonblank(a:lnum - 1) while def > 0 && getline(def) =~ a:pat let def = prevnonblank(def - 1) endwhile return def endfunction " Indent for ';;' to match multiple 'let' function! s:GetInd(lnum, pat, lim) let llet = search(a:pat, 'bW') let old = indent(a:lnum) while llet > 0 let old = indent(llet) let nb = s:SkipPattern(llet, '^\s*(\*.*\*)\s*$') if getline(nb) =~ a:lim return old endif let llet = search(a:pat, 'bW') endwhile return old endfunction " Indent pairs function! s:FindPair(pstart, pmid, pend) call search(a:pend, 'bW') " return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')) let lno = searchpair(a:pstart, a:pmid, a:pend, 'bW', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"') if lno == -1 return indent(lno) else return col(".") - 1 endif endfunction function! s:FindLet(pstart, pmid, pend) call search(a:pend, 'bW') " return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')) let lno = searchpair(a:pstart, a:pmid, a:pend, 'bW', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"') let moduleLine = getline(lno) if lno == -1 || moduleLine =~ '^\s*\(fun\|structure\|signature\)\>' return indent(lno) else return col(".") - 1 endif endfunction " Indent 'let' "function! s:FindLet(pstart, pmid, pend) " call search(a:pend, 'bW') " return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment" || getline(".") =~ "^\\s*let\\>.*=.*\\<in\\s*$" || getline(prevnonblank(".") - 1) =~ "^\\s*let\\>.*=\\s*$\\|" . s:beflet')) "endfunction function! GetSMLIndent() " Find a non-blank line above the current line. let lnum = prevnonblank(v:lnum - 1) " At the start of the file use zero indent. if lnum == 0 return 0 endif let ind = indent(lnum) let lline = getline(lnum) " Return double 'shiftwidth' after lines matching: if lline =~ '^\s*|.*=>\s*$' return ind + &sw + &sw elseif lline =~ '^\s*val\>.*=\s*$' return ind + &sw endif let line = getline(v:lnum) " Indent lines starting with 'end' to matching module if line =~ '^\s*end\>' return s:FindLet(s:module, '', '\<end\>') " Match 'else' with 'if' elseif line =~ '^\s*else\>' if lline !~ '^\s*\(if\|else\|then\)\>' return s:FindPair('\<if\>', '', '\<then\>') else return ind endif " Match 'then' with 'if' elseif line =~ '^\s*then\>' if lline !~ '^\s*\(if\|else\|then\)\>' return s:FindPair('\<if\>', '', '\<then\>') else return ind endif " Indent if current line begins with ']' elseif line =~ '^\s*\]' return s:FindPair('\[','','\]') " Indent current line starting with 'in' to last matching 'let' elseif line =~ '^\s*in\>' let ind = s:FindLet('\<let\>','','\<in\>') " Indent from last matching module if line matches: elseif line =~ '^\s*\(fun\|val\|open\|structure\|and\|datatype\|type\|exception\)\>' cursor(lnum,1) let lastModule = indent(searchpair(s:module, '', '\<end\>', 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')) if lastModule == -1 return 0 else return lastModule + &sw endif " Indent lines starting with '|' from matching 'case', 'handle' elseif line =~ '^\s*|' " cursor(lnum,1) let lastSwitch = search('\<\(case\|handle\|fun\|datatype\)\>','bW') let switchLine = getline(lastSwitch) let switchLineIndent = indent(lastSwitch) if lline =~ '^\s*|' return ind endif if switchLine =~ '\<case\>' return col(".") + 2 elseif switchLine =~ '\<handle\>' return switchLineIndent + &sw elseif switchLine =~ '\<datatype\>' call search('=') return col(".") - 1 else return switchLineIndent + 2 endif " Indent if last line ends with 'sig', 'struct', 'let', 'then', 'else', " 'in' elseif lline =~ '\<\(sig\|struct\|let\|in\|then\|else\)\s*$' let ind = ind + &sw " Indent if last line ends with 'of', align from 'case' elseif lline =~ '\<\(of\)\s*$' call search('\<case\>',"bW") let ind = col(".")+4 " Indent if current line starts with 'of' elseif line =~ '^\s*of\>' call search('\<case\>',"bW") let ind = col(".")+1 " Indent if last line starts with 'fun', 'case', 'fn' elseif lline =~ '^\s*\(fun\|fn\|case\)\>' let ind = ind + &sw endif " Don't indent 'let' if last line started with 'fun', 'fn' if line =~ '^\s*let\>' if lline =~ '^\s*\(fun\|fn\)' let ind = ind - &sw endif endif return ind endfunction " vim:sw=2
zyz2011-vim
runtime/indent/sml.vim
Vim Script
gpl2
6,418
" Vim indent file " Language: Ruby " Maintainer: Nikolai Weibull <now at bitwi.se> " Last Change: 2009 Dec 17 " URL: http://vim-ruby.rubyforge.org " Anon CVS: See above site " Release Coordinator: Doug Kearns <dougkearns@gmail.com> " 0. Initialization {{{1 " ================= " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal nosmartindent " Now, set up our indentation expression and keys that trigger it. setlocal indentexpr=GetRubyIndent() setlocal indentkeys=0{,0},0),0],!^F,o,O,e setlocal indentkeys+==end,=elsif,=when,=ensure,=rescue,==begin,==end " Only define the function once. if exists("*GetRubyIndent") finish endif let s:cpo_save = &cpo set cpo&vim " 1. Variables {{{1 " ============ " Regex of syntax group names that are or delimit string or are comments. let s:syng_strcom = '\<ruby\%(String\|StringEscape\|ASCIICode' . \ '\|Interpolation\|NoInterpolation\|Comment\|Documentation\)\>' " Regex of syntax group names that are strings. let s:syng_string = \ '\<ruby\%(String\|Interpolation\|NoInterpolation\|StringEscape\)\>' " Regex of syntax group names that are strings or documentation. let s:syng_stringdoc = \'\<ruby\%(String\|Interpolation\|NoInterpolation\|StringEscape\|Documentation\)\>' " Expression used to check whether we should skip a match with searchpair(). let s:skip_expr = \ "synIDattr(synID(line('.'),col('.'),1),'name') =~ '".s:syng_strcom."'" " Regex used for words that, at the start of a line, add a level of indent. let s:ruby_indent_keywords = '^\s*\zs\<\%(module\|class\|def\|if\|for' . \ '\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure' . \ '\|rescue\)\>' . \ '\|\%([*+/,=-]\|<<\|>>\|:\s\)\s*\zs' . \ '\<\%(if\|for\|while\|until\|case\|unless\|begin\)\>' " Regex used for words that, at the start of a line, remove a level of indent. let s:ruby_deindent_keywords = \ '^\s*\zs\<\%(ensure\|else\|rescue\|elsif\|when\|end\)\>' " Regex that defines the start-match for the 'end' keyword. "let s:end_start_regex = '\%(^\|[^.]\)\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\|do\)\>' " TODO: the do here should be restricted somewhat (only at end of line)? let s:end_start_regex = '^\s*\zs\<\%(module\|class\|def\|if\|for' . \ '\|while\|until\|case\|unless\|begin\)\>' . \ '\|\%([*+/,=-]\|<<\|>>\|:\s\)\s*\zs' . \ '\<\%(if\|for\|while\|until\|case\|unless\|begin\)\>' . \ '\|\<do\>' " Regex that defines the middle-match for the 'end' keyword. let s:end_middle_regex = '\<\%(ensure\|else\|\%(\%(^\|;\)\s*\)\@<=\<rescue\>\|when\|elsif\)\>' " Regex that defines the end-match for the 'end' keyword. let s:end_end_regex = '\%(^\|[^.:@$]\)\@<=\<end\>' " Expression used for searchpair() call for finding match for 'end' keyword. let s:end_skip_expr = s:skip_expr . \ ' || (expand("<cword>") == "do"' . \ ' && getline(".") =~ "^\\s*\\<\\(while\\|until\\|for\\)\\>")' " Regex that defines continuation lines, not including (, {, or [. let s:continuation_regex = '\%([\\*+/.,:]\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$' " Regex that defines continuation lines. " TODO: this needs to deal with if ...: and so on let s:continuation_regex2 = \ '\%([\\*+/.,:({[]\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$' " Regex that defines blocks. let s:block_regex = \ '\%(\<do\>\|{\)\s*\%(|\%([*@]\=\h\w*,\=\s*\)\%(,\s*[*@]\=\h\w*\)*|\)\=\s*\%(#.*\)\=$' " 2. Auxiliary Functions {{{1 " ====================== " Check if the character at lnum:col is inside a string, comment, or is ascii. function s:IsInStringOrComment(lnum, col) return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_strcom endfunction " Check if the character at lnum:col is inside a string. function s:IsInString(lnum, col) return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_string endfunction " Check if the character at lnum:col is inside a string or documentation. function s:IsInStringOrDocumentation(lnum, col) return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_stringdoc endfunction " Find line above 'lnum' that isn't empty, in a comment, or in a string. function s:PrevNonBlankNonString(lnum) let in_block = 0 let lnum = prevnonblank(a:lnum) while lnum > 0 " Go in and out of blocks comments as necessary. " If the line isn't empty (with opt. comment) or in a string, end search. let line = getline(lnum) if line =~ '^=begin$' if in_block let in_block = 0 else break endif elseif !in_block && line =~ '^=end$' let in_block = 1 elseif !in_block && line !~ '^\s*#.*$' && !(s:IsInStringOrComment(lnum, 1) \ && s:IsInStringOrComment(lnum, strlen(line))) break endif let lnum = prevnonblank(lnum - 1) endwhile return lnum endfunction " Find line above 'lnum' that started the continuation 'lnum' may be part of. function s:GetMSL(lnum) " Start on the line we're at and use its indent. let msl = a:lnum let lnum = s:PrevNonBlankNonString(a:lnum - 1) while lnum > 0 " If we have a continuation line, or we're in a string, use line as MSL. " Otherwise, terminate search as we have found our MSL already. let line = getline(lnum) let col = match(line, s:continuation_regex2) + 1 if (col > 0 && !s:IsInStringOrComment(lnum, col)) \ || s:IsInString(lnum, strlen(line)) let msl = lnum else break endif let lnum = s:PrevNonBlankNonString(lnum - 1) endwhile return msl endfunction " Check if line 'lnum' has more opening brackets than closing ones. function s:LineHasOpeningBrackets(lnum) let open_0 = 0 let open_2 = 0 let open_4 = 0 let line = getline(a:lnum) let pos = match(line, '[][(){}]', 0) while pos != -1 if !s:IsInStringOrComment(a:lnum, pos + 1) let idx = stridx('(){}[]', line[pos]) if idx % 2 == 0 let open_{idx} = open_{idx} + 1 else let open_{idx - 1} = open_{idx - 1} - 1 endif endif let pos = match(line, '[][(){}]', pos + 1) endwhile return (open_0 > 0) . (open_2 > 0) . (open_4 > 0) endfunction function s:Match(lnum, regex) let col = match(getline(a:lnum), '\C'.a:regex) + 1 return col > 0 && !s:IsInStringOrComment(a:lnum, col) ? col : 0 endfunction function s:MatchLast(lnum, regex) let line = getline(a:lnum) let col = match(line, '.*\zs' . a:regex) while col != -1 && s:IsInStringOrComment(a:lnum, col) let line = strpart(line, 0, col) let col = match(line, '.*' . a:regex) endwhile return col + 1 endfunction " 3. GetRubyIndent Function {{{1 " ========================= function GetRubyIndent() " 3.1. Setup {{{2 " ---------- " Set up variables for restoring position in file. Could use v:lnum here. let vcol = col('.') " 3.2. Work on the current line {{{2 " ----------------------------- " Get the current line. let line = getline(v:lnum) let ind = -1 " If we got a closing bracket on an empty line, find its match and indent " according to it. For parentheses we indent to its column - 1, for the " others we indent to the containing line's MSL's level. Return -1 if fail. let col = matchend(line, '^\s*[]})]') if col > 0 && !s:IsInStringOrComment(v:lnum, col) call cursor(v:lnum, col) let bs = strpart('(){}[]', stridx(')}]', line[col - 1]) * 2, 2) if searchpair(escape(bs[0], '\['), '', bs[1], 'bW', s:skip_expr) > 0 if line[col-1]==')' && col('.') != col('$') - 1 let ind = virtcol('.')-1 else let ind = indent(s:GetMSL(line('.'))) endif endif return ind endif " If we have a =begin or =end set indent to first column. if match(line, '^\s*\%(=begin\|=end\)$') != -1 return 0 endif " If we have a deindenting keyword, find its match and indent to its level. " TODO: this is messy if s:Match(v:lnum, s:ruby_deindent_keywords) call cursor(v:lnum, 1) if searchpair(s:end_start_regex, s:end_middle_regex, s:end_end_regex, 'bW', \ s:end_skip_expr) > 0 let line = getline('.') if strpart(line, 0, col('.') - 1) =~ '=\s*$' && \ strpart(line, col('.') - 1, 2) !~ 'do' let ind = virtcol('.') - 1 else let ind = indent('.') endif endif return ind endif " If we are in a multi-line string or line-comment, don't do anything to it. if s:IsInStringOrDocumentation(v:lnum, matchend(line, '^\s*') + 1) return indent('.') endif " 3.3. Work on the previous line. {{{2 " ------------------------------- " Find a non-blank, non-multi-line string line above the current line. let lnum = s:PrevNonBlankNonString(v:lnum - 1) " If the line is empty and inside a string, use the previous line. if line =~ '^\s*$' && lnum != prevnonblank(v:lnum - 1) return indent(prevnonblank(v:lnum)) endif " At the start of the file use zero indent. if lnum == 0 return 0 endif " Set up variables for current line. let line = getline(lnum) let ind = indent(lnum) " If the previous line ended with a block opening, add a level of indent. if s:Match(lnum, s:block_regex) return indent(s:GetMSL(lnum)) + &sw endif " If the previous line contained an opening bracket, and we are still in it, " add indent depending on the bracket type. if line =~ '[[({]' let counts = s:LineHasOpeningBrackets(lnum) if counts[0] == '1' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0 if col('.') + 1 == col('$') return ind + &sw else return virtcol('.') endif elseif counts[1] == '1' || counts[2] == '1' return ind + &sw else call cursor(v:lnum, vcol) end endif " If the previous line ended with an "end", match that "end"s beginning's " indent. let col = s:Match(lnum, '\%(^\|[^.:@$]\)\<end\>\s*\%(#.*\)\=$') if col > 0 call cursor(lnum, col) if searchpair(s:end_start_regex, '', s:end_end_regex, 'bW', \ s:end_skip_expr) > 0 let n = line('.') let ind = indent('.') let msl = s:GetMSL(n) if msl != n let ind = indent(msl) end return ind endif end let col = s:Match(lnum, s:ruby_indent_keywords) if col > 0 call cursor(lnum, col) let ind = virtcol('.') - 1 + &sw " let ind = indent(lnum) + &sw " TODO: make this better (we need to count them) (or, if a searchpair " fails, we know that something is lacking an end and thus we indent a " level if s:Match(lnum, s:end_end_regex) let ind = indent('.') endif return ind endif " 3.4. Work on the MSL line. {{{2 " -------------------------- " Set up variables to use and search for MSL to the previous line. let p_lnum = lnum let lnum = s:GetMSL(lnum) " If the previous line wasn't a MSL and is continuation return its indent. " TODO: the || s:IsInString() thing worries me a bit. if p_lnum != lnum if s:Match(p_lnum,s:continuation_regex)||s:IsInString(p_lnum,strlen(line)) return ind endif endif " Set up more variables, now that we know we wasn't continuation bound. let line = getline(lnum) let msl_ind = indent(lnum) " If the MSL line had an indenting keyword in it, add a level of indent. " TODO: this does not take into account contrived things such as " module Foo; class Bar; end if s:Match(lnum, s:ruby_indent_keywords) let ind = msl_ind + &sw if s:Match(lnum, s:end_end_regex) let ind = ind - &sw endif return ind endif " If the previous line ended with [*+/.-=], indent one extra level. if s:Match(lnum, s:continuation_regex) if lnum == p_lnum let ind = msl_ind + &sw else let ind = msl_ind endif endif " }}}2 return ind endfunction " }}}1 let &cpo = s:cpo_save unlet s:cpo_save " vim:set sw=2 sts=2 ts=8 noet:
zyz2011-vim
runtime/indent/ruby.vim
Vim Script
gpl2
11,829
" Vim indent file " Language: bst " Author: Tim Pope <vimNOSPAM@tpope.info> " $Id: bst.vim,v 1.1 2007/05/05 18:11:12 vimboss Exp $ if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal expandtab setlocal indentexpr=GetBstIndent(v:lnum) "setlocal smartindent setlocal cinkeys& setlocal cinkeys-=0# setlocal indentkeys& "setlocal indentkeys+=0% " Only define the function once. if exists("*GetBstIndent") finish endif function! s:prevgood(lnum) " Find a non-blank line above the current line. " Skip over comments. let lnum = a:lnum while lnum > 0 let lnum = prevnonblank(lnum - 1) if getline(lnum) !~ '^\s*%.*$' break endif endwhile return lnum endfunction function! s:strip(lnum) let line = getline(a:lnum) let line = substitute(line,'"[^"]*"','""','g') let line = substitute(line,'%.*','','') let line = substitute(line,'^\s\+','','') return line endfunction function! s:count(string,char) let str = substitute(a:string,'[^'.a:char.']','','g') return strlen(str) endfunction function! GetBstIndent(lnum) abort if a:lnum == 1 return 0 endif let lnum = s:prevgood(a:lnum) if lnum <= 0 return indent(a:lnum - 1) endif let line = s:strip(lnum) let cline = s:strip(a:lnum) if cline =~ '^}' && exists("b:current_syntax") call cursor(a:lnum,indent(a:lnum)) if searchpair('{','','}','bW',"synIDattr(synID(line('.'),col('.'),1),'name') =~? 'comment\\|string'") if col('.')+1 == col('$') return indent('.') else return virtcol('.')-1 endif endif endif let fakeline = substitute(line,'^}','','').matchstr(cline,'^}') let ind = indent(lnum) let ind = ind + &sw * s:count(line,'{') let ind = ind - &sw * s:count(fakeline,'}') return ind endfunction
zyz2011-vim
runtime/indent/bst.vim
Vim Script
gpl2
1,919
" Vim indent file " Language: DTD (Document Type Definition for XML) " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2011-07-08 let s:cpo_save = &cpo set cpo&vim setlocal indentexpr=GetDTDIndent() setlocal indentkeys=!^F,o,O,> setlocal nosmartindent if exists("*GetDTDIndent") finish endif " TODO: Needs to be adjusted to stop at [, <, and ]. let s:token_pattern = '^[^[:space:]]\+' function s:lex1(input, start, ...) let pattern = a:0 > 0 ? a:1 : s:token_pattern let start = matchend(a:input, '^\_s*', a:start) if start == -1 return ["", a:start] endif let end = matchend(a:input, pattern, start) if end == -1 return ["", a:start] endif let token = strpart(a:input, start, end - start) return [token, end] endfunction function s:lex(input, start, ...) let pattern = a:0 > 0 ? a:1 : s:token_pattern let info = s:lex1(a:input, a:start, pattern) while info[0] == '--' let info = s:lex1(a:input, info[1], pattern) while info[0] != "" && info[0] != '--' let info = s:lex1(a:input, info[1], pattern) endwhile if info[0] == "" return info endif let info = s:lex1(a:input, info[1], pattern) endwhile return info endfunction function s:indent_to_innermost_parentheses(line, end) let token = '(' let end = a:end let parentheses = [end - 1] while token != "" let [token, end] = s:lex(a:line, end, '^\%([(),|]\|[A-Za-z0-9_-]\+\|#P\=CDATA\|%[A-Za-z0-9_-]\+;\)[?*+]\=') if token[0] == '(' call add(parentheses, end - 1) elseif token[0] == ')' if len(parentheses) == 1 return [-1, end] endif call remove(parentheses, -1) endif endwhile return [parentheses[-1] - strridx(a:line, "\n", parentheses[-1]), end] endfunction " TODO: Line and end could be script global (think OO members). function GetDTDIndent() if v:lnum == 1 return 0 endif " Begin by searching back for a <! that isn’t inside a comment. " From here, depending on what follows immediately after, parse to " where we’re at to determine what to do. if search('<!', 'bceW') == 0 return indent(v:lnum - 1) endif let lnum = line('.') let col = col('.') let indent = indent('.') let line = lnum == v:lnum ? getline(lnum) : join(getline(lnum, v:lnum - 1), "\n") let [declaration, end] = s:lex1(line, col) if declaration == "" return indent + &sw elseif declaration == '--' " We’re looking at a comment. Now, simply determine if the comment is " terminated or not. If it isn’t, let Vim take care of that using " 'comments' and 'autoindent'. Otherwise, indent to the first lines level. while declaration != "" let [declaration, end] = s:lex(line, end) if declaration == "-->" return indent endif endwhile return -1 elseif declaration == 'ELEMENT' " Check for element name. If none exists, indent one level. let [name, end] = s:lex(line, end) if name == "" return indent + &sw endif " Check for token following element name. This can be a specification of " whether the start or end tag may be omitted. If nothing is found, indent " one level. let [token, end] = s:lex(line, end, '^\%([-O(]\|ANY\|EMPTY\)') let n = 0 while token =~ '[-O]' && n < 2 let [token, end] = s:lex(line, end, '^\%([-O(]\|ANY\|EMPTY\)') let n += 1 endwhile if token == "" return indent + &sw endif " Next comes the content model. If the token we’ve found isn’t a " parenthesis it must be either ANY, EMPTY or some random junk. Either " way, we’re done indenting this element, so set it to that of the first " line so that the terminating “>” winds up having the same indention. if token != '(' return indent endif " Now go through the content model. We need to keep track of the nesting " of parentheses. As soon as we hit 0 we’re done. If that happens we must " have a complete content model. Thus set indention to be the same as that " of the first line so that the terminating “>” winds up having the same " indention. Otherwise, we’ll indent to the innermost parentheses not yet " matched. let [indent_of_innermost, end] = s:indent_to_innermost_parentheses(line, end) if indent_of_innermost != -1 return indent_of_innermost endif " Finally, look for any additions and/or exceptions to the content model. " This is defined by a “+” or “-” followed by another content model " declaration. " TODO: Can the “-” be separated by whitespace from the “(”? let seen = { '+(': 0, '-(': 0 } while 1 let [additions_exceptions, end] = s:lex(line, end, '^[+-](') if additions_exceptions != '+(' && additions_exceptions != '-(' let [token, end] = s:lex(line, end) if token == '>' return indent endif " TODO: Should use s:lex here on getline(v:lnum) and check for >. return getline(v:lnum) =~ '^\s*>' || count(values(seen), 0) == 0 ? indent : (indent + &sw) endif " If we’ve seen an addition or exception already and this is of the same " kind, the user is writing a broken DTD. Time to bail. if seen[additions_exceptions] return indent endif let seen[additions_exceptions] = 1 let [indent_of_innermost, end] = s:indent_to_innermost_parentheses(line, end) if indent_of_innermost != -1 return indent_of_innermost endif endwhile elseif declaration == 'ATTLIST' " Check for element name. If none exists, indent one level. let [name, end] = s:lex(line, end) if name == "" return indent + &sw endif " Check for any number of attributes. while 1 " Check for attribute name. If none exists, indent one level, unless the " current line is a lone “>”, in which case we indent to the same level " as the first line. Otherwise, if the attribute name is “>”, we have " actually hit the end of the attribute list, in which case we indent to " the same level as the first line. let [name, end] = s:lex(line, end) if name == "" " TODO: Should use s:lex here on getline(v:lnum) and check for >. return getline(v:lnum) =~ '^\s*>' ? indent : (indent + &sw) elseif name == ">" return indent endif " Check for attribute value declaration. If none exists, indent two " levels. Otherwise, if it’s an enumerated value, check for nested " parentheses and indent to the innermost one if we don’t reach the end " of the listc. Otherwise, just continue with looking for the default " attribute value. " TODO: Do validation of keywords " (CDATA|NMTOKEN|NMTOKENS|ID|IDREF|IDREFS|ENTITY|ENTITIES)? let [value, end] = s:lex(line, end, '^\%((\|[^[:space:]]\+\)') if value == "" return indent + &sw * 2 elseif value == 'NOTATION' " If this is a enumerated value based on notations, read another token " for the actual value. If it doesn’t exist, indent three levels. " TODO: If validating according to above, value must be equal to '('. let [value, end] = s:lex(line, end, '^\%((\|[^[:space:]]\+\)') if value == "" return indent + &sw * 3 endif endif if value == '(' let [indent_of_innermost, end] = s:indent_to_innermost_parentheses(line, end) if indent_of_innermost != -1 return indent_of_innermost endif endif " Finally look for the attribute’s default value. If non exists, indent " two levels. let [default, end] = s:lex(line, end, '^\%("\_[^"]*"\|#\(REQUIRED\|IMPLIED\|FIXED\)\)') if default == "" return indent + &sw * 2 elseif default == '#FIXED' " We need to look for the fixed value. If non exists, indent three " levels. let [default, end] = s:lex(line, end, '^"\_[^"]*"') if default == "" return indent + &sw * 3 endif endif endwhile elseif declaration == 'ENTITY' " Check for entity name. If none exists, indent one level. Otherwise, if " the name actually turns out to be a percent sign, “%”, this is a " parameter entity. Read another token to determine the entity name and, " again, if none exists, indent one level. let [name, end] = s:lex(line, end) if name == "" return indent + &sw elseif name == '%' let [name, end] = s:lex(line, end) if name == "" return indent + &sw endif endif " Now check for the entity value. If none exists, indent one level. If it " does exist, indent to same level as first line, as we’re now done with " this entity. " " The entity value can be a string in single or double quotes (no escapes " to worry about, as entities are used instead). However, it can also be " that this is an external unparsed entity. In that case we have to look " further for (possibly) a public ID and an URI followed by the NDATA " keyword and the actual notation name. For the public ID and URI, indent " two levels, if they don’t exist. If the NDATA keyword doesn’t exist, " indent one level. Otherwise, if the actual notation name doesn’t exist, " indent two level. If it does, indent to same level as first line, as " we’re now done with this entity. let [value, end] = s:lex(line, end) if value == "" return indent + &sw elseif value == 'SYSTEM' || value == 'PUBLIC' let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\)') if quoted_string == "" return indent + &sw * 2 endif if value == 'PUBLIC' let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\)') if quoted_string == "" return indent + &sw * 2 endif endif let [ndata, end] = s:lex(line, end) if ndata == "" return indent + &sw endif let [name, end] = s:lex(line, end) return name == "" ? (indent + &sw * 2) : indent else return indent endif elseif declaration == 'NOTATION' " Check for notation name. If none exists, indent one level. let [name, end] = s:lex(line, end) if name == "" return indent + &sw endif " Now check for the external ID. If none exists, indent one level. let [id, end] = s:lex(line, end) if id == "" return indent + &sw elseif id == 'SYSTEM' || id == 'PUBLIC' let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\)') if quoted_string == "" return indent + &sw * 2 endif if id == 'PUBLIC' let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\|>\)') if quoted_string == "" " TODO: Should use s:lex here on getline(v:lnum) and check for >. return getline(v:lnum) =~ '^\s*>' ? indent : (indent + &sw * 2) elseif quoted_string == '>' return indent endif endif endif return indent endif " TODO: Processing directives could be indented I suppose. But perhaps it’s " just as well to let the user decide how to indent them (perhaps extending " this function to include proper support for whatever processing directive " language they want to use). " Conditional sections are simply passed along to let Vim decide what to do " (and hence the user). return -1 endfunction let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/indent/dtd.vim
Vim Script
gpl2
11,668
" Vim indent file " Language: XHTML " Maintainer: Bram Moolenaar <Bram@vim.org> (for now) " Last Change: 2005 Jun 24 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif " Handled like HTML for now. runtime! indent/html.vim
zyz2011-vim
runtime/indent/xhtml.vim
Vim Script
gpl2
269
" Vim indent file " Language: LifeLines " Maintainer: Patrick Texier <p.texier@orsennes.com> " Location: <http://patrick.texier.free.fr/vim/indent/lifelines.vim> " Last Change: 2010 May 7 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 " LifeLines uses cindent without ; line terminator, C functions " declarations, C keywords, C++ formating setlocal cindent setlocal cinwords="" setlocal cinoptions+=+0 setlocal cinoptions+=p0 setlocal cinoptions+=i0 setlocal cinoptions+=t0 setlocal cinoptions+=*500 let b:undo_indent = "setl cin< cino< cinw<" " vim: ts=8 sw=4
zyz2011-vim
runtime/indent/lifelines.vim
Vim Script
gpl2
637
" Vim indent file " Language: git config file " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2012 April 7 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal autoindent setlocal indentexpr=GetGitconfigIndent() setlocal indentkeys=o,O,*<Return>,0[,],0;,0#,=,!^F let b:undo_indent = 'setl ai< inde< indk<' " Only define the function once. if exists("*GetGitconfigIndent") finish endif function! GetGitconfigIndent() let line = getline(prevnonblank(v:lnum-1)) let cline = getline(v:lnum) if line =~ '\\\@<!\%(\\\\\)*\\$' " odd number of slashes, in a line continuation return 2 * &sw elseif cline =~ '^\s*\[' return 0 elseif cline =~ '^\s*\a' return &sw elseif cline == '' && line =~ '^\[' return &sw else return -1 endif endfunction
zyz2011-vim
runtime/indent/gitconfig.vim
Vim Script
gpl2
818