summaryrefslogtreecommitdiff
path: root/runtime/syntax/plaintex.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2007-05-10 18:38:52 +0000
committerBram Moolenaar <Bram@vim.org>2007-05-10 18:38:52 +0000
commit10c56952d8d29365e178baa4e0db785493041595 (patch)
tree7330479a65e48a2c92c135a37e106686f484f6ce /runtime/syntax/plaintex.vim
parent335437bb249a46c51109251ff50f1b9aa8828fc4 (diff)
downloadvim-git-10c56952d8d29365e178baa4e0db785493041595.tar.gz
updated for version 7.1b
Diffstat (limited to 'runtime/syntax/plaintex.vim')
-rw-r--r--runtime/syntax/plaintex.vim13
1 files changed, 8 insertions, 5 deletions
diff --git a/runtime/syntax/plaintex.vim b/runtime/syntax/plaintex.vim
index 2e2bb3171..7020c68e9 100644
--- a/runtime/syntax/plaintex.vim
+++ b/runtime/syntax/plaintex.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: TeX (plain.tex format)
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2006-04-19
+" Latest Revision: 2006-10-26
if exists("b:current_syntax")
finish
@@ -14,6 +14,7 @@ syn match plaintexControlSequence display contains=@NoSpell
\ '\\[a-zA-Z@]\+'
runtime! syntax/initex.vim
+unlet b:current_syntax
syn match plaintexComment display
\ contains=ALLBUT,initexComment,plaintexComment
@@ -30,8 +31,6 @@ syn match plaintexCommand display contains=@NoSpell
\ '\\\%(plainoutput\|TeX\)\>'
syn match plaintexBoxCommand display contains=@NoSpell
\ '\\\%(null\|strut\)\>'
-syn match plaintexCharacterCommand display contains=@NoSpell
- \ /\\\%(["#$%&'.=^_`~]\|``\|''\|-\{2,3}\|[?!]`\|^^L\|\~\|\%(a[ae]\|A[AE]\|acute\|[cdHoOPStuvijlL]\|copyright\|d\=dag\|folio\|ldotp\|[lr]q\|oe\|OE\|slash\|ss\|underbar\)\>\)/
syn match plaintexDebuggingCommand display contains=@NoSpell
\ '\\\%(showhyphens\|tracingall\|wlog\)\>'
syn match plaintexFontsCommand display contains=@NoSpell
@@ -61,13 +60,17 @@ syn match plaintexTablesCommand display contains=@NoSpell
if !exists("g:plaintex_no_math")
syn region plaintexMath matchgroup=plaintexMath
- \ contains=@plaintexMath
+ \ contains=@plaintexMath,@NoSpell
\ start='\$' skip='\\\\\|\\\$' end='\$'
syn region plaintexMath matchgroup=plaintexMath
- \ contains=@plaintexMath keepend
+ \ contains=@plaintexMath,@NoSpell keepend
\ start='\$\$' skip='\\\\\|\\\$' end='\$\$'
endif
+" Keep this after plaintexMath, as we don’t want math mode started at a \$.
+syn match plaintexCharacterCommand display contains=@NoSpell
+ \ /\\\%(["#$%&'.=^_`~]\|``\|''\|-\{2,3}\|[?!]`\|^^L\|\~\|\%(a[ae]\|A[AE]\|acute\|[cdHoOPStuvijlL]\|copyright\|d\=dag\|folio\|ldotp\|[lr]q\|oe\|OE\|slash\|ss\|underbar\)\>\)/
+
syn cluster plaintexMath
\ contains=plaintexMathCommand,plaintexMathBoxCommand,
\ plaintexMathCharacterCommand,plaintexMathDelimiter,