Skip to content

Syntax highlight chunk header

Jakson Alves de Aquino edited this page Dec 26, 2022 · 1 revision

By default, Vim will highlight chunk headers of RMarkdown, Quarto and RreStructuredText with a single color. When the code is processed by knitr, chunk headers should contain valid R code and, thus, you may want to highlight them as such. You can do this by putting in your vimrc:

let rrst_syn_hl_chunk = 1
let rmd_syn_hl_chunk = 1