Mercurial > vim
annotate runtime/syntax/rrst.vim @ 33956:e0535b3b9d77
runtime(racket): update Racket runtime files (#13693)
Commit: https://github.com/vim/vim/commit/5eb9cb53d619f89251d22299e2cb4f21918d9d38
Author: D. Ben Knoble <ben.knoble+github@gmail.com>
Date: Sat Dec 16 08:24:15 2023 -0500
runtime(racket): update Racket runtime files (https://github.com/vim/vim/issues/13693)
This brings the included Racket runtime files to commit 43bfc87 (update
headers, 2023-12-15) of https://github.com/benknoble/vim-racket. Note
that not all files from that repository are included. (In particular,
the ftdetect script is omitted for now.)
Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 16 Dec 2023 14:30:06 +0100 |
parents | 0ecb909e3249 |
children |
rev | line source |
---|---|
6051 | 1 " reStructured Text with R statements |
2 " Language: reST with R code chunks | |
3 " Maintainer: Alex Zvoleff, azvoleff@mail.sdsu.edu | |
8497
da01d5da2cfa
commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents:
6051
diff
changeset
|
4 " Homepage: https://github.com/jalvesaq/R-Vim-runtime |
14637 | 5 " Last Change: Thu Apr 05, 2018 11:06PM |
6051 | 6 " |
7 " CONFIGURATION: | |
8 " To highlight chunk headers as R code, put in your vimrc: | |
9 " let rrst_syn_hl_chunk = 1 | |
10 | |
8497
da01d5da2cfa
commit https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Christian Brabandt <cb@256bit.org>
parents:
6051
diff
changeset
|
11 if exists("b:current_syntax") |
6051 | 12 finish |
13 endif | |
14 | |
15 " load all of the rst info | |
16 runtime syntax/rst.vim | |
14637 | 17 unlet! b:current_syntax |
6051 | 18 |
19 " load all of the r syntax highlighting rules into @R | |
20 syntax include @R syntax/r.vim | |
21 | |
22 " highlight R chunks | |
23 if exists("g:rrst_syn_hl_chunk") | |
24 " highlight R code inside chunk header | |
25 syntax match rrstChunkDelim "^\.\. {r" contained | |
26 syntax match rrstChunkDelim "}$" contained | |
27 else | |
28 syntax match rrstChunkDelim "^\.\. {r .*}$" contained | |
29 endif | |
30 syntax match rrstChunkDelim "^\.\. \.\.$" contained | |
31 syntax region rrstChunk start="^\.\. {r.*}$" end="^\.\. \.\.$" contains=@R,rrstChunkDelim keepend transparent fold | |
32 | |
33 " also highlight in-line R code | |
34 syntax match rrstInlineDelim "`" contained | |
35 syntax match rrstInlineDelim ":r:" contained | |
36 syntax region rrstInline start=":r: *`" skip=/\\\\\|\\`/ end="`" contains=@R,rrstInlineDelim keepend | |
37 | |
38 hi def link rrstChunkDelim Special | |
39 hi def link rrstInlineDelim Special | |
40 | |
41 let b:current_syntax = "rrst" | |
42 | |
43 " vim: ts=8 sw=2 |