diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2023-12-26 19:05:36 +0100 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2023-12-27 10:55:29 +0100 |
| commit | 8492a84bfd4f9f743bd86a34875cc6b82fd0df96 (patch) | |
| tree | 52365999abf8c28dd9a7f91b628a6d44c6284572 /runtime/doc | |
| parent | 6c35fb421e888d0cbdfac07a5ff4579c9be7f0ec (diff) | |
| download | rneovim-8492a84bfd4f9f743bd86a34875cc6b82fd0df96.tar.gz rneovim-8492a84bfd4f9f743bd86a34875cc6b82fd0df96.tar.bz2 rneovim-8492a84bfd4f9f743bd86a34875cc6b82fd0df96.zip | |
vim-patch:9042bd8b09ba
runtime(r): Update R runtime files and docs (vim/vim#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
https://github.com/vim/vim/commit/9042bd8b09bae0051fdf8eb5a57fa4b4420c92a0
Co-authored-by: Jakson Alves de Aquino <jalvesaq@gmail.com>
Diffstat (limited to 'runtime/doc')
| -rw-r--r-- | runtime/doc/filetype.txt | 8 | ||||
| -rw-r--r-- | runtime/doc/indent.txt | 4 | ||||
| -rw-r--r-- | runtime/doc/syntax.txt | 18 |
3 files changed, 24 insertions, 6 deletions
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index 115fc18cc5..96cd0f8ab0 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -735,6 +735,14 @@ To enable this behavior, set the following variable in your vimrc: > let g:rst_style = 1 +RNOWEB *ft-rnoweb-plugin* + +The 'formatexpr' option is set dynamically with different values for R code +and for LaTeX code. If you prefer that 'formatexpr' is not set, add to your +|vimrc|: > + let rnw_dynamic_comments = 0 + + RPM SPEC *ft-spec-plugin* Since the text for this plugin is rather long it has been put in a separate diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt index 1cd5c7b5f5..99467e4b03 100644 --- a/runtime/doc/indent.txt +++ b/runtime/doc/indent.txt @@ -1031,8 +1031,8 @@ r_indent_comment_column, as in the example below: let r_indent_comment_column = 30 < Any code after a line that ends with "<-" is indented. Emacs/ESS does not -indent the code if it is a top level function. If you prefer that the -Vim-R-plugin behaves like Emacs/ESS in this regard, put in your |vimrc|: +indent the code if it is a top-level function. If you prefer a behavior like +Emacs/ESS one in this regard, put in your |vimrc|: > let r_indent_ess_compatible = 1 < diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index cf345d9c96..546e2c15cf 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -2801,10 +2801,20 @@ To highlight R code in knitr chunk headers: > let rmd_syn_hl_chunk = 1 By default, chunks of R code will be highlighted following the rules of R -language. If you want proper syntax highlighting of chunks of other languages, -you should add them to either `markdown_fenced_languages` or -`rmd_fenced_languages`. For example to properly highlight both R and Python, -you may add this to your |vimrc|: > +language. Moreover, whenever the buffer is saved, Vim scans the buffer and +highlights other languages if they are present in new chunks. LaTeX code also +is automatically recognized and highlighted when the buffer is saved. This +behavior can be controlled with the variables `rmd_dynamic_fenced_languages`, +and `rmd_include_latex` whose valid values are: > + let rmd_dynamic_fenced_languages = 0 " No autodetection of languages + let rmd_dynamic_fenced_languages = 1 " Autodetection of languages + let rmd_include_latex = 0 " Don't highlight LaTeX code + let rmd_include_latex = 1 " Autodetect LaTeX code + let rmd_include_latex = 2 " Always include LaTeX highlighting + +If the value of `rmd_dynamic_fenced_languages` is 0, you still can set the +list of languages whose chunks of code should be properly highlighted, as in +the example: > let rmd_fenced_languages = ['r', 'python'] |