Make updating text for conceal mode simpler. A few compiler warning fixes.
diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim
index 6235df1..c6928cf 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: Apr 14, 2010
-" Version: 47
+" Last Change: Jun 24, 2010
+" Version: 48
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
"
" Notes: {{{1
@@ -125,6 +125,10 @@
syn cluster texSubSectionGroup contains=texSubSubSectionZone,texParaZone
syn cluster texSubSubSectionGroup contains=texParaZone
syn cluster texParaGroup contains=texSubParaZone
+ if has("conceal") && &enc == 'utf-8'
+ syn cluster texMathZoneGroup add=texGreek,texSuperscript,texSubscript
+ syn cluster texMathMatchGroup add=texGreek,texSuperscript,texSubscript
+ endif
endif
" Try to flag {} and () mismatches: {{{1
@@ -337,11 +341,11 @@
call TexNewMathZone("L","xxalignat",0)
" Inline Math Zones: {{{2
- 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 texMathZoneZ matchgroup=texStatement start="\\ensuremath\s*{" matchgroup=texStatement end="}" end="%stopzone\>" contains=@texMathZoneGroup
+ 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 texMathZoneZ matchgroup=texStatement start="\\ensuremath\s*{" matchgroup=texStatement end="}" end="%stopzone\>" contains=@texMathZoneGroup
syn match texMathOper "[_^=]" contained
@@ -465,6 +469,118 @@
syn region texStyleMatcher matchgroup=Delimiter start="\[" end="]" contains=@texStyleGroup,texError contained
endif
+" support for
+if has("conceal") && &enc == 'utf-8'
+ syn match texGreek '\\alpha\>' contained conceal cchar=α
+ syn match texGreek '\\beta\>' contained conceal cchar=β
+ syn match texGreek '\\gamma\>' contained conceal cchar=γ
+ syn match texGreek '\\delta\>' contained conceal cchar=δ
+ syn match texGreek '\\epsilon\>' contained conceal cchar=ϵ
+ syn match texGreek '\\varepsilon\>' contained conceal cchar=ε
+ syn match texGreek '\\zeta\>' contained conceal cchar=ζ
+ syn match texGreek '\\eta\>' contained conceal cchar=η
+ syn match texGreek '\\theta\>' contained conceal cchar=θ
+ syn match texGreek '\\vartheta\>' contained conceal cchar=ϑ
+ syn match texGreek '\\kappa\>' contained conceal cchar=κ
+ syn match texGreek '\\lambda\>' contained conceal cchar=λ
+ syn match texGreek '\\mu\>' contained conceal cchar=μ
+ syn match texGreek '\\nu\>' contained conceal cchar=ν
+ syn match texGreek '\\xi\>' contained conceal cchar=ξ
+ syn match texGreek '\\pi\>' contained conceal cchar=π
+ syn match texGreek '\\varpi\>' contained conceal cchar=ϖ
+ syn match texGreek '\\rho\>' contained conceal cchar=ρ
+ syn match texGreek '\\varrho\>' contained conceal cchar=ϱ
+ syn match texGreek '\\sigma\>' contained conceal cchar=σ
+ syn match texGreek '\\varsigma\>' contained conceal cchar=ς
+ syn match texGreek '\\tau\>' contained conceal cchar=τ
+ syn match texGreek '\\upsilon\>' contained conceal cchar=υ
+ syn match texGreek '\\phi\>' contained conceal cchar=φ
+ syn match texGreek '\\varphi\>' contained conceal cchar=ϕ
+ syn match texGreek '\\chi\>' contained conceal cchar=χ
+ syn match texGreek '\\psi\>' contained conceal cchar=ψ
+ syn match texGreek '\\omega\>' contained conceal cchar=ω
+ syn match texGreek '\\Gamma\>' contained conceal cchar=Γ
+ syn match texGreek '\\Delta\>' contained conceal cchar=Δ
+ syn match texGreek '\\Theta\>' contained conceal cchar=Θ
+ syn match texGreek '\\Lambda\>' contained conceal cchar=Λ
+ syn match texGreek '\\Xi\>' contained conceal cchar=Χ
+ syn match texGreek '\\Pi\>' contained conceal cchar=Π
+ syn match texGreek '\\Sigma\>' contained conceal cchar=Σ
+ syn match texGreek '\\Upsilon\>' contained conceal cchar=Υ
+ syn match texGreek '\\Phi\>' contained conceal cchar=Φ
+ syn match texGreek '\\Psi\>' contained conceal cchar=Ψ
+ syn match texGreek '\\Omega\>' contained conceal cchar=Ω
+ syn match texSuperscript '\^0' contained conceal cchar=⁰
+ syn match texSuperscript '\^1' contained conceal cchar=¹
+ syn match texSuperscript '\^2' contained conceal cchar=²
+ syn match texSuperscript '\^3' contained conceal cchar=³
+ syn match texSuperscript '\^4' contained conceal cchar=⁴
+ syn match texSuperscript '\^5' contained conceal cchar=⁵
+ syn match texSuperscript '\^6' contained conceal cchar=⁶
+ syn match texSuperscript '\^7' contained conceal cchar=⁷
+ syn match texSuperscript '\^8' contained conceal cchar=⁸
+ syn match texSuperscript '\^9' contained conceal cchar=⁹
+ syn match texSuperscript '\^a' contained conceal cchar=ᵃ
+ syn match texSuperscript '\^b' contained conceal cchar=ᵇ
+ syn match texSuperscript '\^c' contained conceal cchar=ᶜ
+ syn match texSuperscript '\^d' contained conceal cchar=ᵈ
+ syn match texSuperscript '\^e' contained conceal cchar=ᵉ
+ syn match texSuperscript '\^f' contained conceal cchar=ᶠ
+ syn match texSuperscript '\^g' contained conceal cchar=ᵍ
+ syn match texSuperscript '\^h' contained conceal cchar=ʰ
+ syn match texSuperscript '\^i' contained conceal cchar=ⁱ
+ syn match texSuperscript '\^j' contained conceal cchar=ʲ
+ syn match texSuperscript '\^k' contained conceal cchar=ᵏ
+ syn match texSuperscript '\^l' contained conceal cchar=ˡ
+ syn match texSuperscript '\^m' contained conceal cchar=ᵐ
+ syn match texSuperscript '\^n' contained conceal cchar=ⁿ
+ syn match texSuperscript '\^o' contained conceal cchar=ᵒ
+ syn match texSuperscript '\^p' contained conceal cchar=ᵖ
+ syn match texSuperscript '\^r' contained conceal cchar=ʳ
+ syn match texSuperscript '\^s' contained conceal cchar=ˢ
+ syn match texSuperscript '\^t' contained conceal cchar=ᵗ
+ syn match texSuperscript '\^u' contained conceal cchar=ᵘ
+ syn match texSuperscript '\^v' contained conceal cchar=ᵛ
+ syn match texSuperscript '\^w' contained conceal cchar=ʷ
+ syn match texSuperscript '\^x' contained conceal cchar=ˣ
+ syn match texSuperscript '\^y' contained conceal cchar=ʸ
+ syn match texSuperscript '\^z' contained conceal cchar=ᶻ
+ syn match texSuperscript '\^A' contained conceal cchar=ᴬ
+ syn match texSuperscript '\^B' contained conceal cchar=ᴮ
+ syn match texSuperscript '\^D' contained conceal cchar=ᴰ
+ syn match texSuperscript '\^E' contained conceal cchar=ᴱ
+ syn match texSuperscript '\^G' contained conceal cchar=ᴳ
+ syn match texSuperscript '\^H' contained conceal cchar=ᴴ
+ syn match texSuperscript '\^I' contained conceal cchar=ᴵ
+ syn match texSuperscript '\^J' contained conceal cchar=ᴶ
+ syn match texSuperscript '\^K' contained conceal cchar=ᴷ
+ syn match texSuperscript '\^L' contained conceal cchar=ᴸ
+ syn match texSuperscript '\^M' contained conceal cchar=ᴹ
+ syn match texSuperscript '\^N' contained conceal cchar=ᴺ
+ syn match texSuperscript '\^O' contained conceal cchar=ᴼ
+ syn match texSuperscript '\^P' contained conceal cchar=ᴾ
+ syn match texSuperscript '\^R' contained conceal cchar=ᴿ
+ syn match texSuperscript '\^T' contained conceal cchar=ᵀ
+ syn match texSuperscript '\^U' contained conceal cchar=ᵁ
+ syn match texSuperscript '\^W' contained conceal cchar=ᵂ
+ syn match texSubscript '_0' contained conceal cchar=₀
+ syn match texSubscript '_1' contained conceal cchar=₁
+ syn match texSubscript '_2' contained conceal cchar=₂
+ syn match texSubscript '_3' contained conceal cchar=₃
+ syn match texSubscript '_4' contained conceal cchar=₄
+ syn match texSubscript '_5' contained conceal cchar=₅
+ syn match texSubscript '_6' contained conceal cchar=₆
+ syn match texSubscript '_7' contained conceal cchar=₇
+ syn match texSubscript '_8' contained conceal cchar=₈
+ syn match texSubscript '_9' contained conceal cchar=₉
+ syn match texSubscript '_a' contained conceal cchar=ₐ
+ syn match texSubscript '_e' contained conceal cchar=ₑ
+ syn match texSubscript '_i' contained conceal cchar=ᵢ
+ syn match texSubscript '_o' contained conceal cchar=ₒ
+ syn match texSubscript '_u' contained conceal cchar=ᵤ
+endif
+
+" ---------------------------------------------------------------------
" LaTeX synchronization: {{{1
syn sync maxlines=200
syn sync minlines=50
@@ -487,6 +603,7 @@
syn sync match texSyncMathZoneA groupthere NONE "\\\(sub\)*section\>"
endif
+" ---------------------------------------------------------------------
" Highlighting: {{{1
if did_tex_syntax_inits == 1
let did_tex_syntax_inits= 2