Mercurial > vim
comparison runtime/syntax/rst.vim @ 7597:3012eaddb6b2
commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jan 15 20:57:49 2016 +0100
Update runtime files
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 15 Jan 2016 21:00:07 +0100 |
parents | f717d96a39b3 |
children | 1472ed67c36f |
comparison
equal
deleted
inserted
replaced
7596:a9234d9e3efd | 7597:3012eaddb6b2 |
---|---|
1 " Vim syntax file | 1 " Vim syntax file |
2 " Language: reStructuredText documentation format | 2 " Language: reStructuredText documentation format |
3 " Maintainer: Marshall Ward <marshall.ward@gmail.com> | 3 " Maintainer: Marshall Ward <marshall.ward@gmail.com> |
4 " Previous Maintainer: Nikolai Weibull <now@bitwi.se> | 4 " Previous Maintainer: Nikolai Weibull <now@bitwi.se> |
5 " Latest Revision: 2015-09-07 | 5 " Latest Revision: 2016-01-05 |
6 | 6 |
7 if exists("b:current_syntax") | 7 if exists("b:current_syntax") |
8 finish | 8 finish |
9 endif | 9 endif |
10 | 10 |
11 let s:cpo_save = &cpo | 11 let s:cpo_save = &cpo |
12 set cpo&vim | 12 set cpo&vim |
13 | 13 |
14 syn case ignore | 14 syn case ignore |
15 | |
16 syn match rstSections "^\%(\([=`:.'"~^_*+#-]\)\1\+\n\)\=.\+\n\([=`:.'"~^_*+#-]\)\2\+$" | |
17 | 15 |
18 syn match rstTransition /^[=`:.'"~^_*+#-]\{4,}\s*$/ | 16 syn match rstTransition /^[=`:.'"~^_*+#-]\{4,}\s*$/ |
19 | 17 |
20 syn cluster rstCruft contains=rstEmphasis,rstStrongEmphasis, | 18 syn cluster rstCruft contains=rstEmphasis,rstStrongEmphasis, |
21 \ rstInterpretedText,rstInlineLiteral,rstSubstitutionReference, | 19 \ rstInterpretedText,rstInlineLiteral,rstSubstitutionReference, |
120 call s:DefineInlineMarkup('StrongEmphasis', '\*\*', '\*', '\*\*') | 118 call s:DefineInlineMarkup('StrongEmphasis', '\*\*', '\*', '\*\*') |
121 call s:DefineInlineMarkup('InterpretedTextOrHyperlinkReference', '`', '`', '`_\{0,2}') | 119 call s:DefineInlineMarkup('InterpretedTextOrHyperlinkReference', '`', '`', '`_\{0,2}') |
122 call s:DefineInlineMarkup('InlineLiteral', '``', "", '``') | 120 call s:DefineInlineMarkup('InlineLiteral', '``', "", '``') |
123 call s:DefineInlineMarkup('SubstitutionReference', '|', '|', '|_\{0,2}') | 121 call s:DefineInlineMarkup('SubstitutionReference', '|', '|', '|_\{0,2}') |
124 call s:DefineInlineMarkup('InlineInternalTargets', '_`', '`', '`') | 122 call s:DefineInlineMarkup('InlineInternalTargets', '_`', '`', '`') |
123 | |
124 syn match rstSections "^\%(\([=`:.'"~^_*+#-]\)\1\+\n\)\=.\+\n\([=`:.'"~^_*+#-]\)\2\+$" | |
125 | 125 |
126 " TODO: Can’t remember why these two can’t be defined like the ones above. | 126 " TODO: Can’t remember why these two can’t be defined like the ones above. |
127 execute 'syn match rstFootnoteReference contains=@NoSpell' . | 127 execute 'syn match rstFootnoteReference contains=@NoSpell' . |
128 \ ' +\[\%(\d\+\|#\%(' . s:ReferenceName . '\)\=\|\*\)\]_+' | 128 \ ' +\[\%(\d\+\|#\%(' . s:ReferenceName . '\)\=\|\*\)\]_+' |
129 | 129 |