Skip to content
James Eapen edited this page Mar 5, 2024 · 29 revisions

Welcome to the Nvim-R wiki!

This is a markdown version of the official documentation. I have tried to hyperlink all references to sections within the documentation. Any that are still enclosed in pipes (eg: see |packages| for details) refer to the vim help and can be accessed from vim (:h packages). If there are any Nvim-R documentation links that have not been set or are broken, please open an issue in this repo.

Authors

Version: 0.9.20

For Neovim >= 0.6.0 and Vim >= 8.2.84

Overview

This plugin improves the support for editing R code in Vim. It is available at https://github.com/jalvesaq/Nvim-R/.

Feedback is welcomed. Please submit bug reports to the developers. Do not like a feature? Tell us and we may add an option to disable it.

The plugin should emit useful warnings if you do things it was not programmed to deal with. Please report critical bugs to: https://github.com/jalvesaq/Nvim-R/issues

Pull requests fixing bugs are welcome.

Main features

  • Additional syntax highlighting for R code, including:

    • Functions of loaded packages
    • Special highlighting for R output (.Rout files)
  • Integrated communication with R:

    • Start/Close R
    • Send lines, selection, paragraphs, functions, blocks, entire file
    • Send commands with the object under cursor as argument: help, args, plot, print, str, summary, example, names
    • Send to R the Sweave, knit and pdflatex commands
  • Omni completion of:

    • R objects (.globalEnv and loaded packages).
    • function arguments (if R is running).
    • knitr chunk options.
    • Quarto cell options.
  • Limited support for debugging R functions

  • Ability to see R's documentation in an editor buffer:

  • Automatic calculation of the best layout of the R documentation buffer (split the window either horizontally or vertically according to the available room)

  • Automatic formatting of the text to fit the panel width

  • Send code and commands to R (useful to run examples)

  • Jump to another R documentation

  • Syntax highlighting of R documentation

  • Object Browser (.GlobalEnv and loaded packages):

    • Send commands with the object under cursor as argument
    • Call R's help() with the object under cursor as argument
    • Syntax highlighting of the Object Browser
  • SyncTeX support for Rnoweb.

  • Most of the plugin's behavior is customizable