annotate runtime/syntax/rhelp.vim @ 34674:bfd2c0032686 v9.1.0218

patch 9.1.0218: Unnecessary multiplications in backspace code Commit: https://github.com/vim/vim/commit/8ede7a069419e0e01368c65a2d0c79d6332aa6cd Author: zeertzjq <zeertzjq@outlook.com> Date: Thu Mar 28 10:30:08 2024 +0100 patch 9.1.0218: Unnecessary multiplications in backspace code Problem: Unnecessary multiplications in backspace code, as "col / ts * ts" is the same as "col - col % ts". Solution: Change "col / ts * ts" to "col - col % ts". Adjust the loop and the comments ins_bs() to be easier to understand. Update tests to reset 'smarttab' properly. (zeertzjq) closes: #14308 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Thu, 28 Mar 2024 10:45:04 +0100
parents 02bd0fe77c68
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
1 " Vim syntax file
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
2 " Language: R Help File
34375
02bd0fe77c68 runtime(misc): announce adoption of various runtime files
Christian Brabandt <cb@256bit.org>
parents: 9975
diff changeset
3 " Maintainer: This runtime file is looking for a new maintainer.
02bd0fe77c68 runtime(misc): announce adoption of various runtime files
Christian Brabandt <cb@256bit.org>
parents: 9975
diff changeset
4 " Former Maintainers: Jakson Aquino <jalvesaq@gmail.com>
02bd0fe77c68 runtime(misc): announce adoption of various runtime files
Christian Brabandt <cb@256bit.org>
parents: 9975
diff changeset
5 " Johannes Ranke <jranke@uni-bremen.de>
02bd0fe77c68 runtime(misc): announce adoption of various runtime files
Christian Brabandt <cb@256bit.org>
parents: 9975
diff changeset
6 " Former Repository: https://github.com/jalvesaq/R-Vim-runtime
02bd0fe77c68 runtime(misc): announce adoption of various runtime files
Christian Brabandt <cb@256bit.org>
parents: 9975
diff changeset
7 " Last Change: 2016 Jun 28 08:53AM
02bd0fe77c68 runtime(misc): announce adoption of various runtime files
Christian Brabandt <cb@256bit.org>
parents: 9975
diff changeset
8 " 2024 Feb 19 by Vim Project (announce adoption)
2662
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
9 " Remarks: - Includes R syntax highlighting in the appropriate
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
10 " sections if an r.vim file is in the same directory or in the
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
11 " default debian location.
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
12 " - There is no Latex markup in equations
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1621
diff changeset
13 " - Thanks to Will Gray for finding and fixing a bug
8497
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
14 " - No support for \var tag within quoted string
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
15
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
16 " Version Clears: {{{1
8497
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
17 if exists("b:current_syntax")
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
18 finish
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
19 endif
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
20
8497
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
21 scriptencoding utf-8
6051
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
22
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
23 syn case match
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
24
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
25 " R help identifiers {{{1
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
26 syn region rhelpIdentifier matchgroup=rhelpSection start="\\name{" end="}"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
27 syn region rhelpIdentifier matchgroup=rhelpSection start="\\alias{" end="}"
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
28 syn region rhelpIdentifier matchgroup=rhelpSection start="\\pkg{" end="}" contains=rhelpLink
8497
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
29 syn region rhelpIdentifier matchgroup=rhelpSection start="\\CRANpkg{" end="}" contains=rhelpLink
2662
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
30 syn region rhelpIdentifier matchgroup=rhelpSection start="\\method{" end="}" contained
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
31 syn region rhelpIdentifier matchgroup=rhelpSection start="\\Rdversion{" end="}"
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
32
8497
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
33
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
34 " Highlighting of R code using an existing r.vim syntax file if available {{{1
827
fd1b3406fd1c updated for version 7.0d02
vimboss
parents: 819
diff changeset
35 syn include @R syntax/r.vim
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
36
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
37 " Strings {{{1
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
38 syn region rhelpString start=/"/ skip=/\\"/ end=/"/ contains=rhelpSpecialChar,rhelpCodeSpecial,rhelpLink contained
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
39
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
40 " Special characters in R strings
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
41 syn match rhelpCodeSpecial display contained "\\\\\(n\|r\|t\|b\|a\|f\|v\|'\|\"\)\|\\\\"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
42
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
43 " Special characters ( \$ \& \% \# \{ \} \_)
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
44 syn match rhelpSpecialChar "\\[$&%#{}_]"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
45
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
46
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
47 " R code {{{1
842
a209672376fd updated for version 7.0f
vimboss
parents: 827
diff changeset
48 syn match rhelpDots "\\dots" containedin=@R
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
49 syn region rhelpRcode matchgroup=Delimiter start="\\examples{" matchgroup=Delimiter transparent end="}" contains=@R,rhelpLink,rhelpIdentifier,rhelpString,rhelpSpecialChar,rhelpSection
2662
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
50 syn region rhelpRcode matchgroup=Delimiter start="\\usage{" matchgroup=Delimiter transparent end="}" contains=@R,rhelpIdentifier,rhelpS4method
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
51 syn region rhelpRcode matchgroup=Delimiter start="\\synopsis{" matchgroup=Delimiter transparent end="}" contains=@R
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
52 syn region rhelpRcode matchgroup=Delimiter start="\\special{" matchgroup=Delimiter transparent end="}" contains=@R
6051
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
53
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
54 if v:version > 703
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
55 syn region rhelpRcode matchgroup=Delimiter start="\\code{" skip='\\\@1<!{.\{-}\\\@1<!}' transparent end="}" contains=@R,rhelpDots,rhelpString,rhelpSpecialChar,rhelpLink keepend
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
56 else
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
57 syn region rhelpRcode matchgroup=Delimiter start="\\code{" skip='\\\@<!{.\{-}\\\@<!}' transparent end="}" contains=@R,rhelpDots,rhelpString,rhelpSpecialChar,rhelpLink keepend
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
58 endif
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
59 syn region rhelpS4method matchgroup=Delimiter start="\\S4method{.*}(" matchgroup=Delimiter transparent end=")" contains=@R,rhelpDots
2662
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
60 syn region rhelpSexpr matchgroup=Delimiter start="\\Sexpr{" matchgroup=Delimiter transparent end="}" contains=@R
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
61
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
62 " PreProc {{{1
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
63 syn match rhelpPreProc "^#ifdef.*"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
64 syn match rhelpPreProc "^#endif.*"
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
65
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
66 " Special Delimiters {{{1
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
67 syn match rhelpDelimiter "\\cr"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
68 syn match rhelpDelimiter "\\tab "
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
69
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
70 " Keywords {{{1
8497
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
71 syn match rhelpKeyword "\\R\>"
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
72 syn match rhelpKeyword "\\ldots\>"
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
73 syn match rhelpKeyword "\\sspace\>"
842
a209672376fd updated for version 7.0f
vimboss
parents: 827
diff changeset
74 syn match rhelpKeyword "--"
a209672376fd updated for version 7.0f
vimboss
parents: 827
diff changeset
75 syn match rhelpKeyword "---"
8497
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
76
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
77 " Condition Keywords {{{2
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
78 syn match rhelpKeyword "\\if\>"
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
79 syn match rhelpKeyword "\\ifelse\>"
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
80 syn match rhelpKeyword "\\out\>"
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
81 " Examples of usage:
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
82 " \ifelse{latex}{\eqn{p = 5 + 6 - 7 \times 8}}{\eqn{p = 5 + 6 - 7 * 8}}
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
83 " \ifelse{latex}{\out{$\alpha$}}{\ifelse{html}{\out{&alpha;}}{alpha}}
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
84
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
85 " Keywords and operators valid only if in math mode {{{2
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
86 syn match rhelpMathOp "<" contained
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
87 syn match rhelpMathOp ">" contained
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
88 syn match rhelpMathOp "+" contained
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
89 syn match rhelpMathOp "-" contained
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
90 syn match rhelpMathOp "=" contained
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
91
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
92 " Conceal function based on syntax/tex.vim {{{2
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
93 if exists("g:tex_conceal")
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
94 let s:tex_conceal = g:tex_conceal
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
95 else
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
96 let s:tex_conceal = 'gm'
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
97 endif
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
98 function s:HideSymbol(pat, cchar, hide)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
99 if a:hide
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
100 exe "syn match rhelpMathSymb '" . a:pat . "' contained conceal cchar=" . a:cchar
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
101 else
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
102 exe "syn match rhelpMathSymb '" . a:pat . "' contained"
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
103 endif
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
104 endfunction
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
105
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
106 " Math symbols {{{2
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
107 if s:tex_conceal =~ 'm'
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
108 let s:hd = 1
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
109 else
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
110 let s:hd = 0
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
111 endif
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
112 call s:HideSymbol('\\infty\>', '∞', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
113 call s:HideSymbol('\\ge\>', '≥', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
114 call s:HideSymbol('\\le\>', '≤', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
115 call s:HideSymbol('\\prod\>', '∏', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
116 call s:HideSymbol('\\sum\>', '∑', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
117 syn match rhelpMathSymb "\\sqrt\>" contained
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
118
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
119 " Greek letters {{{2
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
120 if s:tex_conceal =~ 'g'
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
121 let s:hd = 1
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
122 else
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
123 let s:hd = 0
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
124 endif
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
125 call s:HideSymbol('\\alpha\>', 'α', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
126 call s:HideSymbol('\\beta\>', 'β', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
127 call s:HideSymbol('\\gamma\>', 'γ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
128 call s:HideSymbol('\\delta\>', 'δ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
129 call s:HideSymbol('\\epsilon\>', 'ϵ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
130 call s:HideSymbol('\\zeta\>', 'ζ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
131 call s:HideSymbol('\\eta\>', 'η', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
132 call s:HideSymbol('\\theta\>', 'θ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
133 call s:HideSymbol('\\iota\>', 'ι', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
134 call s:HideSymbol('\\kappa\>', 'κ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
135 call s:HideSymbol('\\lambda\>', 'λ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
136 call s:HideSymbol('\\mu\>', 'μ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
137 call s:HideSymbol('\\nu\>', 'ν', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
138 call s:HideSymbol('\\xi\>', 'ξ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
139 call s:HideSymbol('\\pi\>', 'π', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
140 call s:HideSymbol('\\rho\>', 'ρ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
141 call s:HideSymbol('\\sigma\>', 'σ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
142 call s:HideSymbol('\\tau\>', 'τ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
143 call s:HideSymbol('\\upsilon\>', 'υ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
144 call s:HideSymbol('\\phi\>', 'ϕ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
145 call s:HideSymbol('\\chi\>', 'χ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
146 call s:HideSymbol('\\psi\>', 'ψ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
147 call s:HideSymbol('\\omega\>', 'ω', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
148 call s:HideSymbol('\\Gamma\>', 'Γ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
149 call s:HideSymbol('\\Delta\>', 'Δ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
150 call s:HideSymbol('\\Theta\>', 'Θ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
151 call s:HideSymbol('\\Lambda\>', 'Λ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
152 call s:HideSymbol('\\Xi\>', 'Ξ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
153 call s:HideSymbol('\\Pi\>', 'Π', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
154 call s:HideSymbol('\\Sigma\>', 'Σ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
155 call s:HideSymbol('\\Upsilon\>', 'Υ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
156 call s:HideSymbol('\\Phi\>', 'Φ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
157 call s:HideSymbol('\\Psi\>', 'Ψ', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
158 call s:HideSymbol('\\Omega\>', 'Ω', s:hd)
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
159 delfunction s:HideSymbol
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
160 " Note: The letters 'omicron', 'Alpha', 'Beta', 'Epsilon', 'Zeta', 'Eta',
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
161 " 'Iota', 'Kappa', 'Mu', 'Nu', 'Omicron', 'Rho', 'Tau' and 'Chi' are listed
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
162 " at src/library/tools/R/Rd2txt.R because they are valid in HTML, although
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
163 " they do not make valid LaTeX code (e.g. &Alpha; versus \Alpha).
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
164
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
165 " Links {{{1
8497
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
166 syn region rhelpLink matchgroup=rhelpType start="\\link{" end="}" contained keepend extend
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
167 syn region rhelpLink matchgroup=rhelpType start="\\link\[.\{-}\]{" end="}" contained keepend extend
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
168 syn region rhelpLink matchgroup=rhelpType start="\\linkS4class{" end="}" contained keepend extend
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
169 syn region rhelpLink matchgroup=rhelpType start="\\url{" end="}" contained keepend extend
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
170 syn region rhelpLink matchgroup=rhelpType start="\\href{" end="}" contained keepend extend
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
171 syn region rhelpLink matchgroup=rhelpType start="\\figure{" end="}" contained keepend extend
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
172
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
173 " Verbatim like {{{1
8497
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
174 syn region rhelpVerbatim matchgroup=rhelpType start="\\samp{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpSpecialChar,rhelpComment
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
175 syn region rhelpVerbatim matchgroup=rhelpType start="\\verb{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpSpecialChar,rhelpComment
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
176
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
177 " Equation {{{1
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
178 syn region rhelpEquation matchgroup=rhelpType start="\\eqn{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpMathSymb,rhelpMathOp,rhelpRegion contained keepend extend
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
179 syn region rhelpEquation matchgroup=rhelpType start="\\deqn{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpMathSymb,rhelpMathOp,rhelpRegion contained keepend extend
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
180
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
181 " Type Styles {{{1
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
182 syn match rhelpType "\\emph\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
183 syn match rhelpType "\\strong\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
184 syn match rhelpType "\\bold\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
185 syn match rhelpType "\\sQuote\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
186 syn match rhelpType "\\dQuote\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
187 syn match rhelpType "\\preformatted\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
188 syn match rhelpType "\\kbd\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
189 syn match rhelpType "\\file\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
190 syn match rhelpType "\\email\>"
8497
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
191 syn match rhelpType "\\enc\>"
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
192 syn match rhelpType "\\var\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
193 syn match rhelpType "\\env\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
194 syn match rhelpType "\\option\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
195 syn match rhelpType "\\command\>"
2662
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
196 syn match rhelpType "\\newcommand\>"
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
197 syn match rhelpType "\\renewcommand\>"
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
198 syn match rhelpType "\\dfn\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
199 syn match rhelpType "\\cite\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
200 syn match rhelpType "\\acronym\>"
8497
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
201 syn match rhelpType "\\doi\>"
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
202
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
203 " rhelp sections {{{1
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
204 syn match rhelpSection "\\encoding\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
205 syn match rhelpSection "\\title\>"
2662
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
206 syn match rhelpSection "\\item\>"
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
207 syn match rhelpSection "\\description\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
208 syn match rhelpSection "\\concept\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
209 syn match rhelpSection "\\arguments\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
210 syn match rhelpSection "\\details\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
211 syn match rhelpSection "\\value\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
212 syn match rhelpSection "\\references\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
213 syn match rhelpSection "\\note\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
214 syn match rhelpSection "\\author\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
215 syn match rhelpSection "\\seealso\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
216 syn match rhelpSection "\\keyword\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
217 syn match rhelpSection "\\docType\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
218 syn match rhelpSection "\\format\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
219 syn match rhelpSection "\\source\>"
2662
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
220 syn match rhelpSection "\\itemize\>"
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
221 syn match rhelpSection "\\describe\>"
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
222 syn match rhelpSection "\\enumerate\>"
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
223 syn match rhelpSection "\\item "
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
224 syn match rhelpSection "\\item$"
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
225 syn match rhelpSection "\\tabular{[lcr]*}"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
226 syn match rhelpSection "\\dontrun\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
227 syn match rhelpSection "\\dontshow\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
228 syn match rhelpSection "\\testonly\>"
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 842
diff changeset
229 syn match rhelpSection "\\donttest\>"
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
230
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
231 " Freely named Sections {{{1
2662
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
232 syn region rhelpFreesec matchgroup=Delimiter start="\\section{" matchgroup=Delimiter transparent end="}"
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
233 syn region rhelpFreesubsec matchgroup=Delimiter start="\\subsection{" matchgroup=Delimiter transparent end="}"
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
234
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
235 syn match rhelpDelimiter "{\|\[\|(\|)\|\]\|}"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
236
842
a209672376fd updated for version 7.0f
vimboss
parents: 827
diff changeset
237 " R help file comments {{{1
2662
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
238 syn match rhelpComment /%.*$/
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
239
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
240 " Error {{{1
8497
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
241 syn region rhelpRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ contains=@Spell,rhelpCodeSpecial,rhelpComment,rhelpDelimiter,rhelpDots,rhelpFreesec,rhelpFreesubsec,rhelpIdentifier,rhelpKeyword,rhelpLink,rhelpPreProc,rhelpRComment,rhelpRcode,rhelpRegion,rhelpS4method,rhelpSection,rhelpSexpr,rhelpSpecialChar,rhelpString,rhelpType,rhelpVerbatim,rhelpEquation
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
242 syn region rhelpRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ contains=@Spell,rhelpCodeSpecial,rhelpComment,rhelpDelimiter,rhelpDots,rhelpFreesec,rhelpFreesubsec,rhelpIdentifier,rhelpKeyword,rhelpLink,rhelpPreProc,rhelpRComment,rhelpRcode,rhelpRegion,rhelpS4method,rhelpSection,rhelpSexpr,rhelpSpecialChar,rhelpString,rhelpType,rhelpVerbatim,rhelpEquation
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
243 syn region rhelpRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ contains=@Spell,rhelpCodeSpecial,rhelpComment,rhelpDelimiter,rhelpDots,rhelpFreesec,rhelpFreesubsec,rhelpIdentifier,rhelpKeyword,rhelpLink,rhelpPreProc,rhelpRComment,rhelpRcode,rhelpRegion,rhelpS4method,rhelpSection,rhelpSexpr,rhelpSpecialChar,rhelpString,rhelpType,rhelpVerbatim,rhelpEquation
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
244 syn match rhelpError /[)\]}]/
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
245 syn match rhelpBraceError /[)}]/ contained
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
246 syn match rhelpCurlyError /[)\]]/ contained
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
247 syn match rhelpParenError /[\]}]/ contained
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
248
6051
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
249 syntax sync match rhelpSyncRcode grouphere rhelpRcode "\\examples{"
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
250
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
251 " Define the default highlighting {{{1
8497
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
252 hi def link rhelpVerbatim String
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
253 hi def link rhelpDelimiter Delimiter
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
254 hi def link rhelpIdentifier Identifier
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
255 hi def link rhelpString String
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
256 hi def link rhelpCodeSpecial Special
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
257 hi def link rhelpKeyword Keyword
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
258 hi def link rhelpDots Keyword
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
259 hi def link rhelpLink Underlined
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
260 hi def link rhelpType Type
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
261 hi def link rhelpSection PreCondit
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
262 hi def link rhelpError Error
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
263 hi def link rhelpBraceError Error
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
264 hi def link rhelpCurlyError Error
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
265 hi def link rhelpParenError Error
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
266 hi def link rhelpPreProc PreProc
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
267 hi def link rhelpDelimiter Delimiter
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
268 hi def link rhelpComment Comment
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
269 hi def link rhelpRComment Comment
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
270 hi def link rhelpSpecialChar SpecialChar
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
271 hi def link rhelpMathSymb Special
da01d5da2cfa commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents: 6051
diff changeset
272 hi def link rhelpMathOp Operator
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
273
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
274 let b:current_syntax = "rhelp"
6051
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
275
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
276 " vim: foldmethod=marker sw=2