annotate runtime/syntax/rst.vim @ 6866:8ebcd7f1ff5b v7.4.753

patch 7.4.753 Problem: Appending in Visual mode with 'linebreak' set does not work properly. Also when 'selection' is "exclusive". (Ingo Karkat) Solution: Recalculate virtual columns. (Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Thu, 25 Jun 2015 13:30:46 +0200
parents 31f7581068a9
children f717d96a39b3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
6292
31f7581068a9 Update runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 6159
diff changeset
2 " Language: reStructuredText documentation format
31f7581068a9 Update runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 6159
diff changeset
3 " Maintainer: Marshall Ward <marshall.ward@gmail.com>
6159
babc6a1d4c27 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 5510
diff changeset
4 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
6292
31f7581068a9 Update runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 6159
diff changeset
5 " Latest Revision: 2014-10-03
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
7 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
11 let s:cpo_save = &cpo
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
12 set cpo&vim
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
13
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1224
diff changeset
16 syn match rstSections "^\%(\([=`:.'"~^_*+#-]\)\1\+\n\)\=.\+\n\([=`:.'"~^_*+#-]\)\2\+$"
825
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
17
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1224
diff changeset
18 syn match rstTransition /^[=`:.'"~^_*+#-]\{4,}\s*$/
825
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
19
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
20 syn cluster rstCruft contains=rstEmphasis,rstStrongEmphasis,
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
21 \ rstInterpretedText,rstInlineLiteral,rstSubstitutionReference,
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
22 \ rstInlineInternalTargets,rstFootnoteReference,rstHyperlinkReference
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
825
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
24 syn region rstLiteralBlock matchgroup=rstDelimiter
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
25 \ start='::\_s*\n\ze\z(\s\+\)' skip='^$' end='^\z1\@!'
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
26 \ contains=@NoSpell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
825
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
28 syn region rstQuotedLiteralBlock matchgroup=rstDelimiter
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
29 \ start="::\_s*\n\ze\z([!\"#$%&'()*+,-./:;<=>?@[\]^_`{|}~]\)"
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
30 \ end='^\z1\@!' contains=@NoSpell
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
31
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
32 syn region rstDoctestBlock oneline display matchgroup=rstDelimiter
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
33 \ start='^>>>\s' end='^$'
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
34
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
35 syn region rstTable transparent start='^\n\s*+[-=+]\+' end='^$'
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
36 \ contains=rstTableLines,@rstCruft
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
37 syn match rstTableLines contained display '|\|+\%(=\+\|-\+\)\='
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
38
825
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
39 syn region rstSimpleTable transparent
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
40 \ start='^\n\%(\s*\)\@>\%(\%(=\+\)\@>\%(\s\+\)\@>\)\%(\%(\%(=\+\)\@>\%(\s*\)\@>\)\+\)\@>$'
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
41 \ end='^$'
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
42 \ contains=rstSimpleTableLines,@rstCruft
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
43 syn match rstSimpleTableLines contained display
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
44 \ '^\%(\s*\)\@>\%(\%(=\+\)\@>\%(\s\+\)\@>\)\%(\%(\%(=\+\)\@>\%(\s*\)\@>\)\+\)\@>$'
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
45 syn match rstSimpleTableLines contained display
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
46 \ '^\%(\s*\)\@>\%(\%(-\+\)\@>\%(\s\+\)\@>\)\%(\%(\%(-\+\)\@>\%(\s*\)\@>\)\+\)\@>$'
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
47
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
48 syn cluster rstDirectives contains=rstFootnote,rstCitation,
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
49 \ rstHyperlinkTarget,rstExDirective
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
50
6159
babc6a1d4c27 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 5510
diff changeset
51 syn match rstExplicitMarkup '^\s*\.\.\_s'
825
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
52 \ nextgroup=@rstDirectives,rstComment,rstSubstitutionDefinition
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
53
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
54 let s:ReferenceName = '[[:alnum:]]\+\%([_.-][[:alnum:]]\+\)*'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55
825
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
56 syn keyword rstTodo contained FIXME TODO XXX NOTE
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
57
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
58 execute 'syn region rstComment contained' .
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
59 \ ' start=/.*/'
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
60 \ ' end=/^\s\@!/ contains=rstTodo'
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
61
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
62 execute 'syn region rstFootnote contained matchgroup=rstDirective' .
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
63 \ ' start=+\[\%(\d\+\|#\%(' . s:ReferenceName . '\)\=\|\*\)\]\_s+' .
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
64 \ ' skip=+^$+' .
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
65 \ ' end=+^\s\@!+ contains=@rstCruft,@NoSpell'
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
66
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
67 execute 'syn region rstCitation contained matchgroup=rstDirective' .
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
68 \ ' start=+\[' . s:ReferenceName . '\]\_s+' .
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
69 \ ' skip=+^$+' .
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
70 \ ' end=+^\s\@!+ contains=@rstCruft,@NoSpell'
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
71
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
72 syn region rstHyperlinkTarget contained matchgroup=rstDirective
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
73 \ start='_\%(_\|[^:\\]*\%(\\.[^:\\]*\)*\):\_s' skip=+^$+ end=+^\s\@!+
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74
825
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
75 syn region rstHyperlinkTarget contained matchgroup=rstDirective
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
76 \ start='_`[^`\\]*\%(\\.[^`\\]*\)*`:\_s' skip=+^$+ end=+^\s\@!+
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
77
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
78 syn region rstHyperlinkTarget matchgroup=rstDirective
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
79 \ start=+^__\_s+ skip=+^$+ end=+^\s\@!+
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
80
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
81 execute 'syn region rstExDirective contained matchgroup=rstDirective' .
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
82 \ ' start=+' . s:ReferenceName . '::\_s+' .
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
83 \ ' skip=+^$+' .
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
84 \ ' end=+^\s\@!+ contains=@rstCruft'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
825
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
86 execute 'syn match rstSubstitutionDefinition contained' .
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
87 \ ' /|' . s:ReferenceName . '|\_s\+/ nextgroup=@rstDirectives'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88
825
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
89 function! s:DefineOneInlineMarkup(name, start, middle, end, char_left, char_right)
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
90 execute 'syn region rst' . a:name .
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
91 \ ' start=+' . a:char_left . '\zs' . a:start .
1224
edc1c9d6dab9 updated for version 7.1b
vimboss
parents: 825
diff changeset
92 \ '\ze[^[:space:]' . a:char_right . a:start[strlen(a:start) - 1] . ']+' .
825
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
93 \ a:middle .
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
94 \ ' end=+\S' . a:end . '\ze\%($\|\s\|[''")\]}>/:.,;!?\\-]\)+'
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
95 endfunction
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
96
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
97 function! s:DefineInlineMarkup(name, start, middle, end)
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
98 let middle = a:middle != "" ?
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
99 \ (' skip=+\\\\\|\\' . a:middle . '+') :
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
100 \ ""
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101
825
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
102 call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, "'", "'")
6159
babc6a1d4c27 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 5510
diff changeset
103 call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '"', '"')
babc6a1d4c27 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 5510
diff changeset
104 call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '(', ')')
babc6a1d4c27 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 5510
diff changeset
105 call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '\[', '\]')
babc6a1d4c27 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 5510
diff changeset
106 call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '{', '}')
babc6a1d4c27 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 5510
diff changeset
107 call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '<', '>')
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108
825
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
109 call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '\%(^\|\s\|[/:]\)', '')
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
110
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
111 execute 'syn match rst' . a:name .
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
112 \ ' +\%(^\|\s\|[''"([{</:]\)\zs' . a:start .
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
113 \ '[^[:space:]' . a:start[strlen(a:start) - 1] . ']'
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
114 \ a:end . '\ze\%($\|\s\|[''")\]}>/:.,;!?\\-]\)+'
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
115
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
116 execute 'hi def link rst' . a:name . 'Delimiter' . ' rst' . a:name
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
117 endfunction
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118
825
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
119 call s:DefineInlineMarkup('Emphasis', '\*', '\*', '\*')
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
120 call s:DefineInlineMarkup('StrongEmphasis', '\*\*', '\*', '\*\*')
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
121 call s:DefineInlineMarkup('InterpretedTextOrHyperlinkReference', '`', '`', '`_\{0,2}')
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
122 call s:DefineInlineMarkup('InlineLiteral', '``', "", '``')
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
123 call s:DefineInlineMarkup('SubstitutionReference', '|', '|', '|_\{0,2}')
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
124 call s:DefineInlineMarkup('InlineInternalTargets', '_`', '`', '`')
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
125
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
126 " TODO: Can’t remember why these two can’t be defined like the ones above.
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
127 execute 'syn match rstFootnoteReference contains=@NoSpell' .
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
128 \ ' +\[\%(\d\+\|#\%(' . s:ReferenceName . '\)\=\|\*\)\]_+'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129
825
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
130 execute 'syn match rstCitationReference contains=@NoSpell' .
1224
edc1c9d6dab9 updated for version 7.1b
vimboss
parents: 825
diff changeset
131 \ ' +\[' . s:ReferenceName . '\]_\ze\%($\|\s\|[''")\]}>/:.,;!?\\-]\)+'
825
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
132
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
133 execute 'syn match rstHyperlinkReference' .
1224
edc1c9d6dab9 updated for version 7.1b
vimboss
parents: 825
diff changeset
134 \ ' /\<' . s:ReferenceName . '__\=\ze\%($\|\s\|[''")\]}>/:.,;!?\\-]\)/'
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
135
825
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
136 syn match rstStandaloneHyperlink contains=@NoSpell
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
137 \ "\<\%(\%(\%(https\=\|file\|ftp\|gopher\)://\|\%(mailto\|news\):\)[^[:space:]'\"<>]\+\|www[[:alnum:]_-]*\.[[:alnum:]_-]\+\.[^[:space:]'\"<>]\+\)[[:alnum:]/]"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138
3920
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
139 syn region rstCodeBlock contained matchgroup=rstDirective
6159
babc6a1d4c27 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 5510
diff changeset
140 \ start=+\%(sourcecode\|code\%(-block\)\=\)::\_s*\n\ze\z(\s\+\)+
3920
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
141 \ skip=+^$+
6159
babc6a1d4c27 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 5510
diff changeset
142 \ end=+^\z1\@!+
3920
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
143 \ contains=@NoSpell
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
144 syn cluster rstDirectives add=rstCodeBlock
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
145
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
146 if !exists('g:rst_syntax_code_list')
6159
babc6a1d4c27 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 5510
diff changeset
147 let g:rst_syntax_code_list = ['vim', 'java', 'cpp', 'lisp', 'php',
babc6a1d4c27 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 5510
diff changeset
148 \ 'python', 'perl', 'sh']
3920
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
149 endif
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
150
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
151 for code in g:rst_syntax_code_list
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
152 unlet! b:current_syntax
6292
31f7581068a9 Update runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 6159
diff changeset
153 " guard against setting 'isk' option which might cause problems (issue #108)
31f7581068a9 Update runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 6159
diff changeset
154 let prior_isk = &l:iskeyword
3920
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
155 exe 'syn include @rst'.code.' syntax/'.code.'.vim'
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
156 exe 'syn region rstDirective'.code.' matchgroup=rstDirective fold '
6159
babc6a1d4c27 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 5510
diff changeset
157 \.'start=#\%(sourcecode\|code\%(-block\)\=\)::\s\+'.code.'\_s*\n\ze\z(\s\+\)# '
3920
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
158 \.'skip=#^$# '
6159
babc6a1d4c27 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 5510
diff changeset
159 \.'end=#^\z1\@!# contains=@NoSpell,@rst'.code
3920
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
160 exe 'syn cluster rstDirectives add=rstDirective'.code
6292
31f7581068a9 Update runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 6159
diff changeset
161 " reset 'isk' setting, if it has been changed
31f7581068a9 Update runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 6159
diff changeset
162 if &l:iskeyword !=# prior_isk
31f7581068a9 Update runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 6159
diff changeset
163 let &l:iskeyword = prior_isk
31f7581068a9 Update runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 6159
diff changeset
164 endif
31f7581068a9 Update runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 6159
diff changeset
165 unlet! prior_isk
3920
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
166 endfor
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
167
4780
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3920
diff changeset
168 " TODO: Use better syncing.
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3920
diff changeset
169 syn sync minlines=50 linebreaks=2
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3920
diff changeset
170
825
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
171 hi def link rstTodo Todo
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
172 hi def link rstComment Comment
3750
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2072
diff changeset
173 hi def link rstSections Title
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2072
diff changeset
174 hi def link rstTransition rstSections
825
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
175 hi def link rstLiteralBlock String
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
176 hi def link rstQuotedLiteralBlock String
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
177 hi def link rstDoctestBlock PreProc
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
178 hi def link rstTableLines rstDelimiter
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
179 hi def link rstSimpleTableLines rstTableLines
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
180 hi def link rstExplicitMarkup rstDirective
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
181 hi def link rstDirective Keyword
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
182 hi def link rstFootnote String
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
183 hi def link rstCitation String
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
184 hi def link rstHyperlinkTarget String
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
185 hi def link rstExDirective String
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
186 hi def link rstSubstitutionDefinition rstDirective
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
187 hi def link rstDelimiter Delimiter
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
188 " TODO: I dunno...
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
189 hi def rstEmphasis term=italic cterm=italic gui=italic
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
190 hi def link rstStrongEmphasis Special
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
191 "term=bold cterm=bold gui=bold
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
192 hi def link rstInterpretedTextOrHyperlinkReference Identifier
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
193 hi def link rstInlineLiteral String
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
194 hi def link rstSubstitutionReference PreProc
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
195 hi def link rstInlineInternalTargets Identifier
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
196 hi def link rstFootnoteReference Identifier
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
197 hi def link rstCitationReference Identifier
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
198 hi def link rstHyperLinkReference Identifier
6675076019ae updated for version 7.0d
vimboss
parents: 809
diff changeset
199 hi def link rstStandaloneHyperlink Identifier
3920
c53344bacabf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
200 hi def link rstCodeBlock String
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202 let b:current_syntax = "rst"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
204 let &cpo = s:cpo_save
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
205 unlet s:cpo_save