comparison runtime/syntax/tex.vim @ 10048:43efa4f5a8ea

commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 30 23:26:57 2016 +0200 Updated runtime files. Remove version checks for Vim older than 6.0.
author Christian Brabandt <cb@256bit.org>
date Tue, 30 Aug 2016 23:30:09 +0200
parents 35ce559b8553
children 46763b01cd9a
comparison
equal deleted inserted replaced
10047:a62862410ca1 10048:43efa4f5a8ea
38 " new math groups :help tex-math 38 " new math groups :help tex-math
39 " new styles :help tex-style 39 " new styles :help tex-style
40 " using conceal mode :help tex-conceal 40 " using conceal mode :help tex-conceal
41 41
42 " Version Clears: {{{1 42 " Version Clears: {{{1
43 " For version 5.x: Clear all syntax items 43 " quit when a syntax file was already loaded
44 " For version 6.x: Quit when a syntax file was already loaded 44 if exists("b:current_syntax")
45 if version < 600
46 syntax clear
47 elseif exists("b:current_syntax")
48 finish 45 finish
49 endif 46 endif
50 let s:keepcpo= &cpo 47 let s:keepcpo= &cpo
51 set cpo&vim 48 set cpo&vim
52 scriptencoding utf-8 49 scriptencoding utf-8
53 50
54 " Define the default highlighting. {{{1 51 " Define the default highlighting. {{{1
55 " For version 5.7 and earlier: only when not done already 52 " For version 5.7 and earlier: only when not done already
56 " For version 5.8 and later: only when an item doesn't have highlighting yet 53 " For version 5.8 and later: only when an item doesn't have highlighting yet
57 if version >= 508 || !exists("did_tex_syntax_inits") 54 let did_tex_syntax_inits = 1
58 let did_tex_syntax_inits = 1 55 command -nargs=+ HiLink hi def link <args>
59 if version < 508
60 command -nargs=+ HiLink hi link <args>
61 else
62 command -nargs=+ HiLink hi def link <args>
63 endif
64 endif
65 56
66 " by default, enable all region-based highlighting 57 " by default, enable all region-based highlighting
67 let s:tex_fast= "bcmMprsSvV" 58 let s:tex_fast= "bcmMprsSvV"
68 if exists("g:tex_fast") 59 if exists("g:tex_fast")
69 if type(g:tex_fast) != 1 60 if type(g:tex_fast) != 1
596 if s:tex_fast =~# 'v' 587 if s:tex_fast =~# 'v'
597 if exists("g:tex_verbspell") && g:tex_verbspell 588 if exists("g:tex_verbspell") && g:tex_verbspell
598 syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" contains=@Spell 589 syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" contains=@Spell
599 " listings package: 590 " listings package:
600 syn region texZone start="\\begin{lstlisting}" end="\\end{lstlisting}\|%stopzone\>" contains=@Spell 591 syn region texZone start="\\begin{lstlisting}" end="\\end{lstlisting}\|%stopzone\>" contains=@Spell
601 if version < 600 592 if b:tex_stylish
602 syn region texZone start="\\verb\*\=`" end="`\|%stopzone\>" contains=@Spell 593 syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" contains=@Spell
603 syn region texZone start="\\verb\*\=#" end="#\|%stopzone\>" contains=@Spell
604 else 594 else
605 if b:tex_stylish 595 syn region texZone start="\\verb\*\=\z([^\ta-zA-Z]\)" end="\z1\|%stopzone\>" contains=@Spell
606 syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" contains=@Spell
607 else
608 syn region texZone start="\\verb\*\=\z([^\ta-zA-Z]\)" end="\z1\|%stopzone\>" contains=@Spell
609 endif
610 endif 596 endif
611 else 597 else
612 syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" 598 syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>"
613 if version < 600 599 if b:tex_stylish
614 syn region texZone start="\\verb\*\=`" end="`\|%stopzone\>" 600 syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>"
615 syn region texZone start="\\verb\*\=#" end="#\|%stopzone\>"
616 else 601 else
617 if b:tex_stylish 602 syn region texZone start="\\verb\*\=\z([^\ta-zA-Z]\)" end="\z1\|%stopzone\>"
618 syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>"
619 else
620 syn region texZone start="\\verb\*\=\z([^\ta-zA-Z]\)" end="\z1\|%stopzone\>"
621 endif
622 endif 603 endif
623 endif 604 endif
624 endif 605 endif
625 606
626 " Tex Reference Zones: {{{1 607 " Tex Reference Zones: {{{1