Mercurial > vim
comparison runtime/syntax/tex.vim @ 8876:47f17f66da3d
commit https://github.com/vim/vim/commit/03413f44167c4b5cd0012def9bb331e2518c83cf
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Apr 12 21:07:15 2016 +0200
Updated runtime files.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 12 Apr 2016 21:15:06 +0200 |
parents | aba2d0a01290 |
children | 9305a1251e51 |
comparison
equal
deleted
inserted
replaced
8875:31a3f0c0f011 | 8876:47f17f66da3d |
---|---|
1 " Vim syntax file | 1 " Vim syntax file |
2 " Language: TeX | 2 " Language: TeX |
3 " Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM> | 3 " Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM> |
4 " Last Change: Mar 07, 2016 | 4 " Last Change: Apr 11, 2016 |
5 " Version: 93 | 5 " Version: 94 |
6 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX | 6 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX |
7 " | 7 " |
8 " Notes: {{{1 | 8 " Notes: {{{1 |
9 " | 9 " |
10 " 1. If you have a \begin{verbatim} that appears to overrun its boundaries, | 10 " 1. If you have a \begin{verbatim} that appears to overrun its boundaries, |
81 let s:tex_conceal= 'abdmgsS' | 81 let s:tex_conceal= 'abdmgsS' |
82 else | 82 else |
83 let s:tex_conceal= g:tex_conceal | 83 let s:tex_conceal= g:tex_conceal |
84 endif | 84 endif |
85 if !exists("g:tex_superscripts") | 85 if !exists("g:tex_superscripts") |
86 let g:tex_superscripts= "[0-9a-zA-W.,:;+-<>/()=]" | 86 let s:tex_superscripts= "[0-9a-zA-W.,:;+-<>/()=]" |
87 else | |
88 let s:tex_superscripts= g:tex_superscripts | |
87 endif | 89 endif |
88 if !exists("g:tex_subscripts") | 90 if !exists("g:tex_subscripts") |
89 let g:tex_subscripts= "[0-9aehijklmnoprstuvx,+-/().]" | 91 let s:tex_subscripts= "[0-9aehijklmnoprstuvx,+-/().]" |
92 else | |
93 let s:tex_subscripts= g:tex_subscripts | |
90 endif | 94 endif |
91 | 95 |
92 " Determine whether or not to use "*.sty" mode {{{1 | 96 " Determine whether or not to use "*.sty" mode {{{1 |
93 " The user may override the normal determination by setting | 97 " The user may override the normal determination by setting |
94 " g:tex_stylish to 1 (for "*.sty" mode) | 98 " g:tex_stylish to 1 (for "*.sty" mode) |
1047 syn region texSuperscript matchgroup=Delimiter start='\^{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSuperscripts,texStatement,texSubscript,texSuperscript,texMathMatcher | 1051 syn region texSuperscript matchgroup=Delimiter start='\^{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSuperscripts,texStatement,texSubscript,texSuperscript,texMathMatcher |
1048 syn region texSubscript matchgroup=Delimiter start='_{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSubscripts,texStatement,texSubscript,texSuperscript,texMathMatcher | 1052 syn region texSubscript matchgroup=Delimiter start='_{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSubscripts,texStatement,texSubscript,texSuperscript,texMathMatcher |
1049 endif | 1053 endif |
1050 " s:SuperSub: | 1054 " s:SuperSub: |
1051 fun! s:SuperSub(group,leader,pat,cchar) | 1055 fun! s:SuperSub(group,leader,pat,cchar) |
1052 if a:pat =~# '^\\' || (a:leader == '\^' && a:pat =~# g:tex_superscripts) || (a:leader == '_' && a:pat =~# g:tex_subscripts) | 1056 if a:pat =~# '^\\' || (a:leader == '\^' && a:pat =~# s:tex_superscripts) || (a:leader == '_' && a:pat =~# s:tex_subscripts) |
1053 " call Decho("SuperSub: group<".a:group."> leader<".a:leader."> pat<".a:pat."> cchar<".a:cchar.">") | 1057 " call Decho("SuperSub: group<".a:group."> leader<".a:leader."> pat<".a:pat."> cchar<".a:cchar.">") |
1054 exe 'syn match '.a:group." '".a:leader.a:pat."' contained conceal cchar=".a:cchar | 1058 exe 'syn match '.a:group." '".a:leader.a:pat."' contained conceal cchar=".a:cchar |
1055 exe 'syn match '.a:group."s '".a:pat ."' contained conceal cchar=".a:cchar.' nextgroup='.a:group.'s' | 1059 exe 'syn match '.a:group."s '".a:pat ."' contained conceal cchar=".a:cchar.' nextgroup='.a:group.'s' |
1056 endif | 1060 endif |
1057 endfun | 1061 endfun |