ctags-lang-rmarkdown¶
Random notes about tagging R Markdown source code with Universal Ctags
Version: | 6.0.0 |
---|---|
Manual group: | Universal Ctags |
Manual section: | 7 |
SYNOPSIS¶
DESCRIPTION¶
RMarkdown parser is an exclusive subparser stacked on top of the Markdown parser. It works when:
- the Markdown parser is enabled,
- the
subparser
extra is enabled, and - the RMarkdown parser itself is enabled.
The RMarkdown parser extends the way of detecting codeblocks from the Markdown parser. This extension is for running guest parsers on code chunks.
The Markdown parser expects the following syntax represents codeblocks:
For an example
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.
The parser extracts chunk labels coming after language-name as chunklabel kind objcts. In the exapmle, the RMarkdown parser extracts precalc as a chunklabel kind object. The chunklabel kind is enabled by default.
EXAMPLES¶
“input.rmd”
# Section 1
```{r myblock}
zero_fun <- function () {
return 0
}
```
# Section 2
“output.tags” with “--options=NONE --extras=+{guest} --fields=+KZln -o - input.rmd”