ctags-lang-rmarkdown(7)
β¨ ctags-lang-rmarkdown β¨
okay bestie, welcome to the R Markdown corner of the Universal Ctags universe π
this is the ctags-lang-rmarkdown manual, aka all the random notes you need about tagging R Markdown source code with Universal Ctags. no cap, it's a whole vibe.
πΈ SYNOPSIS πΈ
ctags ...--extras=+{subparser}{guest} --languages=+RMarkdown ...
ctags ...--extras=+{subparser}{guest} --language-force=RMarkdown ...
ctags ...--extras=+{subparser}{guest} --map-RMarkdown=+.rmd ...
like, those three dots in the middle? yeah they're literally in there, keep them. π«Ά
π DESCRIPTION π
So the RMarkdown parser? It's an exclusive subparser stacked on top of the Markdown parser. main character energy fr. It only does its thing when all three of these are true:
- the Markdown parser is enabled,
- the
subparserextra is enabled, and - the RMarkdown parser itself is enabled.
The RMarkdown parser levels up the way the Markdown parser detects codeblocks. This glow-up exists so you can run guest parsers on code chunks. π
Now, the Markdown parser expects this syntax for codeblocks:
...
for example:
...
but the RMarkdown parser is not like other girls β she accepts this syntax for code chunks:
...
for example:
...
If you want proper parsers actually running on the lines inside your code chunks, pass --extras=+{guest} on the command line. periodt.
The parser pulls the chunk labels that come right after language-name and turns them into chunklabel kind objects. In that example up there, the RMarkdown parser extracts precalc as a chunklabel kind object. and good news: the chunklabel kind is enabled by default. slay. π
π¦ EXAMPLES π¦
okay so here's "input.rmd":
# Section 1
zero_fun <- function () { return 0 }
# Section 2
and here's "output.tags", generated 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
look at those kinds go, we love a chapter, a chunklabel, and a function all showing up in the same tags file π₯
π SEE ALSO π
ctags(1)ctags-client-tools(7)ctags-lang-r(7)- R Markdown: The Definitive Guide <https://bookdown.org/yihui/rmarkdown/>
and that's the whole page bestie, you ate it π this was ctags-lang-rmarkdown, version 6.2.1, part of the Universal Ctags fam β go tag something iconic, ily, bye π¦β¨π
π¦ where this page comes from
- ubuntu resolute: universal-ctags 6.2.1-1 Β· GPL-2.0-or-later
- ubuntu stonking: universal-ctags 6.2.1-1 Β· 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