CTAGS-LANG-RMARKDOWN(7)
π CTAGS-LANG-RMARKDOWN(7) π
okay bestie, so this is a page from the Universal Ctags manual, and it's all about ctags-lang-rmarkdown β like, the random notes about tagging R Markdown source code with Universal Ctags. it's giving niche but iconic, fr fr. π
β¨ NAME β¨
ctags-lang-rmarkdown β random notes about tagging R Markdown source code with Universal Ctags
πΈ SYNOPSIS πΈ
ctags ...--extras=+{subparser}{guest} --languages=+RMarkdown ...
ctags ...--extras=+{subparser}{guest} --language-force=RMarkdown ...
ctags ...--extras=+{subparser}{guest} --map-RMarkdown=+.rmd ...
π¦ DESCRIPTION π¦
so the RMarkdown parser is an exclusive subparser that's stacked on top of the Markdown parser. it only does its thing when all three of these are true, no cap:
- the Markdown parser is enabled,
- the
subparserextra is enabled, and - the RMarkdown parser itself is enabled.
the RMarkdown parser extends the way of detecting codeblocks from the Markdown parser. and the whole point of that extension? running guest parsers on code chunks. periodt. π
the Markdown parser expects the following syntax to represent codeblocks:
...
for an example:
...
meanwhile the RMarkdown parser accepts the following syntax for code chunks:
...
for an example:
...
give --extras=+{guest} for enabling guest to command line if you want to run proper parsers on lines inside code chunks. literally that's the unlock. π₯
the parser extracts chunk labels coming after language-name as chunklabel kind objects. in the example above, the RMarkdown parser extracts precalc as a chunklabel kind object. and the chunklabel kind is enabled by default, so you don't even gotta ask. π
π EXAMPLES π
"input.rmd"
# Section 1
zero_fun <- function () { return 0 }
# Section 2
"output.tags" with --options=NONE --extras=+{guest} --fields=+KZln -o - input.rmd
Section 1 input.rmd /^# Section 1$/;" chapter line:1 language:Markdown
Section 2 input.rmd /^# Section 2$/;" chapter line:9 language:Markdown
myblock input.rmd /^```{r myblock}$/;" chunklabel line:3 language:RMarkdown
zero_fun input.rmd /^ zero_fun <- function () {$/;" function line:4 language:R
π SEE ALSO π
ctags(1)ctags-client-tools(7)ctags-lang-r(7)- R Markdown: The Definitive Guide <https://bookdown.org/yihui/rmarkdown/>
okay that's the whole page, bestie, you ate it up π this was Universal Ctags version 6.2.1, and the page is CTAGS-LANG-RMARKDOWN(7) β go forth and tag your R Markdown, mwah π«Άβ¨πΈ
π¦ where this page comes from
- alpine 3.24: ctags-doc 6.2.1-r0 Β· GPL-2.0-or-later
- fedora 43: ctags 6.2.1-1.fc43 Β· GPL-2.0-or-later
- fedora 44: ctags 6.2.1-3.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms