mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
vim-patch:ce001a337e28 (#18287)
Update runtime files
ce001a337e
also add `vimStdPlugin` keywords missing from previous updates
This commit is contained in:
parent
ee85d8d756
commit
521e91e1c4
@ -141,6 +141,7 @@ variables can be used to overrule the filetype used for certain extensions:
|
||||
*.asp g:filetype_asp |ft-aspvbs-syntax| |ft-aspperl-syntax|
|
||||
*.bas g:filetype_bas |ft-basic-syntax|
|
||||
*.cfg g:filetype_cfg
|
||||
*.csh g:filetype_csh |ft-csh-syntax|
|
||||
*.dat g:filetype_dat
|
||||
*.frm g:filetype_frm |ft-form-syntax|
|
||||
*.fs g:filetype_fs |ft-forth-syntax|
|
||||
@ -152,6 +153,8 @@ variables can be used to overrule the filetype used for certain extensions:
|
||||
*.pl g:filetype_pl
|
||||
*.pp g:filetype_pp |ft-pascal-syntax|
|
||||
*.prg g:filetype_prg
|
||||
*.r g:filetype_r
|
||||
*.sql g:filetype_sql |ft-sql-syntax|
|
||||
*.src g:filetype_src
|
||||
*.sys g:filetype_sys
|
||||
*.sh g:bash_is_sh |ft-sh-syntax|
|
||||
|
@ -2163,6 +2163,15 @@ $VIMRUNTIME/syntax/syntax.vim).
|
||||
mv_finance mv_logic mv_powseries
|
||||
|
||||
|
||||
MARKDOWN *ft-markdown-syntax*
|
||||
|
||||
If you have long regions there might be wrong highlighting. At the cost of
|
||||
slowing down displaying, you can have the engine look further back to sync on
|
||||
the start of a region, for example 500 lines: >
|
||||
|
||||
:let g:markdown_minlines = 500
|
||||
|
||||
|
||||
MATHEMATICA *mma.vim* *ft-mma-syntax* *ft-mathematica-syntax*
|
||||
|
||||
Empty *.m files will automatically be presumed to be Matlab files unless you
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Apr 13
|
||||
" Last Change: 2022 Apr 25
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
|
11
runtime/ftplugin/elixir.vim
Normal file
11
runtime/ftplugin/elixir.vim
Normal file
@ -0,0 +1,11 @@
|
||||
" Elixir filetype plugin
|
||||
" Language: Elixir
|
||||
" Maintainer: Mitchell Hanberg <vimNOSPAM@mitchellhanberg.com>
|
||||
" Last Change: 2022 Apr 20
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal commentstring=#\ %s
|
@ -1,7 +1,7 @@
|
||||
" Elm filetype plugin file
|
||||
" Language: Elm
|
||||
" Maintainer: Andreas Scharf <as@99n.de>
|
||||
" Latest Revision: 2020-05-29
|
||||
" Latest Revision: 2022-04-25
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@ -14,5 +14,7 @@ set cpo&vim
|
||||
setlocal comments=s1fl:{-,mb:\ ,ex:-},:--
|
||||
setlocal commentstring=--\ %s
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms<"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
18
runtime/ftplugin/fennel.vim
Normal file
18
runtime/ftplugin/fennel.vim
Normal file
@ -0,0 +1,18 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Fennel
|
||||
" Maintainer: Gregory Anders <greg[NOSPAM]@gpanders.com>
|
||||
" Last Update: 2022 Apr 20
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal commentstring=;%s
|
||||
setlocal comments=:;;,:;
|
||||
setlocal formatoptions-=t
|
||||
setlocal suffixesadd=.fnl
|
||||
setlocal lisp
|
||||
setlocal lispwords=accumulate,collect,do,doto,each,eval-compiler,fn,for,icollect,lambda,let,macro,macros,match,match-try,when,while,with-open
|
||||
|
||||
let b:undo_ftplugin = 'setlocal commentstring< comments< formatoptions< suffixesadd< lisp< lispwords<'
|
@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Microsoft Macro Assembler (80x86)
|
||||
" Maintainer: Wu Yongwei <wuyongwei@gmail.com>
|
||||
" Last Change: 2020-05-09 23:02:05 +0800
|
||||
" Last Change: 2022-04-24 21:24:52 +0800
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@ -15,5 +15,18 @@ let b:undo_ftplugin = "setl iskeyword<"
|
||||
|
||||
setlocal iskeyword=@,48-57,_,36,60,62,63,@-@
|
||||
|
||||
" Matchit support
|
||||
if !exists('b:match_words')
|
||||
let b:match_words = '^\s*\.IF\>:^\s*\.ELSEIF\>:^\s*\.ELSE\>:^\s*\.ENDIF\>,'
|
||||
\ .. '^\s*\.REPEAT\>:^\s*\.UNTIL\(CXZ\)\?\>,'
|
||||
\ .. '^\s*\.WHILE\>:^\s*\.ENDW\>,'
|
||||
\ .. '^\s*IF\(1\|2\|E\|DEF\|NDEF\|B\|NB\|IDNI\?\|DIFI\?\)\?\>:^\s*ELSEIF\(1\|2\|E\|DEF\|NDEF\|B\|NB\|IDNI\?\|DIFI\?\)\?\>:^\s*ELSE\>:^\s*ENDIF\>,'
|
||||
\ .. '\(\<MACRO\>\|^\s*%\?\s*FORC\?\>\|^\s*REPEAT\>\|^\s*WHILE\):^\s*ENDM\>,'
|
||||
\ .. '\<PROC\>:\<ENDP\>,'
|
||||
\ .. '\<SEGMENT\>:\<ENDS\>'
|
||||
let b:match_ignorecase = 1
|
||||
let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words"
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim ftplugin file
|
||||
" Language: Reva Forth
|
||||
" Version: 7.1
|
||||
" Last Change: 2008/01/11
|
||||
" Last Change: 2022 Apr 27
|
||||
" Maintainer: Ron Aaron <ron@ronware.org>
|
||||
" URL: http://ronware.org/reva/
|
||||
" Filetypes: *.rf *.frt
|
||||
@ -23,3 +23,5 @@ setlocal com=s1:/*,mb:*,ex:*/,:\|,:\\
|
||||
setlocal fo=tcrqol
|
||||
setlocal matchpairs+=\::;
|
||||
setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255
|
||||
|
||||
let b:undo_ftplugin = "setlocal sts< sw< com< fo< mps< isk<"
|
||||
|
@ -1,18 +1,18 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: xslt
|
||||
"
|
||||
" This runtime file is looking for a new maintainer.
|
||||
"
|
||||
" Former maintainer: Dan Sharp
|
||||
" Last Changed: 20 Jan 2009
|
||||
" Language: XSLT
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Previous Maintainer: Dan Sharp
|
||||
" Last Change: 2022 Apr 25
|
||||
|
||||
if exists("b:did_ftplugin") | finish | endif
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim
|
||||
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
" Change the :browse e filter to primarily show xsd-related files.
|
||||
if has("gui_win32") && exists("b:browsefilter")
|
||||
let b:browsefilter="XSLT Files (*.xsl,*.xslt)\t*.xsl;*.xslt\n" . b:browsefilter
|
||||
if (has("gui_win32") || has("gui_gtk")) && exists("b:browsefilter")
|
||||
let b:browsefilter = "XSLT Files (*.xsl,*.xslt)\t*.xsl;*.xslt\n" . b:browsefilter
|
||||
endif
|
||||
|
12
runtime/indent/fennel.vim
Normal file
12
runtime/indent/fennel.vim
Normal file
@ -0,0 +1,12 @@
|
||||
" Vim indent file
|
||||
" Language: Fennel
|
||||
" Maintainer: Gregory Anders <greg[NOSPAM]@gpanders.com>
|
||||
" Last Change: 2022 Apr 20
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Use the Lisp indenting
|
||||
runtime! indent/lisp.vim
|
@ -2,6 +2,7 @@
|
||||
" Language: PoV-Ray Scene Description Language
|
||||
" Maintainer: David Necas (Yeti) <yeti@physics.muni.cz>
|
||||
" Last Change: 2017 Jun 13
|
||||
" 2022 April: b:undo_indent added by Doug Kearns
|
||||
" URI: http://trific.ath.cx/Ftp/vim/indent/pov.vim
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
@ -16,6 +17,8 @@ setlocal nolisp " Make sure lisp indenting doesn't supersede us.
|
||||
setlocal indentexpr=GetPoVRayIndent()
|
||||
setlocal indentkeys+==else,=end,0]
|
||||
|
||||
let b:undo_indent = "setl inde< indk< lisp<"
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetPoVRayIndent")
|
||||
finish
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Language: tf (TinyFugue)
|
||||
" Maintainer: Christian J. Robinson <heptite@gmail.com>
|
||||
" URL: http://www.vim.org/scripts/script.php?script_id=174
|
||||
" Last Change: 2017 Feb 25
|
||||
" Last Change: 2022 Apr 25
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@ -14,6 +14,8 @@ setlocal indentexpr=GetTFIndent()
|
||||
setlocal indentkeys-=0{,0} indentkeys-=0# indentkeys-=:
|
||||
setlocal indentkeys+==/endif,=/then,=/else,=/done,0;
|
||||
|
||||
let b:undo_indent = "setlocal indentexpr< indentkeys<"
|
||||
|
||||
" Only define the function once:
|
||||
if exists("*GetTFIndent")
|
||||
finish
|
||||
|
@ -1,7 +1,8 @@
|
||||
"Description: Indent scheme for the tilde weblanguage
|
||||
"Author: Tobias Rundström <tobi@tobi.nu>
|
||||
"Author: Tobias Rundström <tobi@tobi.nu> (Invalid email address)
|
||||
"URL: http://tilde.tildesoftware.net
|
||||
"Last Change: May 8 09:15:09 CEST 2002
|
||||
" 2022 April: b:undo_indent added by Doug Kearns
|
||||
|
||||
if exists ("b:did_indent")
|
||||
finish
|
||||
@ -13,6 +14,8 @@ setlocal autoindent
|
||||
setlocal indentexpr=GetTildeIndent(v:lnum)
|
||||
setlocal indentkeys=o,O,)
|
||||
|
||||
let b:undo_indent = "setl ai< inde< indk<"
|
||||
|
||||
if exists("*GetTildeIndent")
|
||||
finish
|
||||
endif
|
||||
|
@ -1,7 +1,8 @@
|
||||
" Vim indent file
|
||||
" Language: Treetop
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2011-03-14
|
||||
" Language: Treetop
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Last Change: 2022 April 25
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
@ -12,6 +13,8 @@ setlocal indentexpr=GetTreetopIndent()
|
||||
setlocal indentkeys=0{,0},!^F,o,O,=end
|
||||
setlocal nosmartindent
|
||||
|
||||
let b:undo_indent = "setl inde< indk< si<"
|
||||
|
||||
if exists("*GetTreetopIndent")
|
||||
finish
|
||||
endif
|
||||
|
@ -1,7 +1,8 @@
|
||||
" Vim indent file
|
||||
" Language: XFree86 Configuration File
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2006-12-20
|
||||
" Language: XFree86 Configuration File
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Last Change: 2022 April 25
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
@ -12,6 +13,8 @@ setlocal indentexpr=GetXF86ConfIndent()
|
||||
setlocal indentkeys=!^F,o,O,=End
|
||||
setlocal nosmartindent
|
||||
|
||||
let b:undo_indent = "setl inde< indk< si<"
|
||||
|
||||
if exists("*GetXF86ConfIndent")
|
||||
finish
|
||||
endif
|
||||
|
@ -1,7 +1,8 @@
|
||||
" Vim indent file
|
||||
" Language: xinetd.conf(5) configuration file
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2006-12-20
|
||||
" Language: xinetd.conf(5) configuration file
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Last Change: 2022 April 25
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
@ -12,6 +13,8 @@ setlocal indentexpr=GetXinetdIndent()
|
||||
setlocal indentkeys=0{,0},!^F,o,O
|
||||
setlocal nosmartindent
|
||||
|
||||
let b:undo_indent = "setl inde< indk< si<"
|
||||
|
||||
if exists("*GetXinetdIndent")
|
||||
finish
|
||||
endif
|
||||
|
@ -1,7 +1,8 @@
|
||||
" Vim indent file
|
||||
" Language: YACC input file
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2006-12-20
|
||||
" Language: YACC input file
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Last Change: 2022 April 25
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@ -14,6 +15,8 @@ setlocal indentexpr=GetYaccIndent()
|
||||
setlocal indentkeys=!^F,o,O
|
||||
setlocal nosmartindent
|
||||
|
||||
let b:undo_indent = "setl inde< indk< si<"
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetYaccIndent")
|
||||
finish
|
||||
|
@ -3,7 +3,7 @@
|
||||
" Maintainer: David Necas (Yeti) <yeti@physics.muni.cz>
|
||||
" License: This file can be redistribued and/or modified under the same terms
|
||||
" as Vim itself.
|
||||
" Last Change: 2020 Oct 07
|
||||
" Last Change: 2022 Apr 25
|
||||
" Notes: Last synced with apache-2.2.3, version 1.x is no longer supported
|
||||
" TODO: see particular FIXME's scattered through the file
|
||||
" make it really linewise?
|
||||
@ -46,6 +46,7 @@ syn keyword apacheMethodOption GET POST PUT DELETE CONNECT OPTIONS TRACE PATCH P
|
||||
syn keyword apacheMethodOption BASELINE-CONTROL CHECKIN CHECKOUT LABEL MERGE MKACTIVITY MKWORKSPACE REPORT UNCHECKOUT UPDATE VERSION-CONTROL contained
|
||||
syn case ignore
|
||||
syn match apacheSection "<\/\=\(Directory\|DirectoryMatch\|Files\|FilesMatch\|IfModule\|IfDefine\|Location\|LocationMatch\|VirtualHost\)[^>]*>" contains=apacheAnything
|
||||
syn match apacheSection "<\/\=\(RequireAll\|RequireAny\|RequireNone\)>" contains=apacheAnything
|
||||
syn match apacheLimitSection "<\/\=\(Limit\|LimitExcept\)[^>]*>" contains=apacheLimitSectionKeyword,apacheMethodOption,apacheError
|
||||
syn keyword apacheLimitSectionKeyword Limit LimitExcept contained
|
||||
syn match apacheAuthType "AuthType\s.*$" contains=apacheAuthTypeValue
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Mar 17
|
||||
" Last Change: 2022 Apr 24
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@ -11,7 +11,7 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let s:ft = matchstr(&ft, '^\([^.]\)\+')
|
||||
let s:ft = matchstr(&ft, '^\%([^.]\)\+')
|
||||
|
||||
" check if this was included from cpp.vim
|
||||
let s:in_cpp_family = exists("b:filetype_in_cpp_family")
|
||||
@ -42,17 +42,17 @@ syn cluster cCommentGroup contains=cTodo,cBadContinuation
|
||||
|
||||
" String and Character constants
|
||||
" Highlight special characters (those which have a backslash) differently
|
||||
syn match cSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)"
|
||||
syn match cSpecial display contained "\\\%(x\x\+\|\o\{1,3}\|.\|$\)"
|
||||
if !exists("c_no_utf")
|
||||
syn match cSpecial display contained "\\\(u\x\{4}\|U\x\{8}\)"
|
||||
syn match cSpecial display contained "\\\%(u\x\{4}\|U\x\{8}\)"
|
||||
endif
|
||||
|
||||
if !exists("c_no_cformat")
|
||||
" Highlight % items in strings.
|
||||
if !exists("c_no_c99") " ISO C99
|
||||
syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlLjzt]\|ll\|hh\)\=\([aAbdiuoxXDOUfFeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
|
||||
syn match cFormat display "%\%(\d\+\$\)\=[-+' #0*]*\%(\d*\|\*\|\*\d\+\$\)\%(\.\%(\d*\|\*\|\*\d\+\$\)\)\=\%([hlLjzt]\|ll\|hh\)\=\%([aAbdiuoxXDOUfFeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
|
||||
else
|
||||
syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([bdiuoxXDOUfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
|
||||
syn match cFormat display "%\%(\d\+\$\)\=[-+' #0*]*\%(\d*\|\*\|\*\d\+\$\)\%(\.\%(\d*\|\*\|\*\d\+\$\)\)\=\%([hlL]\|ll\)\=\%([bdiuoxXDOUfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
|
||||
endif
|
||||
syn match cFormat display "%%" contained
|
||||
endif
|
||||
@ -60,8 +60,8 @@ endif
|
||||
" cCppString: same as cString, but ends at end of line
|
||||
if s:in_cpp_family && !exists("cpp_no_cpp11") && !exists("c_no_cformat")
|
||||
" ISO C++11
|
||||
syn region cString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
|
||||
syn region cCppString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
|
||||
syn region cString start=+\%(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
|
||||
syn region cCppString start=+\%(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
|
||||
elseif s:ft ==# "c" && !exists("c_no_c11") && !exists("c_no_cformat")
|
||||
" ISO C99
|
||||
syn region cString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
|
||||
@ -73,7 +73,7 @@ else
|
||||
syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
|
||||
endif
|
||||
|
||||
syn region cCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppSkip
|
||||
syn region cCppSkip contained start="^\s*\%(%:\|#\)\s*\%(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\%(%:\|#\)\s*endif\>" contains=cSpaceError,cCppSkip
|
||||
|
||||
syn cluster cStringGroup contains=cCppString,cCppSkip
|
||||
|
||||
@ -190,16 +190,16 @@ syn case ignore
|
||||
syn match cNumbers display transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctalError,cOctal
|
||||
" Same, but without octal error (for comments)
|
||||
syn match cNumbersCom display contained transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctal
|
||||
syn match cNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
syn match cNumber display contained "\d\+\%(u\=l\{0,2}\|ll\=u\)\>"
|
||||
"hex number
|
||||
syn match cNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
syn match cNumber display contained "0x\x\+\%(u\=l\{0,2}\|ll\=u\)\>"
|
||||
" Flag the first zero of an octal number as something special
|
||||
syn match cOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero
|
||||
syn match cOctal display contained "0\o\+\%(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero
|
||||
syn match cOctalZero display contained "\<0"
|
||||
"floating point number, with dot, optional exponent
|
||||
syn match cFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\="
|
||||
syn match cFloat display contained "\d\+\.\d*\%(e[-+]\=\d\+\)\=[fl]\="
|
||||
"floating point number, starting with a dot, optional exponent
|
||||
syn match cFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
|
||||
syn match cFloat display contained "\.\d\+\%(e[-+]\=\d\+\)\=[fl]\=\>"
|
||||
"floating point number, without dot, with exponent
|
||||
syn match cFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>"
|
||||
if !exists("c_no_c99")
|
||||
@ -219,7 +219,7 @@ if exists("c_comment_strings")
|
||||
" need to use a special type of cString: cCommentString, which also ends on
|
||||
" "*/", and sees a "*" at the start of the line as comment again.
|
||||
" Unfortunately this doesn't very well work for // type of comments :-(
|
||||
syn match cCommentSkip contained "^\s*\*\($\|\s\+\)"
|
||||
syn match cCommentSkip contained "^\s*\*\%($\|\s\+\)"
|
||||
syn region cCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=cSpecial,cCommentSkip
|
||||
syn region cComment2String contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=cSpecial
|
||||
syn region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cComment2String,cCharacter,cNumbersCom,cSpaceError,cWrongComTail,@Spell
|
||||
@ -376,36 +376,36 @@ if !exists("c_no_c99") " ISO C99
|
||||
endif
|
||||
|
||||
" Accept %: for # (C99)
|
||||
syn region cPreCondit start="^\s*\zs\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError
|
||||
syn match cPreConditMatch display "^\s*\zs\(%:\|#\)\s*\(else\|endif\)\>"
|
||||
syn region cPreCondit start="^\s*\zs\%(%:\|#\)\s*\%(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError
|
||||
syn match cPreConditMatch display "^\s*\zs\%(%:\|#\)\s*\%(else\|endif\)\>"
|
||||
if !exists("c_no_if0")
|
||||
syn cluster cCppOutInGroup contains=cCppInIf,cCppInElse,cCppInElse2,cCppOutIf,cCppOutIf2,cCppOutElse,cCppInSkip,cCppOutSkip
|
||||
syn region cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold
|
||||
syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse
|
||||
syn region cCppOutWrapper start="^\s*\zs\%(%:\|#\)\s*if\s\+0\+\s*\%($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold
|
||||
syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\%(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse
|
||||
if !exists("c_no_if0_fold")
|
||||
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold
|
||||
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0\+\s*\%($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold
|
||||
else
|
||||
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
|
||||
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0\+\s*\%($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
|
||||
endif
|
||||
syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
|
||||
syn region cCppInWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold
|
||||
syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit
|
||||
syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\%(%:\|#\)\s*\%(else\|elif\)" end="^\s*\%(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
|
||||
syn region cCppInWrapper start="^\s*\zs\%(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\%($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold
|
||||
syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\%(%:\|#\)\s*endif\>" contains=TOP,cPreCondit
|
||||
if !exists("c_no_if0_fold")
|
||||
syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold
|
||||
syn region cCppInElse contained start="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0*[1-9]\d*\s*\%($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold
|
||||
else
|
||||
syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
|
||||
syn region cCppInElse contained start="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0*[1-9]\d*\s*\%($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
|
||||
endif
|
||||
syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
|
||||
syn region cCppOutSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip
|
||||
syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc
|
||||
syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\%(%:\|#\)\s*\%(else\|elif\)\%([^/]\|/[^/*]\)*" end="^\s*\%(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
|
||||
syn region cCppOutSkip contained start="^\s*\%(%:\|#\)\s*\%(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\%(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip
|
||||
syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\%(%:\|#\)\s*\%(if\s\+\%(\d\+\s*\%($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\%(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc
|
||||
endif
|
||||
syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||
syn match cIncluded display contained "<[^>]*>"
|
||||
syn match cInclude display "^\s*\zs\(%:\|#\)\s*include\>\s*["<]" contains=cIncluded
|
||||
syn match cInclude display "^\s*\zs\%(%:\|#\)\s*include\>\s*["<]" contains=cIncluded
|
||||
"syn match cLineSkip "\\$"
|
||||
syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInParen,cErrInBracket,cUserLabel,cSpecial,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cString,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cParen,cBracket,cMulti,cBadBlock
|
||||
syn region cDefine start="^\s*\zs\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
|
||||
syn region cPreProc start="^\s*\zs\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
|
||||
syn region cDefine start="^\s*\zs\%(%:\|#\)\s*\%(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
|
||||
syn region cPreProc start="^\s*\zs\%(%:\|#\)\s*\%(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
|
||||
|
||||
" Optional embedded Autodoc parsing
|
||||
if exists("c_autodoc")
|
||||
|
@ -1,8 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: ChordPro (v. 3.6.2)
|
||||
" Language: ChordPro 6 (https://www.chordpro.org)
|
||||
" Maintainer: Niels Bo Andersen <niels@niboan.dk>
|
||||
" Last Change: 2006 Apr 30
|
||||
" Remark: Requires VIM version 6.00 or greater
|
||||
" Last Change: 2022-04-15
|
||||
|
||||
" Quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@ -12,54 +11,161 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal iskeyword+=-
|
||||
|
||||
syn case ignore
|
||||
|
||||
syn keyword chordproDirective contained
|
||||
\ start_of_chorus soc end_of_chorus eoc new_song ns no_grid ng grid g
|
||||
\ new_page np new_physical_page npp start_of_tab sot end_of_tab eot
|
||||
\ column_break colb
|
||||
" Include embedded abc syntax
|
||||
syn include @Abc syntax/abc.vim
|
||||
|
||||
syn keyword chordproDirWithOpt contained
|
||||
\ comment c comment_italic ci comment_box cb title t subtitle st define
|
||||
\ textfont textsize chordfont chordsize columns col
|
||||
" Lilypond and Pango syntaxes could be embedded as well, but they are not
|
||||
" available in the distribution.
|
||||
|
||||
syn keyword chordproDefineKeyword contained base-fret frets
|
||||
" Directives without arguments
|
||||
syn keyword chordproDirective contained nextgroup=chordproConditional
|
||||
\ new_song ns
|
||||
\ start_of_chorus soc
|
||||
\ chorus
|
||||
\ start_of_verse sov
|
||||
\ start_of_bridge sob
|
||||
\ start_of_tab sot
|
||||
\ start_of_grid sog
|
||||
\ start_of_abc
|
||||
\ start_of_ly
|
||||
\ end_of_chorus eoc
|
||||
\ end_of_verse eov
|
||||
\ end_of_bridge eob
|
||||
\ end_of_tab eot
|
||||
\ end_of_grid eog
|
||||
\ end_of_abc
|
||||
\ end_of_ly
|
||||
\ new_page np
|
||||
\ new_physical_page npp
|
||||
\ column_break cb
|
||||
\ grid g
|
||||
\ no_grid ng
|
||||
\ transpose
|
||||
\ chordfont cf chordsize cs chordcolour
|
||||
\ footerfont footersize footercolour
|
||||
\ gridfont gridsize gridcolour
|
||||
\ tabfont tabsize tabcolour
|
||||
\ tocfont tocsize toccolour
|
||||
\ textfont tf textsize ts textcolour
|
||||
\ titlefont titlesize titlecolour
|
||||
|
||||
syn match chordproDirMatch /{\w*}/ contains=chordproDirective contained transparent
|
||||
syn match chordproDirOptMatch /{\w*:/ contains=chordproDirWithOpt contained transparent
|
||||
" Directives with arguments. Some directives are in both groups, as they can
|
||||
" be used both with and without arguments
|
||||
syn keyword chordproDirWithArg contained nextgroup=chordproConditional
|
||||
\ title t
|
||||
\ subtitle st
|
||||
\ sorttitle
|
||||
\ artist
|
||||
\ composer
|
||||
\ lyricist
|
||||
\ arranger
|
||||
\ copyright
|
||||
\ album
|
||||
\ year
|
||||
\ key
|
||||
\ time
|
||||
\ tempo
|
||||
\ duration
|
||||
\ capo
|
||||
\ comment c
|
||||
\ highlight
|
||||
\ comment_italic ci
|
||||
\ comment_box cb
|
||||
\ image
|
||||
\ start_of_chorus soc
|
||||
\ chorus
|
||||
\ start_of_verse sov
|
||||
\ start_of_bridge sob
|
||||
\ start_of_tab sot
|
||||
\ start_of_grid sog
|
||||
\ start_of_abc
|
||||
\ start_of_ly
|
||||
\ define
|
||||
\ chord
|
||||
\ transpose
|
||||
\ chordfont cf chordsize cs chordcolour
|
||||
\ footerfont footersize footercolour
|
||||
\ gridfont gridsize gridcolour
|
||||
\ tabfont tabsize tabcolour
|
||||
\ tocfont tocsize toccolour
|
||||
\ textfont tf textsize ts textcolour
|
||||
\ titlefont titlesize titlecolour
|
||||
\ pagetype
|
||||
\ titles
|
||||
\ columns col
|
||||
|
||||
" Workaround for a bug in VIM 6, which causes incorrect coloring of the first {
|
||||
if version < 700
|
||||
syn region chordproOptions start=/{\w*:/ end=/}/ contains=chordproDirOptMatch contained transparent
|
||||
syn region chordproOptions start=/{define:/ end=/}/ contains=chordproDirOptMatch, chordproDefineKeyword contained transparent
|
||||
else
|
||||
syn region chordproOptions start=/{\w*:/hs=e+1 end=/}/he=s-1 contains=chordproDirOptMatch contained
|
||||
syn region chordproOptions start=/{define:/hs=e+1 end=/}/he=s-1 contains=chordproDirOptMatch, chordproDefineKeyword contained
|
||||
endif
|
||||
syn keyword chordproMetaKeyword contained meta
|
||||
syn keyword chordproMetadata contained title sorttitle subtitle artist composer lyricist arranger copyright album year key time tempo duration capo
|
||||
syn keyword chordproStandardMetadata contained songindex page pages pagerange today tuning instrument user
|
||||
syn match chordproStandardMetadata /instrument\.type/ contained
|
||||
syn match chordproStandardMetadata /instrument\.description/ contained
|
||||
syn match chordproStandardMetadata /user\.name/ contained
|
||||
syn match chordproStandardMetadata /user\.fullname/ contained
|
||||
|
||||
syn region chordproTag start=/{/ end=/}/ contains=chordproDirMatch,chordproOptions oneline
|
||||
syn keyword chordproDefineKeyword contained frets fingers
|
||||
syn match chordproDefineKeyword /base-fret/ contained
|
||||
|
||||
syn match chordproArgumentsNumber /\d\+/ contained
|
||||
|
||||
syn match chordproCustom /x_\w\+/ contained
|
||||
|
||||
syn match chordproDirMatch /{\w\+\(-\w\+\)\?}/ contains=chordproDirective contained transparent
|
||||
syn match chordproDirArgMatch /{\w\+\(-\w\+\)\?[: ]/ contains=chordproDirWithArg contained transparent
|
||||
syn match chordproMetaMatch /{meta\(-\w\+\)\?[: ]\+\w\+/ contains=chordproMetaKeyword,chordproMetadata contained transparent
|
||||
syn match chordproCustomMatch /{x_\w\+\(-\w\+\)\?[: ]/ contains=chordproCustom contained transparent
|
||||
|
||||
syn match chordproConditional /-\w\+/ contained
|
||||
|
||||
syn match chordproMetaDataOperator /[=|]/ contained
|
||||
syn match chordproMetaDataValue /%{\w*/ contains=chordproMetaData,chordproStandardMetadata contained transparent
|
||||
" Handles nested metadata tags, but the end of the containing chordproTag is
|
||||
" not highlighted correctly, if there are more than two levels of nesting
|
||||
syn region chordproMetaDataTag start=/%{\w*/ skip=/%{[^}]*}/ end=/}/ contains=chordproMetaDataValue,chordproMetaDataOperator,chordproMetadataTag contained
|
||||
|
||||
syn region chordproArguments start=/{\w\+\(-\w\+\)\?[: ]/hs=e+1 skip=/%{[^}]*}/ end=/}/he=s-1 contains=chordproDirArgMatch,chordproArgumentsNumber,chordproMetaDataTag contained
|
||||
syn region chordproArguments start=/{\(define\|chord\)\(-\w\+\)\?[: ]/hs=e+1 end=/}/he=s-1 contains=chordproDirArgMatch,chordproDefineKeyword,chordproArgumentsNumber contained
|
||||
syn region chordproArguments start=/{meta\(-\w\+\)\?[: ]/hs=e+1 skip=/%{[^}]*}/ end=/}/he=s-1 contains=chordproMetaMatch,chordproMetaDataTag contained
|
||||
syn region chordproArguments start=/{x_\w\+\(-\w\+\)\?[: ]/hs=e+1 end=/}/he=s-1 contains=chordproCustomMatch contained
|
||||
|
||||
syn region chordproTag start=/{/ skip=/%{[^}]*}/ end=/}/ contains=chordproDirMatch,chordproArguments oneline
|
||||
|
||||
syn region chordproChord matchgroup=chordproBracket start=/\[/ end=/]/ oneline
|
||||
|
||||
syn region chordproTab start=/{start_of_tab}\|{sot}/hs=e+1 end=/{end_of_tab}\|{eot}/he=s-1 contains=chordproTag,chordproComment keepend
|
||||
syn region chordproAnnotation matchgroup=chordproBracket start=/\[\*/ end=/]/ oneline
|
||||
|
||||
syn region chordproChorus start=/{start_of_chorus}\|{soc}/hs=e+1 end=/{end_of_chorus}\|{eoc}/he=s-1 contains=chordproTag,chordproChord,chordproComment keepend
|
||||
syn region chordproTab start=/{start_of_tab\(-\w\+\)\?\([: ].\+\)\?}\|{sot\(-\w\+\)\?\([: ].\+\)\?}/hs=e+1 end=/{end_of_tab}\|{eot}/me=s-1 contains=chordproTag,chordproComment keepend
|
||||
|
||||
syn region chordproChorus start=/{start_of_chorus\(-\w\+\)\?\([: ].\+\)\?}\|{soc\(-\w\+\)\?\([: ].\+\)\?}/hs=e+1 end=/{end_of_chorus}\|{eoc}/me=s-1 contains=chordproTag,chordproChord,chordproAnnotation,chordproComment keepend
|
||||
|
||||
syn region chordproBridge start=/{start_of_bridge\(-\w\+\)\?\([: ].\+\)\?}\|{sob\(-\w\+\)\?\([: ].\+\)\?}/hs=e+1 end=/{end_of_bridge}\|{eob}/me=s-1 contains=chordproTag,chordproChord,chordproAnnotation,chordproComment keepend
|
||||
|
||||
syn region chordproAbc start=/{start_of_abc\(-\w\+\)\?\([: ].\+\)\?}/hs=e+1 end=/{end_of_abc}/me=s-1 contains=chordproTag,@Abc keepend
|
||||
|
||||
syn match chordproComment /^#.*/
|
||||
|
||||
" Define the default highlighting.
|
||||
hi def link chordproDirective Statement
|
||||
hi def link chordproDirWithOpt Statement
|
||||
hi def link chordproOptions Special
|
||||
hi def link chordproDirWithArg Statement
|
||||
hi def link chordproConditional Statement
|
||||
hi def link chordproCustom Statement
|
||||
hi def link chordproMetaKeyword Statement
|
||||
hi def link chordproMetaDataOperator Operator
|
||||
hi def link chordproMetaDataTag Function
|
||||
hi def link chordproArguments Special
|
||||
hi def link chordproArgumentsNumber Number
|
||||
hi def link chordproChord Type
|
||||
hi def link chordproAnnotation Identifier
|
||||
hi def link chordproTag Constant
|
||||
hi def link chordproTab PreProc
|
||||
hi def link chordproComment Comment
|
||||
hi def link chordproBracket Constant
|
||||
hi def link chordproDefineKeyword Type
|
||||
hi def link chordproDefineKeyword Identifier
|
||||
hi def link chordproMetadata Identifier
|
||||
hi def link chordproStandardMetadata Identifier
|
||||
hi def chordproChorus term=bold cterm=bold gui=bold
|
||||
hi def chordproBridge term=italic cterm=italic gui=italic
|
||||
|
||||
let b:current_syntax = "chordpro"
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Language: Microsoft Macro Assembler (80x86)
|
||||
" Orig Author: Rob Brady <robb@datatone.com>
|
||||
" Maintainer: Wu Yongwei <wuyongwei@gmail.com>
|
||||
" Last Change: 2020-05-09 22:55:38 +0800
|
||||
" Last Change: 2022-04-24 20:07:04 +0800
|
||||
|
||||
" Quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@ -68,6 +68,7 @@ syn keyword masmType STDCALL SYSCALL C BASIC FORTRAN PASCAL
|
||||
syn keyword masmType PTR NEAR FAR NEAR16 FAR16 NEAR32 FAR32
|
||||
syn keyword masmType REAL4 REAL8 REAL10 BYTE SBYTE TBYTE
|
||||
syn keyword masmType WORD DWORD QWORD FWORD SWORD SDWORD
|
||||
syn keyword masmType SQWORD OWORD MMWORD XMMWORD YMMWORD
|
||||
syn keyword masmOperator AND NOT OR SHL SHR XOR MOD DUP
|
||||
syn keyword masmOperator EQ GE GT LE LT NE
|
||||
syn keyword masmOperator LROFFSET SEG LENGTH LENGTHOF SIZE SIZEOF
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: TeX
|
||||
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
||||
" Last Change: Jun 29, 2020
|
||||
" Version: 119
|
||||
" Last Change: Apr 22, 2022
|
||||
" Version: 121
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
|
||||
"
|
||||
" Notes: {{{1
|
||||
@ -173,13 +173,25 @@ if !s:tex_excludematcher
|
||||
syn cluster texItalGroup add=texMatcher
|
||||
endif
|
||||
if !s:tex_nospell
|
||||
syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,@Spell
|
||||
syn cluster texMatchNMGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,@Spell
|
||||
syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,texStyleStatement,texStyleMatcher,@Spell
|
||||
if !s:tex_no_error
|
||||
syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texError,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,@Spell
|
||||
syn cluster texMatchNMGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texError,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,@Spell
|
||||
syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texError,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,texStyleStatement,texStyleMatcher,@Spell
|
||||
else
|
||||
syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,@Spell
|
||||
syn cluster texMatchNMGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,@Spell
|
||||
syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,texStyleStatement,texStyleMatcher,@Spell
|
||||
endif
|
||||
else
|
||||
syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption
|
||||
syn cluster texMatchNMGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption
|
||||
syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,texStyleMatcher
|
||||
if !s:tex_no_error
|
||||
syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texError,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption
|
||||
syn cluster texMatchNMGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texError,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption
|
||||
syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texError,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,texStyleMatcher
|
||||
else
|
||||
syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption
|
||||
syn cluster texMatchNMGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption
|
||||
syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,texStyleMatcher
|
||||
endif
|
||||
endif
|
||||
syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTitle,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ
|
||||
syn cluster texRefGroup contains=texMatcher,texComment,texDelimiter
|
||||
@ -189,7 +201,7 @@ if !exists("g:tex_no_math")
|
||||
syn cluster texMatchGroup add=@texMathZones
|
||||
syn cluster texMathDelimGroup contains=texMathDelimBad,texMathDelimKey,texMathDelimSet1,texMathDelimSet2
|
||||
syn cluster texMathMatchGroup contains=@texMathZones,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathMatcher,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone
|
||||
syn cluster texMathZoneGroup contains=texComment,texDelimiter,texLength,texMathDelim,texMathMatcher,texMathOper,texMathSymbol,texMathText,texRefZone,texSpecialChar,texStatement,texTypeSize,texTypeStyle
|
||||
syn cluster texMathZoneGroup contains=texBadPar,texComment,texDelimiter,texLength,texMathDelim,texMathMatcher,texMathOper,texMathSymbol,texMathText,texRefZone,texSpecialChar,texStatement,texTypeSize,texTypeStyle
|
||||
if !s:tex_no_error
|
||||
syn cluster texMathMatchGroup add=texMathError
|
||||
syn cluster texMathZoneGroup add=texMathError
|
||||
@ -214,21 +226,21 @@ endif
|
||||
if s:tex_fast =~# 'm'
|
||||
if !s:tex_no_error
|
||||
if s:tex_matchcheck =~ '{'
|
||||
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup,texError
|
||||
syn region texMatcherNM matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchNMGroup,texError
|
||||
syn region texMatcher matchgroup=texDelimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup,texError
|
||||
syn region texMatcherNM matchgroup=texDelimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchNMGroup,texError
|
||||
endif
|
||||
if s:tex_matchcheck =~ '\['
|
||||
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup,texError,@NoSpell
|
||||
syn region texMatcherNM matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchNMGroup,texError,@NoSpell
|
||||
syn region texMatcher matchgroup=texDelimiter start="\[" end="]" transparent contains=@texMatchGroup,texError,@NoSpell
|
||||
syn region texMatcherNM matchgroup=texDelimiter start="\[" end="]" transparent contains=@texMatchNMGroup,texError,@NoSpell
|
||||
endif
|
||||
else
|
||||
if s:tex_matchcheck =~ '{'
|
||||
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup
|
||||
syn region texMatcherNM matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchNMGroup
|
||||
syn region texMatcher matchgroup=texDelimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup
|
||||
syn region texMatcherNM matchgroup=texDelimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchNMGroup
|
||||
endif
|
||||
if s:tex_matchcheck =~ '\['
|
||||
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup
|
||||
syn region texMatcherNM matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchNMGroup
|
||||
syn region texMatcher matchgroup=texDelimiter start="\[" end="]" transparent contains=@texMatchGroup
|
||||
syn region texMatcherNM matchgroup=texDelimiter start="\[" end="]" transparent contains=@texMatchNMGroup
|
||||
endif
|
||||
endif
|
||||
if s:tex_matchcheck =~ '('
|
||||
@ -251,7 +263,7 @@ if s:tex_fast =~# 'M'
|
||||
if !s:tex_no_error
|
||||
syn match texMathError "}" contained
|
||||
endif
|
||||
syn region texMathMatcher matchgroup=Delimiter start="{" skip="\%(\\\\\)*\\}" end="}" end="%stopzone\>" contained contains=@texMathMatchGroup
|
||||
syn region texMathMatcher matchgroup=texDelimiter start="{" skip="\%(\\\\\)*\\}" end="}" end="%stopzone\>" contained contains=@texMathMatchGroup
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -291,14 +303,14 @@ syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)$"
|
||||
" \begin{}/\end{} section markers: {{{1
|
||||
syn match texBeginEnd "\\begin\>\|\\end\>" nextgroup=texBeginEndName
|
||||
if s:tex_fast =~# 'm'
|
||||
syn region texBeginEndName matchgroup=Delimiter start="{" end="}" contained nextgroup=texBeginEndModifier contains=texComment
|
||||
syn region texBeginEndModifier matchgroup=Delimiter start="\[" end="]" contained contains=texComment,@texMathZones,@NoSpell
|
||||
syn region texBeginEndName matchgroup=texDelimiter start="{" end="}" contained nextgroup=texBeginEndModifier contains=texComment
|
||||
syn region texBeginEndModifier matchgroup=texDelimiter start="\[" end="]" contained contains=texComment,@texMathZones,@NoSpell
|
||||
endif
|
||||
|
||||
" \documentclass, \documentstyle, \usepackage: {{{1
|
||||
syn match texDocType "\\documentclass\>\|\\documentstyle\>\|\\usepackage\>" nextgroup=texBeginEndName,texDocTypeArgs
|
||||
if s:tex_fast =~# 'm'
|
||||
syn region texDocTypeArgs matchgroup=Delimiter start="\[" end="]" contained nextgroup=texBeginEndName contains=texComment,@NoSpell
|
||||
syn region texDocTypeArgs matchgroup=texDelimiter start="\[" end="]" contained nextgroup=texBeginEndName contains=texComment,@NoSpell
|
||||
endif
|
||||
|
||||
" Preamble syntax-based folding support: {{{1
|
||||
@ -312,7 +324,7 @@ syn match texInputFile "\\include\(graphics\|list\)\=\(\[.\{-}\]\)\=\s*{.\{-}}"
|
||||
syn match texInputFile "\\\(epsfig\|input\|usepackage\)\s*\(\[.*\]\)\={.\{-}}" contains=texStatement,texInputCurlies,texInputFileOpt
|
||||
syn match texInputCurlies "[{}]" contained
|
||||
if s:tex_fast =~# 'm'
|
||||
syn region texInputFileOpt matchgroup=Delimiter start="\[" end="\]" contained contains=texComment
|
||||
syn region texInputFileOpt matchgroup=texDelimiter start="\[" end="\]" contained contains=texComment
|
||||
endif
|
||||
|
||||
" Type Styles (LaTeX 2.09): {{{1
|
||||
@ -334,10 +346,8 @@ endif
|
||||
syn match texTypeStyle "\\textmd\>"
|
||||
syn match texTypeStyle "\\textrm\>"
|
||||
|
||||
syn match texTypeStyle "\\mathbb\>"
|
||||
syn match texTypeStyle "\\mathbf\>"
|
||||
syn match texTypeStyle "\\mathcal\>"
|
||||
syn match texTypeStyle "\\mathfrak\>"
|
||||
syn match texTypeStyle "\\mathit\>"
|
||||
syn match texTypeStyle "\\mathnormal\>"
|
||||
syn match texTypeStyle "\\mathrm\>"
|
||||
@ -430,6 +440,7 @@ if !exists("g:tex_no_math") && !s:tex_no_error
|
||||
syn match texBadMath "\\end\s*{\s*\(array\|[bBpvV]matrix\|split\|smallmatrix\)\s*}"
|
||||
syn match texBadMath "\\end\s*{\s*\(displaymath\|equation\|eqnarray\|math\)\*\=\s*}"
|
||||
syn match texBadMath "\\[\])]"
|
||||
syn match texBadPar contained "\%(\\par\>\|^\s*\n.\)"
|
||||
endif
|
||||
|
||||
" Math Zones: {{{1
|
||||
@ -475,15 +486,15 @@ if !exists("g:tex_no_math")
|
||||
" Inline Math Zones: {{{2
|
||||
if s:tex_fast =~# 'M'
|
||||
if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~# 'd'
|
||||
syn region texMathZoneV matchgroup=Delimiter start="\\(" matchgroup=Delimiter end="\\)\|%stopzone\>" keepend concealends contains=@texMathZoneGroup
|
||||
syn region texMathZoneW matchgroup=Delimiter start="\\\[" matchgroup=Delimiter end="\\]\|%stopzone\>" keepend concealends contains=@texMathZoneGroup
|
||||
syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\\\\\|\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" concealends contains=@texMathZoneGroup
|
||||
syn region texMathZoneY matchgroup=Delimiter start="\$\$" matchgroup=Delimiter end="\$\$" end="%stopzone\>" keepend concealends contains=@texMathZoneGroup
|
||||
syn region texMathZoneV matchgroup=texDelimiter start="\\(" matchgroup=texDelimiter end="\\)\|%stopzone\>" keepend concealends contains=@texMathZoneGroup
|
||||
syn region texMathZoneW matchgroup=texDelimiter start="\\\[" matchgroup=texDelimiter end="\\]\|%stopzone\>" keepend concealends contains=@texMathZoneGroup
|
||||
syn region texMathZoneX matchgroup=texDelimiter start="\$" skip="\\\\\|\\\$" matchgroup=texDelimiter end="\$" end="%stopzone\>" concealends contains=@texMathZoneGroup
|
||||
syn region texMathZoneY matchgroup=texDelimiter start="\$\$" matchgroup=texDelimiter end="\$\$" end="%stopzone\>" keepend concealends contains=@texMathZoneGroup
|
||||
else
|
||||
syn region texMathZoneV matchgroup=Delimiter start="\\(" matchgroup=Delimiter end="\\)\|%stopzone\>" keepend contains=@texMathZoneGroup
|
||||
syn region texMathZoneW matchgroup=Delimiter start="\\\[" matchgroup=Delimiter end="\\]\|%stopzone\>" keepend contains=@texMathZoneGroup
|
||||
syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\%(\\\\\)*\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" contains=@texMathZoneGroup
|
||||
syn region texMathZoneY matchgroup=Delimiter start="\$\$" matchgroup=Delimiter end="\$\$" end="%stopzone\>" keepend contains=@texMathZoneGroup
|
||||
syn region texMathZoneV matchgroup=texDelimiter start="\\(" matchgroup=texDelimiter end="\\)\|%stopzone\>" keepend contains=@texMathZoneGroup
|
||||
syn region texMathZoneW matchgroup=texDelimiter start="\\\[" matchgroup=texDelimiter end="\\]\|%stopzone\>" keepend contains=@texMathZoneGroup
|
||||
syn region texMathZoneX matchgroup=texDelimiter start="\$" skip="\%(\\\\\)*\\\$" matchgroup=texDelimiter end="\$" end="%stopzone\>" contains=@texMathZoneGroup
|
||||
syn region texMathZoneY matchgroup=texDelimiter start="\$\$" matchgroup=texDelimiter end="\$\$" end="%stopzone\>" keepend contains=@texMathZoneGroup
|
||||
endif
|
||||
syn region texMathZoneZ matchgroup=texStatement start="\\ensuremath\s*{" matchgroup=texStatement end="}" end="%stopzone\>" contains=@texMathZoneGroup
|
||||
endif
|
||||
@ -650,23 +661,23 @@ if s:tex_fast =~# 'r'
|
||||
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 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 region texRefOption contained matchgroup=texDelimiter start='\[' end=']' contains=@texRefGroup,texRefZone nextgroup=texRefOption,texCite
|
||||
syn region texCite contained matchgroup=texDelimiter start='{' end='}' contains=@texRefGroup,texRefZone,texCite
|
||||
endif
|
||||
syn match texRefZone '\\cite\%([tp]\*\=\)\=\>' nextgroup=texRefOption,texCite
|
||||
|
||||
" Handle newcommand, newenvironment : {{{1
|
||||
syn match texNewCmd "\\newcommand\>" nextgroup=texCmdName skipwhite skipnl
|
||||
" Handle (re)newcommand, (re)newenvironment : {{{1
|
||||
syn match texNewCmd "\\\%(re\)\=newcommand\>" nextgroup=texCmdName skipwhite skipnl
|
||||
if s:tex_fast =~# 'V'
|
||||
syn region texCmdName contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texCmdArgs,texCmdBody skipwhite skipnl
|
||||
syn region texCmdArgs contained matchgroup=Delimiter start="\["rs=s+1 end="]" nextgroup=texCmdBody skipwhite skipnl
|
||||
syn region texCmdBody contained matchgroup=Delimiter start="{"rs=s+1 skip="\\\\\|\\[{}]" matchgroup=Delimiter end="}" contains=@texCmdGroup
|
||||
syn region texCmdName contained matchgroup=texDelimiter start="{"rs=s+1 end="}" nextgroup=texCmdArgs,texCmdBody skipwhite skipnl
|
||||
syn region texCmdArgs contained matchgroup=texDelimiter start="\["rs=s+1 end="]" nextgroup=texCmdBody skipwhite skipnl
|
||||
syn region texCmdBody contained matchgroup=texDelimiter start="{"rs=s+1 skip="\\\\\|\\[{}]" matchgroup=texDelimiter end="}" contains=@texCmdGroup
|
||||
endif
|
||||
syn match texNewEnv "\\newenvironment\>" nextgroup=texEnvName skipwhite skipnl
|
||||
syn match texNewEnv "\\\%(re\)\=newenvironment\>" nextgroup=texEnvName skipwhite skipnl
|
||||
if s:tex_fast =~# 'V'
|
||||
syn region texEnvName contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texEnvBgn skipwhite skipnl
|
||||
syn region texEnvBgn contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texEnvEnd skipwhite skipnl contains=@texEnvGroup
|
||||
syn region texEnvEnd contained matchgroup=Delimiter start="{"rs=s+1 end="}" skipwhite skipnl contains=@texEnvGroup
|
||||
syn region texEnvName contained matchgroup=texDelimiter start="{"rs=s+1 end="}" nextgroup=texEnvBgn skipwhite skipnl
|
||||
syn region texEnvBgn contained matchgroup=texDelimiter start="{"rs=s+1 end="}" nextgroup=texEnvEnd skipwhite skipnl contains=@texEnvGroup
|
||||
syn region texEnvEnd contained matchgroup=texDelimiter start="{"rs=s+1 end="}" skipwhite skipnl contains=@texEnvGroup
|
||||
endif
|
||||
|
||||
" Definitions/Commands: {{{1
|
||||
@ -694,8 +705,8 @@ if !s:tex_no_error
|
||||
endif
|
||||
syn match texStyleStatement "\\[a-zA-Z@]\+" contained
|
||||
if s:tex_fast =~# 'S'
|
||||
syn region texStyleMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texStyleGroup,texError contained
|
||||
syn region texStyleMatcher matchgroup=Delimiter start="\[" end="]" contains=@texStyleGroup,texError contained
|
||||
syn region texStyleMatcher matchgroup=texDelimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texStyleGroup,texError contained
|
||||
syn region texStyleMatcher matchgroup=texDelimiter start="\[" end="]" contains=@texStyleGroup,texError contained
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -1017,8 +1028,8 @@ if has("conceal") && &enc == 'utf-8'
|
||||
" Superscripts/Subscripts {{{2
|
||||
if s:tex_conceal =~# 's'
|
||||
if s:tex_fast =~# 's'
|
||||
syn region texSuperscript matchgroup=Delimiter start='\^{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSuperscripts,texStatement,texSubscript,texSuperscript,texMathMatcher
|
||||
syn region texSubscript matchgroup=Delimiter start='_{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSubscripts,texStatement,texSubscript,texSuperscript,texMathMatcher
|
||||
syn region texSuperscript matchgroup=texDelimiter start='\^{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSuperscripts,texStatement,texSubscript,texSuperscript,texMathMatcher
|
||||
syn region texSubscript matchgroup=texDelimiter start='_{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSubscripts,texStatement,texSubscript,texSuperscript,texMathMatcher
|
||||
endif
|
||||
" s:SuperSub:
|
||||
fun! s:SuperSub(group,leader,pat,cchar)
|
||||
@ -1255,6 +1266,7 @@ if !exists("skip_tex_syntax_inits")
|
||||
if !exists("g:tex_no_error")
|
||||
if !exists("g:tex_no_math")
|
||||
hi def link texBadMath texError
|
||||
hi def link texBadPar texBadMath
|
||||
hi def link texMathDelimBad texError
|
||||
hi def link texMathError texError
|
||||
if !b:tex_stylish
|
||||
|
@ -23,7 +23,7 @@ syn cluster vimCommentGroup contains=vimTodo,@Spell
|
||||
" Special and plugin vim commands {{{2
|
||||
syn match vimCommand contained "\<z[-+^.=]\=\>"
|
||||
syn keyword vimOnlyCommand contained fix[del] op[en] sh[ell] P[rint]
|
||||
syn keyword vimStdPlugin contained DiffOrig Man N[ext] S TOhtml XMLent XMLns
|
||||
syn keyword vimStdPlugin contained Arguments Asm Break Cfilter Clear Continue DiffOrig Evaluate Finish Gdb Lfilter Man N[ext] Over P[rint] Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Until Winbar XMLent XMLns
|
||||
|
||||
" Vim-specific options {{{2
|
||||
syn keyword vimOnlyOption contained biosk bioskey cp compatible consk conskey cm cryptmethod edcompatible guipty key macatsui mzq mzquantum osfiletype oft renderoptions rop st shelltype sn shortname tenc termencoding ta textauto tx textmode tf ttyfast ttym ttymouse tbi ttybuiltin wiv weirdinvert
|
||||
|
Loading…
Reference in New Issue
Block a user