{"id":15178692,"url":"https://github.com/davidfoord1/rstudiovim","last_synced_at":"2026-02-13T09:29:23.528Z","repository":{"id":248230670,"uuid":"827956703","full_name":"davidfoord1/rstudiovim","owner":"davidfoord1","description":"R package to apply a Vim config for the RStudio source editor","archived":false,"fork":false,"pushed_at":"2024-07-26T12:06:21.000Z","size":3749,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T19:23:59.689Z","etag":null,"topics":["r","rstudio","vim","vimrc"],"latest_commit_sha":null,"homepage":"https://davidfoord1.github.io/rstudiovim/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidfoord1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-12T18:46:37.000Z","updated_at":"2024-12-04T07:35:53.000Z","dependencies_parsed_at":"2024-07-26T13:28:04.926Z","dependency_job_id":null,"html_url":"https://github.com/davidfoord1/rstudiovim","commit_stats":{"total_commits":65,"total_committers":1,"mean_commits":65.0,"dds":0.0,"last_synced_commit":"23450a2d9f9f3c27d5f0a8690ae31696454f3d98"},"previous_names":["davidfoord1/rstudiovim"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davidfoord1/rstudiovim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidfoord1%2Frstudiovim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidfoord1%2Frstudiovim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidfoord1%2Frstudiovim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidfoord1%2Frstudiovim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidfoord1","download_url":"https://codeload.github.com/davidfoord1/rstudiovim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidfoord1%2Frstudiovim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278259588,"owners_count":25957513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["r","rstudio","vim","vimrc"],"created_at":"2024-09-27T15:21:36.303Z","updated_at":"2025-10-04T03:28:50.837Z","avatar_url":"https://github.com/davidfoord1.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rstudiovim\n\n\u003c!-- badges: start --\u003e\n[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)\n[![Windows-R-CMD-check](https://github.com/davidfoord1/rstudiovim/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/davidfoord1/rstudiovim/actions/workflows/R-CMD-check.yaml)\n\u003c!-- badges: end --\u003e\n\n## Configure RStudio Vim key bindings ⌨️\n\nRStudio supports Vim key bindings in the source editor, but \n[doesn't support a Vim config](https://github.com/rstudio/rstudio/issues/7350).\n{rstudiovim} offers a 🪟 **Windows-only** workaround by reading Vim commands from \na file and simulating key presses to execute them on your behalf.\n\nOk, slow down a moment. If you're here, you should probably be seriously\nconsidering using a different editor, with more comprehensive and configurable\nVim features. Perhaps check out [Neovim](https://neovim.io/) with\n[R.nvim](https://github.com/R-nvim/R.nvim) or\n[quarto-nvim](https://github.com/quarto-dev/quarto-nvim). \nTo be clear, this package is **not** a neat RStudio API integration with its Vim\nmode, there is no such option. This is just: you list what buttons you want\npressed; the buttons are pressed automatically for you. Nonetheless, it kind of\nworks, so you are welcome to go crazy with me...\n\n## Overview\n\nInstall and load the package:\n``` r\n# install.packages(\"remotes\")\nremotes::install_github(\"davidfoord1/rstudiovim\")\n# load and attach:\nlibrary(rstudiovim)\n```\n\nCreate and edit a config file (`.vimrc`) with a Vim command on each line. Edit\nat the suggested path:\n\n``` r\nfile.edit(rsvim_default_path())\n```\n\nUse Vim commands like `map`, `imap`, `nmap` and their `noremap` variants in the\nfile to create new key bindings. Each command must be on its own line. You can\nadd comment lines by preceding them with double quotes `\"` like so:\n\n```vim\n\" home-row exit from insert mode\nimap jk \u003cEsc\u003e\n\n```\n\nYou can then execute all the commands in the file with one function call and\nthey will persist for the RStudio session. Then you execute these commands at\nthe start of every RStudio session with the following in your\n[`.Rprofile`](https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/Startup):\n\n```r\nif (interactive())  {\n  rstudiovim::rsvim_exec_file(rprofile = TRUE)\n}\n```\n### Config in the cloud ☁️\n\nThe `rsvim_exec_file()` points by default to the `rsvim_default_path()` path, \nbut you can use any text file or connection object containing your Vim commands.\nFor instance you can use a web location to easily share the config between\nmachines, like this to execute the example [basic vimrc](https://github.com/davidfoord1/rstudiovim/blob/main/inst/basic.vimrc):\n\n```r\nrsvim_exec_file(\"https://raw.github.com/davidfoord1/rstudiovim/main/inst/basic.vimrc\")\n```\n\n### Conditions for success. 📃\n\n1. You're using RStudio on Windows.\n2. Setting `Keybinding set for editor` must be Vim (of course!).\n3. **A file must be open in the source editor**, so that you could execute Vim \ncommands if you navigated to source yourself. It must be a file tab at the front,\nnot a non-file tab like a `View()` pane.\n4. Don't give inputs while the button presses are being executed as you can \ninterrupt it.\n\n\nSee `vignette(\"rstudiovim\")` for a more detailed introduction.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidfoord1%2Frstudiovim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidfoord1%2Frstudiovim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidfoord1%2Frstudiovim/lists"}