comparison runtime/syntax/rhelp.vim @ 819:23f82b5d2814 v7.0c10

updated for version 7.0c10
author vimboss
date Wed, 05 Apr 2006 20:41:53 +0000
parents 0f9f4761ad9c
children fd1b3406fd1c
comparison
equal deleted inserted replaced
818:1f929f3ca806 819:23f82b5d2814
1 " Vim syntax file 1 " Vim syntax file
2 " Language: R Help File 2 " Language: R Help File
3 " Maintainer: Johannes Ranke <jranke@uni-bremen.de> 3 " Maintainer: Johannes Ranke <jranke@uni-bremen.de>
4 " Last Change: 2006 Mär 06 4 " Last Change: 2006 Apr 05
5 " Version: 0.5 5 " Version: 0.5
6 " Remarks: - Now includes R syntax highlighting in the appropriate 6 " Remarks: - Now includes R syntax highlighting in the appropriate
7 " sections if an r.vim file is in the same directory or in the 7 " sections if an r.vim file is in the same directory or in the
8 " default debian location. 8 " default debian location.
9 " - I didn't yet include any special markup for S4 methods. 9 " - I didn't yet include any special markup for S4 methods.
13 " environment). 13 " environment).
14 " - There is no Latex markup in equations 14 " - There is no Latex markup in equations
15 15
16 " Version Clears: {{{1 16 " Version Clears: {{{1
17 " For version 5.x: Clear all syntax items 17 " For version 5.x: Clear all syntax items
18 " For version 6.x: Quit when a syntax file was already loaded 18 " For version 6.x and 7.x: Quit when a syntax file was already loaded
19 if version < 600 19 if version < 600
20 syntax clear 20 syntax clear
21 elseif exists("b:current_syntax") 21 elseif exists("b:current_syntax")
22 finish 22 finish
23 endif 23 endif
34 " Highlighting of R code using an existing r.vim syntax file if available {{{1 34 " Highlighting of R code using an existing r.vim syntax file if available {{{1
35 let s:syntaxdir = expand("<sfile>:p:h") "look in the directory of this file 35 let s:syntaxdir = expand("<sfile>:p:h") "look in the directory of this file
36 let s:rsyntax = s:syntaxdir . "/r.vim" 36 let s:rsyntax = s:syntaxdir . "/r.vim"
37 if filereadable(s:rsyntax) 37 if filereadable(s:rsyntax)
38 syn include @R <sfile>:p:h/r.vim 38 syn include @R <sfile>:p:h/r.vim
39 elseif filereadable('/usr/share/vim/vim64/syntax/r.vim') "and debian location 39 elseif filereadable('/usr/share/vim/vimcurrent/syntax/r.vim') "and debian location
40 syn include @R /usr/share/vim/vimcurrent/syntax/r.vim 40 syn include @R /usr/share/vim/vimcurrent/syntax/r.vim
41 else 41 else
42 syn match rhelpRComment /\#.*/ "if no r.vim is found, do comments 42 syn match rhelpRComment /\#.*/ "if no r.vim is found, do comments
43 syn cluster R contains=rhelpRComment 43 syn cluster R contains=rhelpRComment
44 endif 44 endif
45 syn region rhelpRcode matchgroup=Delimiter start="\\examples{" matchgroup=Delimiter transparent end=/}/ contains=@R,rhelpSection 45 syn region rhelpRcode matchgroup=Delimiter start="\\examples{" matchgroup=Delimiter transparent end=/}/ contains=@R,rhelpSection
46 syn region rhelpRcode matchgroup=Delimiter start="\\usage{" matchgroup=Delimiter transparent end=/}/ contains=@R,rhelpIdentifier 46 syn region rhelpRcode matchgroup=Delimiter start="\\usage{" matchgroup=Delimiter transparent end=/}/ contains=@R,rhelpIdentifier
47 syn region rhelpRcode matchgroup=Delimiter start="\\synopsis{" matchgroup=Delimiter transparent end=/}/ contains=@R 47 syn region rhelpRcode matchgroup=Delimiter start="\\synopsis{" matchgroup=Delimiter transparent end=/}/ contains=@R
48 syn region rhelpRcode matchgroup=Delimiter start="\\special{" matchgroup=Delimiter transparent end=/}/ contains=@R contained 48 syn region rhelpRcode matchgroup=Delimiter start="\\special{" matchgroup=Delimiter transparent end=/}/ contains=@R contained
49 syn region rhelpRcode matchgroup=Delimiter start="\\code{" matchgroup=Delimiter transparent end=/}/ contains=@R contained 49 syn region rhelpRcode matchgroup=Delimiter start="\\code{" matchgroup=Delimiter transparent end=/}/ contains=@R,rhelpLink contained
50 50
51 " Strings {{{1 51 " Strings {{{1
52 syn region rhelpString start=/"/ end=/"/ 52 syn region rhelpString start=/"/ end=/"/
53 53
54 " Special TeX characters ( \$ \& \% \# \{ \} \_) {{{1 54 " Special characters ( \$ \& \% \# \{ \} \_) {{{1
55 syn match rhelpSpecialChar "\\[$&%#{}_]" 55 syn match rhelpSpecialChar "\\[$&%#{}_]"
56 56
57 " Special Delimiters {{{1 57 " Special Delimiters {{{1
58 syn match rhelpDelimiter "\\cr" 58 syn match rhelpDelimiter "\\cr"
59 syn match rhelpDelimiter "\\tab " 59 syn match rhelpDelimiter "\\tab "