Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/quarto-dev/quarto-vim
Rmarkdown support for vim
https://github.com/quarto-dev/quarto-vim
Last synced: about 2 months ago
JSON representation
Rmarkdown support for vim
- Host: GitHub
- URL: https://github.com/quarto-dev/quarto-vim
- Owner: quarto-dev
- Fork: true (vim-pandoc/vim-rmarkdown)
- Created: 2022-02-09T11:59:44.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-01-27T15:24:47.000Z (almost 2 years ago)
- Last Synced: 2024-08-04T00:11:36.940Z (5 months ago)
- Language: Vim script
- Size: 30.3 KB
- Stars: 55
- Watchers: 3
- Forks: 11
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-quarto - Vim - [Vim](https://www.vim.org/) plugin to work with Quarto. (Supported editors)
README
quarto-vim
=============[Quarto](https://quarto.org) support for vim.
quarto-vim is a fork of the [vim-rmarkdown](https://github.com/vim-pandoc/vim-rmarkdown) plugin.
quarto-vim currently only handles syntax highlighthing for qmd
files, however we'd very much like to add more of the features
available in the excellent [vim-pandoc](https://githhub.com/vim-pandoc/viv-pandoc)
plugin. If you are interested in contributing please get in
touch by filing an issue or sending a pull request!## Setup
quarto-vim requires the [vim-pandoc-syntax](https://github.com/vim-pandoc/vim-pandoc-syntax) vim plugin.
quarto-vim's repo uses the typical bundle layout, so it's very simple to
install using some plugin manager such as [pathogen](https://github.com/tpope/vim-pathogen), [Vundle](https://github.com/VundleVim/Vundle.vim) or [NeoBundle](https://github.com/Shougo/neobundle.vim). For
example, using Vundle you should add```viml
Plugin 'vim-pandoc/vim-pandoc-syntax'
Plugin 'quarto-dev/quarto-vim'
```to your .vimrc, source it, and execute `:PluginInstall`.
Using [packer.nvim](https://github.com/wbthomason/packer.nvim), you should add
```lua
use({
"quarto-dev/quarto-vim",
requires = {
{"vim-pandoc/vim-pandoc-syntax"},
},
ft = {"quarto"},
})
```
to your `.vimrc` (or `init.lua` in Neovim).## Usage
Files with the .qmd extension are automatically detected as Quarto files and use highlithing rules from vim-pandoc-syntax (in addition to some special rules for Quarto executable code).
### Syntax
quarto-vim extends pandoc's markdown syntax so that:
```{python}
import numpy as np
np.arange(15).reshape(3, 5)
``````{r}
summary(cars)
```
are recognized as Python and R code cells.Inline R is also handled for the knitr engine:
inline unformatted text like `r 1 + 2`
R and Python syntax is used within such fenced codeblocks and inline spans.