Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hongyuanjia/rmd2ctags
An R script to extract Rmarkdown tags
https://github.com/hongyuanjia/rmd2ctags
Last synced: about 1 month ago
JSON representation
An R script to extract Rmarkdown tags
- Host: GitHub
- URL: https://github.com/hongyuanjia/rmd2ctags
- Owner: hongyuanjia
- License: gpl-3.0
- Created: 2018-11-16T06:50:25.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-16T07:55:26.000Z (about 6 years ago)
- Last Synced: 2024-10-13T19:09:00.344Z (2 months ago)
- Language: R
- Size: 239 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# rmd2ctags
A simple R script to extract Rmarkdown tags to be used with
[tagbar](https://github.com/majutsushi/tagbar/).## Screenshots
![screenshot](figures/screenshot.png)
## Dependencies
- R (and data.table, stringr package)
- [tagbar](https://github.com/majutsushi/tagbar/)## Usage
1. First, install [tagbar](https://github.com/majutsushi/tagbar/)
2. Make sure `Rscript` is in your path
3. Clone this repo or just download `rmd2ctags.R` (and also `rmd2ctags.bat` if you are using Windows)
3. And add this to your .vimrc:
```vim
let g:tagbar_type_rmd = {
\ 'ctagstype':'rmd',
\ 'ctagsbin': 'path/to/rmd2ctags.R',
\ 'ctagsargs':'',
\ 'kinds':['y:yaml:1', 'h:header', 'c:chunk'],
\ 'sro':'&&&',
\ 'kind2scope':{'y':'yaml', 'h':'header', 'c':'chunk'},
\ 'sort':0
\ }
```If you are using Windows, change `ctagsbin` to the path of `rmd2ctags.bat`.
4. In vim, run `:TagbarToggle`.
## License
GPL v3
## Maintainer
Hongyuan Jia ()