diff options
Diffstat (limited to 'runtime/syntax')
-rw-r--r-- | runtime/syntax/groovy.vim | 16 | ||||
-rw-r--r-- | runtime/syntax/lex.vim | 14 | ||||
-rw-r--r-- | runtime/syntax/lisp.vim | 30 | ||||
-rw-r--r-- | runtime/syntax/logindefs.vim | 236 | ||||
-rw-r--r-- | runtime/syntax/rhelp.vim | 48 | ||||
-rw-r--r-- | runtime/syntax/tex.vim | 49 | ||||
-rw-r--r-- | runtime/syntax/vim.vim | 22 | ||||
-rw-r--r-- | runtime/syntax/yacc.vim | 22 |
8 files changed, 275 insertions, 162 deletions
diff --git a/runtime/syntax/groovy.vim b/runtime/syntax/groovy.vim index d2f34968b..721692267 100644 --- a/runtime/syntax/groovy.vim +++ b/runtime/syntax/groovy.vim @@ -1,10 +1,13 @@ " Vim syntax file " Language: Groovy -" Maintainer: Alessio Pace <billy.corgan@tiscali.it> -" Version: 0.1.9b +" Original Author: Alessio Pace <billy.corgan@tiscali.it> +" Maintainer: Tobias Rapp <yahuxo@gmx.de> +" Version: 0.1.10 " URL: http://www.vim.org/scripts/script.php?script_id=945 -" Last Change: 6/4/2004 +" Last Change: 2010 Nov 29 +" THE ORIGINAL AUTHOR'S NOTES: +" " This is my very first vim script, I hope to have " done it the right way. " @@ -16,8 +19,7 @@ " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded " -" HOWTO USE IT (INSTALL): -" [groovy is still not recognized by vim! :-( ] +" HOWTO USE IT (INSTALL) when not part of the distribution: " " 1) copy the file in the (global or user's $HOME/.vim/syntax/) syntax folder " @@ -247,7 +249,9 @@ syn match groovySpecialError contained "\\." syn match groovySpecialCharError contained "[^']" syn match groovySpecialChar contained "\\\([4-9]\d\|[0-3]\d\d\|[\"\\'ntbrf]\|u\x\{4\}\)" syn region groovyString start=+"+ end=+"+ end=+$+ contains=groovySpecialChar,groovySpecialError,@Spell,groovyELExpr -syn region groovyString start=+'+ end=+'+ end=+$+ contains=groovySpecialChar,groovySpecialError,@Spell,groovyELExpr +syn region groovyString start=+'+ end=+'+ end=+$+ contains=groovySpecialChar,groovySpecialError,@Spell +syn region groovyString start=+"""+ end=+"""+ contains=groovySpecialChar,groovySpecialError,@Spell,groovyELExpr +syn region groovyString start=+'''+ end=+'''+ contains=groovySpecialChar,groovySpecialError,@Spell " syn region groovyELExpr start=+${+ end=+}+ keepend contained syn match groovyELExpr /\${.\{-}}/ contained GroovyHiLink groovyELExpr Identifier diff --git a/runtime/syntax/lex.vim b/runtime/syntax/lex.vim index 68ae63273..e500f5c07 100644 --- a/runtime/syntax/lex.vim +++ b/runtime/syntax/lex.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: Lex " Maintainer: Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> -" Last Change: Sep 11, 2009 -" Version: 10 +" Last Change: Nov 01, 2010 +" Version: 12 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax " " Option: @@ -36,6 +36,9 @@ endif " --- Lex stuff --- " --- ========= --- +" Options Section +syn match lexOptions '^%\s*option\>.*$' contains=lexPatString + "I'd prefer to use lex.* , but vim doesn't handle forward definitions yet syn cluster lexListGroup contains=lexAbbrvBlock,lexAbbrv,lexAbbrv,lexAbbrvRegExp,lexInclude,lexPatBlock,lexPat,lexBrace,lexPatString,lexPatTag,lexPatTag,lexPatComment,lexPatCodeLine,lexMorePat,lexPatSep,lexSlashQuote,lexPatCode,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut2,cCommentStartError,cParenError syn cluster lexListPatCodeGroup contains=lexAbbrvBlock,lexAbbrv,lexAbbrv,lexAbbrvRegExp,lexInclude,lexPatBlock,lexPat,lexBrace,lexPatTag,lexPatTag,lexPatTagZoneStart,lexPatComment,lexPatCodeLine,lexMorePat,lexPatSep,lexSlashQuote,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut2,cCommentStartError,cParenError @@ -61,13 +64,15 @@ endif "%% : Patterns {Actions} if has("folding") - syn region lexPatBlock fold matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=lexPatTag,lexPatTagZone,lexPatComment,lexPat + syn region lexPatBlock fold matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=lexPatTag,lexPatTagZone,lexPatComment,lexPat,lexPatInclude syn region lexPat fold start=+\S+ skip="\\\\\|\\." end="\s"me=e-1 contained nextgroup=lexMorePat,lexPatSep contains=lexPatTag,lexPatString,lexSlashQuote,lexBrace + syn region lexPatInclude fold matchgroup=lexSep start="^%{" end="%}" contained contains=lexPatCode syn region lexBrace fold start="\[" skip=+\\\\\|\\+ end="]" contained syn region lexPatString fold matchgroup=String start=+"+ skip=+\\\\\|\\"+ matchgroup=String end=+"+ contained else - syn region lexPatBlock matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=lexPatTag,lexPatTagZone,lexPatComment,lexPat + syn region lexPatBlock matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=lexPatTag,lexPatTagZone,lexPatComment,lexPat,lexPatInclude syn region lexPat start=+\S+ skip="\\\\\|\\." end="\s"me=e-1 contained nextgroup=lexMorePat,lexPatSep contains=lexPatTag,lexPatString,lexSlashQuote,lexBrace + syn region lexPatInclude matchgroup=lexSep start="^%{" end="%}" contained contains=lexPatCode syn region lexBrace start="\[" skip=+\\\\\|\\+ end="]" contained syn region lexPatString matchgroup=String start=+"+ skip=+\\\\\|\\"+ matchgroup=String end=+"+ contained endif @@ -117,6 +122,7 @@ hi def link lexAbbrvRegExp Macro hi def link lexAbbrv SpecialChar hi def link lexCFunctions Function hi def link lexMorePat SpecialChar +hi def link lexOptions PreProc hi def link lexPatComment Comment hi def link lexPat Function hi def link lexPatString Function diff --git a/runtime/syntax/lisp.vim b/runtime/syntax/lisp.vim index fd44f6073..74ec20bb4 100644 --- a/runtime/syntax/lisp.vim +++ b/runtime/syntax/lisp.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: Lisp " Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> -" Last Change: Mar 05, 2009 -" Version: 21 +" Last Change: Nov 16, 2010 +" Version: 22 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax " " Thanks to F Xavier Noria for a list of 978 Common Lisp symbols @@ -32,7 +32,7 @@ endif " --------------------------------------------------------------------- " Clusters: {{{1 syn cluster lispAtomCluster contains=lispAtomBarSymbol,lispAtomList,lispAtomNmbr0,lispComment,lispDecl,lispFunc,lispLeadWhite -syn cluster lispBaseListCluster contains=lispAtom,lispAtomBarSymbol,lispAtomMark,lispBQList,lispBarSymbol,lispComment,lispConcat,lispDecl,lispFunc,lispKey,lispList,lispNumber,lispSpecial,lispSymbol,lispVar,lispLeadWhite +syn cluster lispBaseListCluster contains=lispAtom,lispAtomBarSymbol,lispAtomMark,lispBQList,lispBarSymbol,lispComment,lispConcat,lispDecl,lispFunc,lispKey,lispList,lispNumber,lispEscapeSpecial,lispSymbol,lispVar,lispLeadWhite if exists("g:lisp_instring") syn cluster lispListCluster contains=@lispBaseListCluster,lispString,lispInString,lispInStringString else @@ -68,7 +68,7 @@ syn match lispAtom "'("me=e-1 contains=lispAtomMark nextgroup=lispAtomList syn match lispAtom "'[^ \t()]\+" contains=lispAtomMark syn match lispAtomBarSymbol !'|..\{-}|! contains=lispAtomMark syn region lispAtom start=+'"+ skip=+\\"+ end=+"+ -syn region lispAtomList contained matchgroup=Special start="(" skip="|.\{-}|" matchgroup=Special end=")" contains=@lispAtomCluster,lispString,lispSpecial +syn region lispAtomList contained matchgroup=Special start="(" skip="|.\{-}|" matchgroup=Special end=")" contains=@lispAtomCluster,lispString,lispEscapeSpecial syn match lispAtomNmbr contained "\<\d\+" syn match lispLeadWhite contained "^\s\+" @@ -537,16 +537,16 @@ endif syn match lispNumber "-\=\(\.\d\+\|\d\+\(\.\d*\)\=\)\([dDeEfFlL][-+]\=\d\+\)\=" syn match lispNumber "-\=\(\d\+/\d\+\)" -syn match lispSpecial "\*\w[a-z_0-9-]*\*" -syn match lispSpecial !#|[^()'`,"; \t]\+|#! -syn match lispSpecial !#x\x\+! -syn match lispSpecial !#o\o\+! -syn match lispSpecial !#b[01]\+! -syn match lispSpecial !#\\[ -}\~]! -syn match lispSpecial !#[':][^()'`,"; \t]\+! -syn match lispSpecial !#([^()'`,"; \t]\+)! -syn match lispSpecial !#\\\%(Space\|Newline\|Tab\|Page\|Rubout\|Linefeed\|Return\|Backspace\)! -syn match lispSpecial "\<+[a-zA-Z_][a-zA-Z_0-9-]*+\>" +syn match lispEscapeSpecial "\*\w[a-z_0-9-]*\*" +syn match lispEscapeSpecial !#|[^()'`,"; \t]\+|#! +syn match lispEscapeSpecial !#x\x\+! +syn match lispEscapeSpecial !#o\o\+! +syn match lispEscapeSpecial !#b[01]\+! +syn match lispEscapeSpecial !#\\[ -}\~]! +syn match lispEscapeSpecial !#[':][^()'`,"; \t]\+! +syn match lispEscapeSpecial !#([^()'`,"; \t]\+)! +syn match lispEscapeSpecial !#\\\%(Space\|Newline\|Tab\|Page\|Rubout\|Linefeed\|Return\|Backspace\)! +syn match lispEscapeSpecial "\<+[a-zA-Z_][a-zA-Z_0-9-]*+\>" syn match lispConcat "\s\.\s" syn match lispParenError ")" @@ -585,7 +585,7 @@ if version >= 508 HiLink lispMark Delimiter HiLink lispNumber Number HiLink lispParenError Error - HiLink lispSpecial Type + HiLink lispEscapeSpecial Type HiLink lispString String HiLink lispTodo Todo HiLink lispVar Statement diff --git a/runtime/syntax/logindefs.vim b/runtime/syntax/logindefs.vim index 7c2b122ae..59d18e7ef 100644 --- a/runtime/syntax/logindefs.vim +++ b/runtime/syntax/logindefs.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: login.defs(5) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2006-04-19 +" Latest Revision: 2010-11-29 if exists("b:current_syntax") finish @@ -10,83 +10,163 @@ endif let s:cpo_save = &cpo set cpo&vim -syn keyword logindefsTodo contained TODO FIXME XXX NOTE - -syn region logindefsComment display oneline start='^\s*#' end='$' - \ contains=logindefsTodo,@Spell - -syn match logindefsString contained '[[:graph:]]\+' - -syn match logindefsPath contained '[[:graph:]]\+' - -syn match logindefsPaths contained '[[:graph:]]\+' - \ nextgroup=logindefsPathDelim - -syn match logindefsPathDelim contained ':' nextgroup=logindefsPaths - -syn keyword logindefsBoolean contained yes no - -syn match logindefsDecimal contained '\<\d\+\>' - -syn match logindefsOctal contained display '\<0\o\+\>' - \ contains=logindefsOctalZero -syn match logindefsOctalZero contained display '\<0' -syn match logindefsOctalError contained display '\<0\o*[89]\d*\>' - -syn match logindefsHex contained display '\<0x\x\+\>' - -syn cluster logindefsNumber contains=logindefsDecimal,logindefsOctal, - \ logindefsOctalError,logindefsHex - -syn match logindefsBegin display '^' - \ nextgroup=logindefsKeyword,logindefsComment - \ skipwhite - -syn keyword logindefsKeyword contained CHFN_AUTH CLOSE_SESSIONS CREATE_HOME - \ DEFAULT_HOME FAILLOG_ENAB LASTLOG_ENAB - \ LOG_OK_LOGINS LOG_UNKFAIL_ENAB MAIL_CHECK_ENAB - \ MD5_CRYPT_ENAB OBSCURE_CHECKS_ENAB - \ PASS_ALWAYS_WARN PORTTIME_CHECKS_ENAB - \ QUOTAS_ENAB SU_WHEEL_ONLY SYSLOG_SG_ENAB - \ SYSLOG_SU_ENAB USERGROUPS_ENAB - \ nextgroup=logindefsBoolean skipwhite - -syn keyword logindefsKeyword contained CHFN_RESTRICT CONSOLE CONSOLE_GROUPS - \ ENV_TZ ENV_HZ FAKE_SHELL SU_NAME LOGIN_STRING - \ NOLOGIN_STR TTYGROUP USERDEL_CMD - \ nextgroup=logindefsString skipwhite - -syn keyword logindefsKeyword contained ENVIRON_FILE FTMP_FILE HUSHLOGIN_FILE - \ ISSUE_FILE MAIL_DIR MAIL_FILE NOLOGINS_FILE - \ NOLOGINS_FILE TTYTYPE_FILE QMAIL_DIR - \ SULOG_FILE - \ nextgroup=logindefsPath skipwhite - -syn keyword logindefsKeyword contained CRACKLIB_DICTPATH ENV_PATH - \ ENV_ROOTPATH ENV_SUPATH MOTD_FILE - \ nextgroup=logindefsPaths skipwhite - -syn keyword logindefsKeyword contained ERASECHAR FAIL_DELAY GETPASS_ASTERISKS - \ GID_MAX GID_MIN KILLCHAR LOGIN_RETRIES - \ LOGIN_TIMEOUT PASS_CHANGE_TRIES PASS_MAX_DAYS - \ PASS_MAX_LEN PASS_MIN_DAYS PASS_MIN_LEN - \ PASS_WARN_AGE TTYPERM UID_MAX UID_MIN ULIMIT - \ UMASK - \ nextgroup=@logindefsNumber skipwhite - -hi def link logindefsTodo Todo -hi def link logindefsComment Comment -hi def link logindefsString String -hi def link logindefsPath String -hi def link logindefsPaths logindefsPath -hi def link logindefsPathDelim Delimiter -hi def link logindefsBoolean Boolean -hi def link logindefsDecimal Number -hi def link logindefsOctal Number -hi def link logindefsOctalZero PreProc -hi def link logindefsOctalError Error -hi def link logindefsHex Number -hi def link logindefsKeyword Keyword +syn match logindefsBegin display '^' + \ nextgroup= + \ logindefsComment, + \ @logindefsKeyword + \ skipwhite + +syn region logindefsComment display oneline start='^\s*#' end='$' + \ contains=logindefsTodo,@Spell + +syn keyword logindefsTodo contained TODO FIXME XXX NOTE + +syn cluster logindefsKeyword contains= + \ logindefsBooleanKeyword, + \ logindefsEncryptKeyword, + \ logindefsNumberKeyword, + \ logindefsPathKeyword, + \ logindefsPathsKeyword, + \ logindefsStringKeyword + +syn keyword logindefsBooleanKeyword contained + \ CHFN_AUTH + \ CHSH_AUTH + \ CREATE_HOME + \ DEFAULT_HOME + \ FAILLOG_ENAB + \ LASTLOG_ENAB + \ LOG_OK_LOGINS + \ LOG_UNKFAIL_ENAB + \ MAIL_CHECK_ENAB + \ MD5_CRYPT_ENAB + \ OBSCURE_CHECKS_ENAB + \ PASS_ALWAYS_WARN + \ PORTTIME_CHECKS_ENAB + \ QUOTAS_ENAB + \ SU_WHEEL_ONLY + \ SYSLOG_SG_ENAB + \ SYSLOG_SU_ENAB + \ USERGROUPS_ENAB + \ nextgroup=logindefsBoolean skipwhite + +syn keyword logindefsBoolean contained yes no + +syn keyword logindefsEncryptKeyword contained + \ ENCRYPT_METHOD + \ nextgroup=logindefsEncryptMethod skipwhite + +syn keyword logindefsEncryptMethod contained + \ DES + \ MD5 + \ SHA256 + \ SHA512 + +syn keyword logindefsNumberKeyword contained + \ ERASECHAR + \ FAIL_DELAY + \ GID_MAX + \ GID_MIN + \ KILLCHAR + \ LOGIN_RETRIES + \ LOGIN_TIMEOUT + \ MAX_MEMBERS_PER_GROUP + \ PASS_CHANGE_TRIES + \ PASS_MAX_DAYS + \ PASS_MIN_DAYS + \ PASS_WARN_AGE + \ PASS_MAX_LEN + \ PASS_MIN_LEN + \ SHA_CRYPT_MAX_ROUNDS + \ SHA_CRYPT_MIN_ROUNDS + \ SYS_GID_MAX + \ SYS_GID_MIN + \ SYS_UID_MAX + \ SYS_UID_MIN + \ UID_MAX + \ UID_MIN + \ ULIMIT + \ UMASK + \ nextgroup=@logindefsNumber skipwhite + +syn cluster logindefsNumber contains= + \ logindefsDecimal, + \ logindefsHex, + \ logindefsOctal, + \ logindefsOctalError + +syn match logindefsDecimal contained '\<\d\+\>' + +syn match logindefsHex contained display '\<0x\x\+\>' + +syn match logindefsOctal contained display '\<0\o\+\>' + \ contains=logindefsOctalZero +syn match logindefsOctalZero contained display '\<0' + +syn match logindefsOctalError contained display '\<0\o*[89]\d*\>' + +syn keyword logindefsPathKeyword contained + \ ENVIRON_FILE + \ FAKE_SHELL + \ FTMP_FILE + \ HUSHLOGIN_FILE + \ ISSUE_FILE + \ MAIL_DIR + \ MAIL_FILE + \ NOLOGINS_FILE + \ SULOG_FILE + \ TTYTYPE_FILE + \ nextgroup=logindefsPath skipwhite + +syn match logindefsPath contained '[[:graph:]]\+' + +syn keyword logindefsPathsKeyword contained + \ CONSOLE + \ ENV_PATH + \ ENV_SUPATH + \ MOTD_FILE + \ nextgroup=logindefsPaths skipwhite + +syn match logindefsPaths contained '[^:]\+' + \ nextgroup=logindefsPathDelim + +syn match logindefsPathDelim contained ':' nextgroup=logindefsPaths + +syn keyword logindefsStringKeyword contained + \ CHFN_RESTRICT + \ CONSOLE_GROUPS + \ ENV_HZ + \ ENV_TZ + \ LOGIN_STRING + \ SU_NAME + \ TTYGROUP + \ TTYPERM + \ USERDEL_CMD + \ nextgroup=logindefsString skipwhite + +syn match logindefsString contained '[[:graph:]]\+' + +hi def link logindefsComment Comment +hi def link logindefsTodo Todo +hi def link logindefsKeyword Keyword +hi def link logindefsBooleanKeyword logindefsKeyword +hi def link logindefsEncryptKeyword logindefsKeyword +hi def link logindefsNumberKeyword logindefsKeyword +hi def link logindefsPathKeyword logindefsKeyword +hi def link logindefsPathsKeyword logindefsKeyword +hi def link logindefsStringKeyword logindefsKeyword +hi def link logindefsBoolean Boolean +hi def link logindefsEncryptMethod Type +hi def link logindefsNumber Number +hi def link logindefsDecimal logindefsNumber +hi def link logindefsHex logindefsNumber +hi def link logindefsOctal logindefsNumber +hi def link logindefsOctalZero PreProc +hi def link logindefsOctalError Error +hi def link logindefsPath String +hi def link logindefsPaths logindefsPath +hi def link logindefsPathDelim Delimiter +hi def link logindefsString String let b:current_syntax = "logindefs" diff --git a/runtime/syntax/rhelp.vim b/runtime/syntax/rhelp.vim index 98e5bc0c6..7550b1293 100644 --- a/runtime/syntax/rhelp.vim +++ b/runtime/syntax/rhelp.vim @@ -1,10 +1,10 @@ " Vim syntax file " Language: R Help File " Maintainer: Johannes Ranke <jranke@uni-bremen.de> -" Last Change: 2010 Apr 22 -" Version: 0.7.3 -" SVN: $Id: rhelp.vim 88 2010-04-22 19:37:09Z ranke $ -" Remarks: - Now includes R syntax highlighting in the appropriate +" Last Change: 2010 Nov 22 +" Version: 0.7.4 +" SVN: $Id: rhelp.vim 90 2010-11-22 10:58:11Z ranke $ +" Remarks: - Includes R syntax highlighting in the appropriate " sections if an r.vim file is in the same directory or in the " default debian location. " - There is no Latex markup in equations @@ -28,19 +28,19 @@ syn case match syn region rhelpIdentifier matchgroup=rhelpSection start="\\name{" end="}" syn region rhelpIdentifier matchgroup=rhelpSection start="\\alias{" end="}" syn region rhelpIdentifier matchgroup=rhelpSection start="\\pkg{" end="}" -syn region rhelpIdentifier matchgroup=rhelpSection start="\\item{" end="}" contained contains=rhelpDots -syn region rhelpIdentifier matchgroup=rhelpSection start="\\method{" end=/}/ contained +syn region rhelpIdentifier matchgroup=rhelpSection start="\\method{" end="}" contained +syn region rhelpIdentifier matchgroup=rhelpSection start="\\Rdversion{" end="}" " Highlighting of R code using an existing r.vim syntax file if available {{{1 syn include @R syntax/r.vim syn match rhelpDots "\\dots" containedin=@R -syn region rhelpRcode matchgroup=Delimiter start="\\examples{" matchgroup=Delimiter transparent end=/}/ contains=@R,rhelpSection -syn region rhelpRcode matchgroup=Delimiter start="\\usage{" matchgroup=Delimiter transparent end=/}/ contains=@R,rhelpIdentifier,rhelpS4method -syn region rhelpRcode matchgroup=Delimiter start="\\synopsis{" matchgroup=Delimiter transparent end=/}/ contains=@R -syn region rhelpRcode matchgroup=Delimiter start="\\special{" matchgroup=Delimiter transparent end=/}/ contains=@R contained -syn region rhelpRcode matchgroup=Delimiter start="\\code{" matchgroup=Delimiter transparent end=/}/ contains=@R,rhelpLink contained -syn region rhelpS4method matchgroup=Delimiter start="\\S4method{.*}(" matchgroup=Delimiter transparent end=/)/ contains=@R,rhelpDots contained -syn region rhelpSexpr matchgroup=Delimiter start="\\Sexpr{" matchgroup=Delimiter transparent end=/}/ contains=@R +syn region rhelpRcode matchgroup=Delimiter start="\\examples{" matchgroup=Delimiter transparent end="}" contains=@R,rhelpSection +syn region rhelpRcode matchgroup=Delimiter start="\\usage{" matchgroup=Delimiter transparent end="}" contains=@R,rhelpIdentifier,rhelpS4method +syn region rhelpRcode matchgroup=Delimiter start="\\synopsis{" matchgroup=Delimiter transparent end="}" contains=@R +syn region rhelpRcode matchgroup=Delimiter start="\\special{" matchgroup=Delimiter transparent end="}" contains=@R contained +syn region rhelpRcode matchgroup=Delimiter start="\\code{" matchgroup=Delimiter transparent end="}" contains=@R,rhelpLink contained +syn region rhelpS4method matchgroup=Delimiter start="\\S4method{.*}(" matchgroup=Delimiter transparent end=")" contains=@R,rhelpDots contained +syn region rhelpSexpr matchgroup=Delimiter start="\\Sexpr{" matchgroup=Delimiter transparent end="}" contains=@R " Strings {{{1 syn region rhelpString start=/"/ end=/"/ @@ -53,7 +53,7 @@ syn match rhelpDelimiter "\\cr" syn match rhelpDelimiter "\\tab " " Keywords {{{1 -syn match rhelpKeyword "\\R" +syn match rhelpKeyword "\\R" contained syn match rhelpKeyword "\\ldots" syn match rhelpKeyword "--" syn match rhelpKeyword "---" @@ -129,10 +129,13 @@ syn match rhelpType "\\deqn\>" syn match rhelpType "\\file\>" syn match rhelpType "\\email\>" syn match rhelpType "\\url\>" +syn match rhelpType "\\href\>" syn match rhelpType "\\var\>" syn match rhelpType "\\env\>" syn match rhelpType "\\option\>" syn match rhelpType "\\command\>" +syn match rhelpType "\\newcommand\>" +syn match rhelpType "\\renewcommand\>" syn match rhelpType "\\dfn\>" syn match rhelpType "\\cite\>" syn match rhelpType "\\acronym\>" @@ -140,6 +143,7 @@ syn match rhelpType "\\acronym\>" " rhelp sections {{{1 syn match rhelpSection "\\encoding\>" syn match rhelpSection "\\title\>" +syn match rhelpSection "\\item\>" syn match rhelpSection "\\description\>" syn match rhelpSection "\\concept\>" syn match rhelpSection "\\arguments\>" @@ -153,11 +157,11 @@ syn match rhelpSection "\\keyword\>" syn match rhelpSection "\\docType\>" syn match rhelpSection "\\format\>" syn match rhelpSection "\\source\>" -syn match rhelpSection "\\itemize\>" -syn match rhelpSection "\\describe\>" -syn match rhelpSection "\\enumerate\>" -syn match rhelpSection "\\item " -syn match rhelpSection "\\item$" +syn match rhelpSection "\\itemize\>" +syn match rhelpSection "\\describe\>" +syn match rhelpSection "\\enumerate\>" +syn match rhelpSection "\\item " +syn match rhelpSection "\\item$" syn match rhelpSection "\\tabular{[lcr]*}" syn match rhelpSection "\\dontrun\>" syn match rhelpSection "\\dontshow\>" @@ -165,11 +169,11 @@ syn match rhelpSection "\\testonly\>" syn match rhelpSection "\\donttest\>" " Freely named Sections {{{1 -syn region rhelpFreesec matchgroup=Delimiter start="\\section{" matchgroup=Delimiter transparent end=/}/ -syn region rhelpFreesubsec matchgroup=Delimiter start="\\subsection{" matchgroup=Delimiter transparent end=/}/ +syn region rhelpFreesec matchgroup=Delimiter start="\\section{" matchgroup=Delimiter transparent end="}" +syn region rhelpFreesubsec matchgroup=Delimiter start="\\subsection{" matchgroup=Delimiter transparent end="}" " R help file comments {{{1 -syn match rhelpComment /%.*$/ contained +syn match rhelpComment /%.*$/ " Error {{{1 syn region rhelpRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rhelpError,rhelpBraceError,rhelpCurlyError diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim index 5e6fc7f14..95bfc057d 100644 --- a/runtime/syntax/tex.vim +++ b/runtime/syntax/tex.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: TeX " Maintainer: Dr. Charles E. Campbell, Jr. <NdrchipO@ScampbellPfamily.AbizM> -" Last Change: Aug 12, 2010 -" Version: 57 +" Last Change: Sep 17, 2010 +" Version: 60 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax " " Notes: {{{1 @@ -67,11 +67,11 @@ endif " g:tex_stylish to 1 (for "*.sty" mode) " or to 0 else (normal "*.tex" mode) " or on a buffer-by-buffer basis with b:tex_stylish -let b:extfname=expand("%:e") +let s:extfname=expand("%:e") if exists("g:tex_stylish") let b:tex_stylish= g:tex_stylish elseif !exists("b:tex_stylish") - if b:extfname == "sty" || b:extfname == "cls" || b:extfname == "clo" || b:extfname == "dtx" || b:extfname == "ltx" + if s:extfname == "sty" || s:extfname == "cls" || s:extfname == "clo" || s:extfname == "dtx" || s:extfname == "ltx" let b:tex_stylish= 1 else let b:tex_stylish= 0 @@ -92,12 +92,12 @@ endif " (La)TeX keywords: only use the letters a-zA-Z {{{1 " but _ is the only one that causes problems. if version < 600 - set isk-=_ + set isk=a-z,A-Z if b:tex_stylish set isk+=@ endif else - setlocal isk-=_ + setlocal isk=a-z,A-Z if b:tex_stylish setlocal isk+=@ endif @@ -300,7 +300,7 @@ endif " Bad Math (mismatched): {{{1 if !exists("tex_no_math") - syn match texBadMath "\\end\s*{\s*\(array\|gathered\|bBpvV]matrix\|split\|subequations\|smallmatrix\|xxalignat\)\s*}" + syn match texBadMath "\\end\s*{\s*\(array\|gathered\|bBpvV]matrix\|split\|smallmatrix\|xxalignat\)\s*}" syn match texBadMath "\\end\s*{\s*\(align\|alignat\|displaymath\|displaymath\|eqnarray\|equation\|flalign\|gather\|math\|multline\|xalignat\)\*\=\s*}" syn match texBadMath "\\[\])]" endif @@ -345,7 +345,6 @@ if !exists("tex_no_math") call TexNewMathZone("G","gather",1) call TexNewMathZone("H","math",1) call TexNewMathZone("I","multline",1) - call TexNewMathZone("J","subequations",0) call TexNewMathZone("K","xalignat",1) call TexNewMathZone("L","xxalignat",0) @@ -412,7 +411,7 @@ endif syn case ignore syn keyword texTodo contained combak fixme todo xxx syn case match -if b:extfname == "dtx" +if s:extfname == "dtx" syn match texComment "\^\^A.*$" contains=@texCommentGroup syn match texComment "^%\+" contains=@texCommentGroup else @@ -468,15 +467,16 @@ else endif " Tex Reference Zones: {{{1 -syn region texZone matchgroup=texStatement start="@samp{" end="}\|%stopzone\>" contains=@texRefGroup -syn region texRefZone matchgroup=texStatement start="\\nocite{" end="}\|%stopzone\>" contains=@texRefGroup -syn region texRefZone matchgroup=texStatement start="\\bibliography{" end="}\|%stopzone\>" contains=@texRefGroup -syn region texRefZone matchgroup=texStatement start="\\label{" end="}\|%stopzone\>" contains=@texRefGroup -syn region texRefZone matchgroup=texStatement start="\\\(page\|eq\)ref{" end="}\|%stopzone\>" contains=@texRefGroup -syn region texRefZone matchgroup=texStatement start="\\v\=ref{" end="}\|%stopzone\>" contains=@texRefGroup -syn match texRefZone '\\cite\%([tp]\*\=\)\=' nextgroup=texRefOption,texCite -syn region texRefOption contained matchgroup=Delimiter start='\[' end=']' contains=@texRefGroup,texRefZone nextgroup=texRefOption,texCite -syn region texCite contained matchgroup=Delimiter start='{' end='}' contains=@texRefGroup,texRefZone,texCite +syn match texRefZone '\\@samp\>' skipwhite nextgroup=texRefLabel +syn match texRefZone '\\nocite\>' skipwhite nextgroup=texRefLabel +syn match texRefZone '\\bibliography\>' skipwhite nextgroup=texRefLabel +syn match texRefZone '\\label\>' skipwhite nextgroup=texRefLabel +syn match texRefZone '\\\(page\|eq\)ref\>' skipwhite nextgroup=texRefLabel +syn match texRefZone '\\v\=ref' skipwhite nextgroup=texRefLabel +syn match texRefZone '\\cite\%([tp]\*\=\)\=' skipwhite nextgroup=texCiteOption,texCite +syn region texRefLabel contained matchgroup=Delimiter start='{' end='}' contains=@texRefGroup +syn region texCiteOption contained matchgroup=Delimiter start='\[' end=']' contains=@Spell,@texRefGroup,@texMathZones,texRefZone nextgroup=texCiteOption,texCite +syn region texCite contained matchgroup=Delimiter start='{' end='}' contains=@texRefGroup,texCite " Handle newcommand, newenvironment : {{{1 syn match texNewCmd "\\newcommand\>" nextgroup=texCmdName skipwhite skipnl @@ -753,7 +753,11 @@ if has("conceal") && &enc == 'utf-8' \ ['wedge' , '∧'], \ ['wr' , '≀']] for texmath in s:texMathList - exe "syn match texMathSymbol '\\\\".texmath[0]."\\>' contained conceal cchar=".texmath[1] + if texmath[0] =~ '\w$' + exe "syn match texMathSymbol '\\\\".texmath[0]."\\>' contained conceal cchar=".texmath[1] + else + exe "syn match texMathSymbol '\\\\".texmath[0]."' contained conceal cchar=".texmath[1] + endif endfor if &ambw == "double" @@ -1027,7 +1031,6 @@ if did_tex_syntax_inits == 1 HiLink texError Error endif - HiLink texCite texRefZone HiLink texDefCmd texDef HiLink texDefName texDef HiLink texDocType texCmdName @@ -1052,6 +1055,7 @@ if did_tex_syntax_inits == 1 HiLink texMathZoneV texMath HiLink texMathZoneZ texMath endif + HiLink texRefZone Identifier HiLink texSectionMarker texCmdName HiLink texSectionName texSection HiLink texSpaceCode texStatement @@ -1060,6 +1064,7 @@ if did_tex_syntax_inits == 1 HiLink texTypeStyle texType " Basic TeX highlighting groups + HiLink texCite Special HiLink texCmdArgs Number HiLink texCmdName Statement HiLink texComment Comment @@ -1075,7 +1080,7 @@ if did_tex_syntax_inits == 1 HiLink texNewCmd Statement HiLink texNewEnv Statement HiLink texOption Number - HiLink texRefZone Special + HiLink texRefLabel Special HiLink texSection PreCondit HiLink texSpaceCodeChar Special HiLink texSpecialChar SpecialChar @@ -1089,6 +1094,6 @@ if did_tex_syntax_inits == 1 endif " Current Syntax: {{{1 -unlet b:extfname +unlet s:extfname let b:current_syntax = "tex" " vim: ts=8 fdm=marker diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index d94d1801d..a6f6e3664 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: Vim 7.3 script " Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> -" Last Change: August 04, 2010 -" Version: 7.3-04 +" Last Change: August 20, 2010 +" Version: 7.3-05 " Automatically generated keyword lists: {{{1 " Quit when a syntax file was already loaded {{{2 @@ -16,12 +16,14 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX syn cluster vimCommentGroup contains=vimTodo,@Spell " regular vim commands {{{2 -syn keyword vimCommand contained abc[lear] argdo argu[ment] bel[owright] bN[ext] breakd[el] b[uffer] caddb[uffer] cb[uffer] cex[pr] cg[etfile] checkt[ime] cnew[er] col[der] con[tinue] cq[uit] delc[ommand] diffoff diffu[pdate] dr[op] echom[sg] em[enu] endt[ry] exi[t] fina[lly] fix[del] foldd[oopen] go[to] hid[e] ij[ump] isp[lit] k laddb[uffer] la[st] lch[dir] lex[pr] lgete[xpr] l[ist] lmak[e] lN[ext] loc[kmarks] lpf[ile] lt[ag] lv[imgrep] ma[rk] mk[exrc] mkv[imrc] mz[scheme] new noh[lsearch] on[ly] ped[it] popu prev[ious] prof[ile] pta[g] ptn[ext] pts[elect] py[thon] r[ead] redr[aw] ret[ab] rightb[elow] rundo san[dbox] sbf[irst] sbN[ext] scripte[ncoding] setg[lobal] sh[ell] sla[st] sme sni[ff] sor[t] spelli[nfo] sp[lit] startg[replace] st[op] sunme syncbind tabd[o] tabl[ast] tabN[ext] tabs tcld[o] th[row] tm[enu] tp[revious] tu undoj[oin] uns[ilent] vert[ical] vi[sual] wa[ll] winp[os] wp[revious] ws[verb] xa[ll] xmenu xnoremenu -syn keyword vimCommand contained abo[veleft] arge[dit] as[cii] bf[irst] bo[tright] breakl[ist] buffers cad[dexpr] cc cf[ile] c[hange] cla[st] cn[ext] colo[rscheme] cope[n] cr[ewind] d[elete] diffpatch dig[raphs] ds[earch] echon emenu* endw[hile] f[ile] fin[d] fo[ld] foldo[pen] gr[ep] his[tory] il[ist] iuna[bbrev] keepalt lad[dexpr] later lcl[ose] lf[ile] lg[etfile] ll lmapc[lear] lnf[ile] lockv[ar] lp[revious] lua lvimgrepa[dd] marks mks[ession] mod[e] nbc[lose] n[ext] nu[mber] o[pen] pe[rl] popu[p] p[rint] promptf[ind] ptf[irst] ptN[ext] pu[t] qa[ll] rec[over] redraws[tatus] retu[rn] rub[y] ru[ntime] sa[rgument] sbl[ast] sbp[revious] scrip[tnames] setl[ocal] sign sl[eep] smenu sno[magic] so[urce] spellr[epall] spr[evious] star[tinsert] stopi[nsert] sunmenu t tabe[dit] tabm[ove] tabo[nly] ta[g] tclf[ile] tj[ump] tn[ext] tr[ewind] tu[nmenu] undol[ist] up[date] vie[w] vmapc[lear] wh[ile] win[size] wq wundo x[it] XMLent xunme -syn keyword vimCommand contained al[l] argg[lobal] bad[d] bl[ast] bp[revious] br[ewind] bun[load] caddf[ile] ccl[ose] cfir[st] changes cl[ist] cN[ext] comc[lear] co[py] cuna[bbrev] delf[unction] diffpu[t] di[splay] dsp[lit] e[dit] endfo[r] ene[w] files fini[sh] foldc[lose] for grepa[dd] iabc[lear] imapc[lear] j[oin] keepj[umps] laddf[ile] lb[uffer] le[ft] lfir[st] lgr[ep] lla[st] lnew[er] lNf[ile] lol[der] lr[ewind] luado lw[indow] mat[ch] mksp[ell] m[ove] nb[key] N[ext] ol[dfiles] opt[ions] perld[o] pp[op] P[rint] promptr[epl] ptj[ump] ptp[revious] pw[d] q[uit] redi[r] reg[isters] rew[ind] rubyd[o] rv[iminfo] sav[eas] sbm[odified] sbr[ewind] se[t] sf[ind] sil[ent] sm[agic] sn[ext] snoreme spelld[ump] spellu[ndo] sre[wind] startr[eplace] sts[elect] sus[pend] tab tabf[ind] tabnew tabp[revious] tags te[aroff] tl[ast] tN[ext] try una[bbreviate] unh[ide] verb[ose] vim[grep] vne[w] winc[md] wn[ext] wqa[ll] wv[iminfo] xmapc[lear] XMLns xunmenu -syn keyword vimCommand contained arga[dd] argl[ocal] ba[ll] bm[odified] brea[k] bro[wse] bw[ipeout] cal[l] cd cgetb[uffer] chd[ir] clo[se] cnf[ile] comp[iler] cpf[ile] cw[indow] delm[arks] diffsplit dj[ump] earlier el[se] endf[unction] ex filetype fir[st] folddoc[losed] fu[nction] ha[rdcopy] if is[earch] ju[mps] kee[pmarks] lan[guage] lc[d] lefta[bove] lgetb[uffer] lgrepa[dd] lli[st] lne[xt] lo[adview] lop[en] ls luafile mak[e] menut[ranslate] mkvie[w] mzf[ile] nbs[tart] nmapc[lear] omapc[lear] pc[lose] po[p] pre[serve] profd[el] ps[earch] ptl[ast] ptr[ewind] pyf[ile] quita[ll] red[o] res[ize] ri[ght] rubyf[ile] sal[l] sba[ll] sbn[ext] sb[uffer] setf[iletype] sfir[st] sim[alt] sm[ap] sN[ext] snoremenu spe[llgood] spellw[rong] sta[g] stj[ump] sun[hide] sv[iew] tabc[lose] tabfir[st] tabn[ext] tabr[ewind] tc[l] tf[irst] tm to[pleft] ts[elect] u[ndo] unlo[ckvar] ve[rsion] vimgrepa[dd] vs[plit] windo wN[ext] w[rite] X xme xnoreme y[ank] -syn keyword vimCommand contained argd[elete] ar[gs] bd[elete] bn[ext] breaka[dd] bufdo cabc[lear] cat[ch] ce[nter] cgete[xpr] che[ckpath] cmapc[lear] cNf[ile] conf[irm] cp[revious] debugg[reedy] diffg[et] diffthis dl[ist] echoe[rr] elsei[f] en[dif] -syn match vimCommand contained "\<z[-+^.=]" +syn keyword vimCommand contained a arga[dd] argu[ment] bd[elete] bN[ext] breakd[el] buf c cal[l] ce[nter] cg[etfile] cl cn cNf comc[lear] cope[n] cr[ewind] d d[elete] diffo diffsplit di[splay] ds[earch] ec e:e:e en endt[ry] exu[sage] filetype fix[del] for go[to] h hi if intro k la lan[guage] lch[dir] let@ lg[etfile] lla[st] lnew[er] lNf[ile] loc[kmarks] lr[ewind] lv[imgrep] ma[rk] messages mkv mv n new noautocmd on[ly] p:~ perld[o] popu[p] p[rint] promptr[epl] ptl[ast] ptr[ewind] py3file q[uit] r[ead] redraws[tatus] ret[ab] r:r:r ru[ntime] sba[ll] sbp[revious] scs sf[ind] sil[ent] sm[ap] sno[magic] so[urce] spellr[epall] st startr[eplace] sunme sw[apname] t tabf[ind] tabn[ext] ta[g] tf[irst] tn tp[revious] tu undoj[oin] up[date] vi vmapc[lear] win wN[ext] wundo xmapc[lear] xnoremenu +syn keyword vimCommand contained ab argd[elete] as[cii] bel[owright] bo[tright] breakl[ist] bufdo cabc[lear] cat[ch] cex[pr] c[hange] cla[st] cN cnf[ile] comment co[py] cs de delf diffoff difft dj[ump] dsp[lit] echoe[rr] e:e:r endf endw[hile] f fin fo[ld] fu gr[ep] ha[rdcopy] hid[e] ij[ump] is[earch] keepa lad la[st] lcl[ose] lex[pr] lgr[ep] lli[st] lne[xt] lo lockv[ar] ls lvimgrepa[dd] marks mk mkvie[w] Mycmd N n[ext] noh[lsearch] o[pen] P p:gs? pp[op] P[rint] ps[earch] ptn pts[elect] pyf[ile] quita[ll] rec[over] reg[isters] retu[rn] ru rv[iminfo] sbf[irst] sbr[ewind] scscope sfir[st] sim[alt] sme snoreme s?pat?sub? spellu[ndo] sta[g] stj[ump] sunmenu sy ta tabfir[st] tabN[ext] tags th[row] tN tr tu[nmenu] undol[ist] v vie[w] vne[w] winc[md] wp[revious] wv[iminfo] xme xterm +syn keyword vimCommand contained abc[lear] argdo au bf[irst] bp[revious] br[ewind] b[uffer] cad cb[uffer] cf[ile] changes cl[ist] cnew[er] cNf[ile] comp[iler] count cscope debug delf[unction] DiffOrig diffthis dl[ist] dwim echom[sg] el[se] endfo[r] ene[w] f[ile] fina[lly] foldc[lose] fun grepa[dd] h[elp] his[tory] il[ist] isp[lit] keepalt laddb[uffer] lat lcs lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lol[der] lt[ag] lw[indow] mat[ch] mkdir mkv[imrc] MyCommand nbc[lose] N[ext] nu[mber] opt[ions] pc[lose] p:h pr pro p:t ptN pu[t] py[thon] quote red Ren rew[ind] rub[y] sal[l] sbl[ast] sb[uffer] se[t] sh[ell] sl smenu snoremenu spe spellw[rong] star st[op] sus[pend] syn tab tabl[ast] tabo[nly] tc[l] tj[ump] tn[ext] t:r u unh[ide] ve vim[grep] vs[plit] windo wq x xmenu xunme +syn keyword vimCommand contained abo[veleft] arge[dit] bad[d] bl[ast] br bro[wse] buffers caddb[uffer] cc cfir[st] chd[ir] clo[se] cn[ext] col[der] con cpf[ile] cstag debugg[reedy] delm[arks] diffp diffu[pdate] do e echon elsei[f] endfun Error filename fin[d] folddoc[losed] fu[nction] gs?pat?sub? helpf[ind] i imapc[lear] iuna[bbrev] keepj[umps] lad[dexpr] later lcscope lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lop[en] lua ma menut mk[exrc] mo mz nb[key] nkf o ownsyntax pe p:h:h p:r profd[el] pta[g] ptn[ext] pw[d] python3 r redi[r] Rena ri[ght] rubyd[o] san[dbox] sbm[odified] scrip setf[iletype] si sla[st] sn[ext] s@\n@\=\r" spelld[ump] sp[lit] start stopi[nsert] s?version?main? sync tabc[lose] tabm[ove] tabp[revious] tcld[o] tl[ast] tN[ext] tr[ewind] un unl verb[ose] vimgrepa[dd] w winp[os] wqa[ll] X XMLent xunmenu +syn keyword vimCommand contained al[l] argg[lobal] ba[ll] bm[odified] brea[k] browseset bun[load] cad[dexpr] ccl[ose] cgetb[uffer] che[ckpath] cmapc[lear] cN[ext] colo[rscheme] conf[irm] cp[revious] cuna[bbrev] del di diffpatch dig doau ea e[dit] em[enu] endf[unction] ex files fini[sh] foldd[oopen] g gui helpg[rep] ia in j[oin] kee[pmarks] laddf[ile] lb[uffer] le[ft] lgetb[uffer] l[ist] lN lNf lo[adview] lpf[ile] luado mak[e] menut[ranslate] mks[ession] mod[e] mzf[ile] nbs[tart] nmapc[lear] ol[dfiles] p ped[it] po[p] pre[serve] prof[ile] ptf[irst] ptN[ext] py q re red[o] Renu rightb[elow] rubyf[ile] sa[rgument] sbn[ext] scripte[ncoding] setg[lobal] sig sl[eep] sN[ext] so spe[llgood] spr[evious] startg[replace] sts[elect] s?version?main?:p syncbind tabd[o] tabN tabr[ewind] tclf[ile] tm TOhtml try una[bbreviate] unlo[ckvar] ve[rsion] vi[sual] wa[ll] win[size] w[rite] xa[ll] XMLns xwininfo +syn keyword vimCommand contained Allargs argl[ocal] bar bn[ext] breaka[dd] bu bw[ipeout] caddf[ile] cd cgete[xpr] checkt[ime] cmdname cnf com con[tinue] cq[uit] cw[indow] delc[ommand] diffg[et] diffpu[t] dig[raphs] dr[op] earlier e:e emenu* en[dif] exi[t] filet fir[st] foldo[pen] get gvim helpt[ags] iabc[lear] index ju[mps] l lan lc[d] lefta[bove] lgete[xpr] ll lne lnf[ile] locale lp[revious] luafile Man mes mksp[ell] m[ove] mz[scheme] ne noa omapc[lear] p: pe[rl] popu prev[ious] promptf[ind] ptj[ump] ptp[revious] py3 qa[ll] r:e redr[aw] res[ize] r:r rundo sav[eas] sbN[ext] scrip[tnames] setl[ocal] sign sm[agic] sni[ff] sor[t] spelli[nfo] sre[wind] star[tinsert] sun[hide] sv[iew] synlist tabe[dit] tabnew tabs te[aroff] tm[enu] to[pleft] ts[elect] u[ndo] uns[ilent] vert[ical] viu[sage] wh[ile] wn[ext] ws[verb] x[it] xnoreme y[ank] +syn keyword vimCommand contained ar ar[gs] +syn match vimCommand contained "\<z[-+^.=]\=" " vimOptions are caught only when contained in a vimSet {{{2 syn keyword vimOption contained acd ambiwidth arabicshape autowriteall backupdir bdlay binary breakat bufhidden cd ci cinw co commentstring confirm cpoptions cscopetag csto cwh dg dip eadirection ek equalprg ex fdi fen fileencodings flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imi incsearch infercase isk keymap langmenu linespace loadplugins macatsui maxcombine mef mls modelines mousehide mp nu omnifunc paragraphs penc pm printdevice printoptions quoteescape restorescreen rnu rulerformat scr sect sft shellredir shm showmode sj smd spell splitbelow ssl stl sw sxq tabpagemax tags tbis terse thesaurus titleold toolbariconsize tsr ttyfast tx undofile ut verbosefile virtualedit wb wfw wildcharm winaltkeys winminwidth wmnu write @@ -318,7 +320,7 @@ syn case match " ==== syn match vimMap "\<map\>!\=\ze\s*[^(]" skipwhite nextgroup=vimMapMod,vimMapLhs syn keyword vimMap cm[ap] cno[remap] im[ap] ino[remap] lm[ap] ln[oremap] nm[ap] nn[oremap] no[remap] om[ap] ono[remap] smap snor[emap] vm[ap] vn[oremap] xm[ap] xn[oremap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs -syn keyword vimMap mapc[lear] +syn keyword vimMap mapc[lear] smapc[lear] syn keyword vimUnmap cu[nmap] iu[nmap] lu[nmap] nun[map] ou[nmap] sunm[ap] unm[ap] unm[ap] vu[nmap] xu[nmap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs syn match vimMapLhs contained "\S\+" contains=vimNotation,vimCtrlChar skipwhite nextgroup=vimMapRhs syn match vimMapBang contained "!" skipwhite nextgroup=vimMapMod,vimMapLhs @@ -552,7 +554,7 @@ let s:luapath= expand("<sfile>:p:h")."/lua.vim" if !filereadable(s:luapath) let s:luapath= globpath(&rtp,"syntax/lua.vim") endif -if (g:vimsyn_embed =~ 'p' && has("lua")) && filereadable(s:luapath) +if (g:vimsyn_embed =~ 'l' && has("lua")) && filereadable(s:luapath) unlet! b:current_syntax exe "syn include @vimLuaScript ".s:luapath if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'l' diff --git a/runtime/syntax/yacc.vim b/runtime/syntax/yacc.vim index c3916d0e5..4e74eabd8 100644 --- a/runtime/syntax/yacc.vim +++ b/runtime/syntax/yacc.vim @@ -1,12 +1,22 @@ " Vim syntax file " Language: Yacc " Maintainer: Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> -" Last Change: Aug 2, 2010 -" Version: 8 +" Last Change: Aug 12, 2010 +" Version: 9 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax " " Options: {{{1 " g:yacc_uses_cpp : if this variable exists, then C++ is loaded rather than C +" +" Overall layout of a bison/yacc grammer: +" %{ +" Prolog +" %} +" Bison/Yacc Declarations +" %% +" Grammar Rules +" %% +" Epilogue " --------------------------------------------------------------------- " this version of syntax/yacc.vim requires 6.0 or later @@ -35,7 +45,7 @@ endif " --------------------------------------------------------------------- " Yacc Clusters: {{{1 -syn cluster yaccInitCluster contains=yaccKey,yaccKeyActn,yaccBrkt,yaccType,yaccString,yaccUnionStart,yaccHeader2,yaccComment,yaccDefines,yaccParseParam +syn cluster yaccInitCluster contains=yaccKey,yaccKeyActn,yaccBrkt,yaccType,yaccString,yaccUnionStart,yaccHeader2,yaccComment,yaccDefines,yaccParseParam,yaccParseOption syn cluster yaccRulesCluster contains=yaccNonterminal,yaccString " --------------------------------------------------------------------- @@ -50,7 +60,8 @@ HiFold syn region yaccEndCode matchgroup=yaccSectionSep start='^%%$' end='\%$' " --------------------------------------------------------------------- " Yacc Commands: {{{1 syn match yaccDefines '^%define\s\+.*$' -syn match yaccParseParam '%parse-param\>' skipwhite nextgroup=yaccParseParamStr +syn match yaccParseParam '%\(parse\|lex\)-param\>' skipwhite nextgroup=yaccParseParamStr +syn match yaccParseOption '%\%(api\.pure\|pure-parser\|locations\|error-verbose\)\>' syn region yaccParseParamStr contained matchgroup=Delimiter start='{' end='}' contains=cStructure syn match yaccDelim "[:|]" contained @@ -96,7 +107,8 @@ if !exists("did_yacc_syn_inits") HiLink yaccCurly Delimiter HiLink yaccCurlyError Error HiLink yaccDefines cDefine - HiLink yaccParseParam cDefine + HiLink yaccParseParam yaccParseOption + HiLink yaccParseOption cDefine HiLink yaccNonterminal Function HiLink yaccDelim Delimiter HiLink yaccKeyActn Special |