comparison runtime/doc/syntax.txt @ 34016:34f6f3678cae

runtime(r): Update R runtime files and docs (#13757) Commit: https://github.com/vim/vim/commit/9042bd8b09bae0051fdf8eb5a57fa4b4420c92a0 Author: Jakson Alves de Aquino <jalvesaq@gmail.com> Date: Mon Dec 25 09:22:27 2023 +0000 runtime(r): Update R runtime files and docs (https://github.com/vim/vim/issues/13757) * Update R runtime files - Fix indentation issue with ggplot(). - Setlocal autoindent in indent/r.vim. - New syntax option: rmd_include_latex. - Clear syn iskeyword to recognize _ as keyword. - Document some options. - remove the test has("patch-7.4.1142") - Update changed date of doc files Signed-off-by: Jakson Alves de Aquino <jalvesaq@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org
author Christian Brabandt <cb@256bit.org>
date Mon, 25 Dec 2023 10:30:07 +0100
parents c940c4dab9cf
children 35ac13b339ed
comparison
equal deleted inserted replaced
34015:205e6809b70f 34016:34f6f3678cae
1 *syntax.txt* For Vim version 9.0. Last change: 2023 Dec 20 1 *syntax.txt* For Vim version 9.0. Last change: 2023 Dec 23
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
2840 2840
2841 To highlight R code in knitr chunk headers: > 2841 To highlight R code in knitr chunk headers: >
2842 let rmd_syn_hl_chunk = 1 2842 let rmd_syn_hl_chunk = 1
2843 2843
2844 By default, chunks of R code will be highlighted following the rules of R 2844 By default, chunks of R code will be highlighted following the rules of R
2845 language. If you want proper syntax highlighting of chunks of other languages, 2845 language. Moreover, whenever the buffer is saved, Vim scans the buffer and
2846 you should add them to either `markdown_fenced_languages` or 2846 highlights other languages if they are present in new chunks. LaTeX code also
2847 `rmd_fenced_languages`. For example to properly highlight both R and Python, 2847 is automatically recognized and highlighted when the buffer is saved. This
2848 you may add this to your |vimrc|: > 2848 behavior can be controlled with the variables `rmd_dynamic_fenced_languages`,
2849 and `rmd_include_latex` whose valid values are: >
2850 let rmd_dynamic_fenced_languages = 0 " No autodetection of languages
2851 let rmd_dynamic_fenced_languages = 1 " Autodetection of languages
2852 let rmd_include_latex = 0 " Don't highlight LaTeX code
2853 let rmd_include_latex = 1 " Autodetect LaTeX code
2854 let rmd_include_latex = 2 " Always include LaTeX highlighting
2855
2856 If the value of `rmd_dynamic_fenced_languages` is 0, you still can set the
2857 list of languages whose chunks of code should be properly highlighted, as in
2858 the example: >
2849 let rmd_fenced_languages = ['r', 'python'] 2859 let rmd_fenced_languages = ['r', 'python']
2850 2860
2851 2861
2852 R RESTRUCTURED TEXT *rrst.vim* *ft-rrst-syntax* 2862 R RESTRUCTURED TEXT *rrst.vim* *ft-rrst-syntax*
2853 2863