sponsor Vim development Vim logo Vim Book Ad

Vim-R-plugin : Plugin to work with R

 script karma  Rating 784/242, Downloaded by 15232    Comments, bugs, improvements  Vim wiki

created by
Jakson Aquino
script type
This plugin improves Vim's support for editing R code and makes it possible to integrate Vim with R. The functionality is similar to what you can find in Tinn-R and ESS mode of Emacs. This filetype plugin uses Tmux (Linux, OS X, or other Unix) or Python (Microsoft Windows) or Apple Script (Mac OS X) to send commands to R. The communication with R also depends on the R package vimcom.

Screenshots and Debian package: http://www.lepem.ufc.br/jaa/vim-r-plugin.html
Comments and general questions: https://groups.google.com/forum/#!forum/vim-r-plugin
Development code and bug report: https://github.com/jcfaria/Vim-R-plugin


  * Communication with R.
  * Omni completion (auto-completion) for R objects and function arguments.
  * Ability to see R's documentation in a Vim's buffer.
  * Object Browser.
  * Syntax highlighting for R, RHelp, RMarkdown and RreStructuredText code.
  * Smart indentation for R, RHelp, RMarkdown and RreStructuredText syntax.
  * Most of the plugin's behavior is customizable.

    For a detailed list of features, see: http://www.lepem.ufc.br/jaa/r-plugin.html#r-plugin-features


   See http://www.lepem.ufc.br/jaa/r-plugin.html#r-plugin-use


   See http://www.lepem.ufc.br/jaa/r-plugin.html#r-plugin-files
install details
   See http://www.lepem.ufc.br/jaa/r-plugin.html#r-plugin-installation

    - To avoid version mismatch between Vim-R-plugin and the R package vimcom, you should update one whenever you update the other.

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
Vim-R-plugin.vmb 1.1 2014-11-14 7.4 Jakson Aquino * Version update for Linux/Unix only. May not work on Windows or Mac.
* Minor bug fixes.
* The option vimrplugin_assign now accepts the values 0, 1 and 2.
* SyncTeX support (Evince, Okular and Zathura):
   - New options: vimrplugin_synctex and vimrplugin_vim_window.
   - Deprecated option: vimrplugin_openpdf_quietly
Vim-R-plugin.vmb 1.0 2014-07-02 7.4 Jakson Aquino * The package now depends on vimcom (which is fully featured and is no longer on CRAN).
* Neovim support.
* vimrplugin_openpdf now accepts three values: 0, 1 and 2.
* New command \o evaluates current line in R and inserts the output in the script.
* New options: vimrplugin_vimcom_wait, vimrplugin_vim_wd, and vimrplugin_tmux_title.
* Minor bug fixes.
Vim-R-plugin.vmb 2014-02-01 7.3 Jakson Aquino * Minor bug fixes.
* Delete temporary files on VimLeave event.
* Support to R package slidify (thanks to Michael Lerch).
* New option: vimrplugin_rcomment_string.
Vim-R-plugin.vmb 2013-11-30 7.3 Jakson Aquino * The list of objects for omnicompletion and the list of functions for syntax highlight now are built dynamically. Deprecated commands and options: :RUpdateObjList, :RAddLibToList, vimrplugin_buildwait. New option: vimrplugin_permanent_libs.
* New options: vimrplugin_show_args.
* New command \ch: send to R Console all R code from the first chunk up to this line.
* Remove toolbar icons (they still may be added back manually by interested users).
* If latexmk is installed, use it by default to compile the pdf.
vim-r-plugin- 2013-11-03 7.3 Jakson Aquino * Minor bug fixes.
vim-r-plugin- 2013-10-31 7.3 Jakson Aquino * Minor bug fixes.
vim-r-plugin- 2013-10-12 7.0 Jakson Aquino * Minor bug fixes.
vim-r-plugin- 2013-09-24 7.3 Jakson Aquino * The package now depends on vimcom.plus.
* The support to GNU Screen, VimShell and Conque Shell was dropped. The screen plugin no longer is used.
* The delete command was removed from the Object Browser.
* New options: vimrplugin_vsplit, vimrplugin_rconsole_height and vimrplugin_rconsole_width.
* New option: vimrplugin_restart.
* Show elements of S4 objects in the Object Browser.
vim-r-plugin- 2013-04-11 7.3 Jakson Aquino * New option: vimrplugin_source.
* Minor bug fixes.
vim-r-plugin- 2013-02-01 7.3 Jakson Aquino * Update vimcom version requirement to 0.9-7 (fix incompatibility with tcltk package on Unix).
* Change the default value of vimrplugin_rmhidden to 0.
* New option for Windows: vimrplugin_Rterm.
* New simpler un/comment commands: <LocalLeader>xc and <LocalLeader>xu.
* Remove options vimrplugin_nosingler and vimrplugin_by_vim_instance.
vim-r-plugin- 2012-12-11 7.3 Jakson Aquino * Enable mouse on Tmux again.
vim-r-plugin-0.9.9.zip 0.9.9 2012-12-04 7.3 Jakson Aquino * New commands:  :Rinsert  and  :Rformat.
* Automatically update the Object Browser in GVim.
* On MS Windows, don't raise the R Console before sending CTRL-V to it.
* Search for vimcom in both IPv4 and IPv6 ports (thanks to Zé Loff for writing the patch).
vim-r-plugin-0.9.8.zip 0.9.8 2012-10-13 7.3 Jakson Aquino * Open PDF automatically after processing Rnoweb file if vimrplugin_openpdf = 1 (thanks to Tomaz Ficko for suggesting the feature). Open it quietly if vimrplugin_openpdf_quietly = 1. Open it manually with \op.
* Open HTML automatically after processing either Rmd or Rrst file if vimrplugin_openhtml = 1. Generate strict rst code if vimrplugin_strict_rst = 1.
* Remove option vimrplugin_knitargs.
* Start last R if there is more than one installed on Windows (thanks to Alex Zvoleff for reporting the bug and writing the patch).
* Alex Zvoleff added support to Rrst file type.
* michelk added support to Rmd file type.
* For Rnoweb, Rmd and Rrst file types, CTRL-X CTRL-A completes knitr chunk options if the cursor is inside the chunk header.
* New option: vimrplugin_rmhidden.
* New option: vimrplugin_insert_mode_cmds (thanks to Charles R. Hogg III).
* New command  :RAddLibToList  to add the objects of specific libraries to omnicompletion.
* Thanks to genrich and NagatoPain for other bug fixes and code improvements.
* New option: vimrplugin_assign_map. The option vimrplugin_underscore was renamed to vimrplugin_assign
vim-r-plugin-0.9.7.zip 0.9.7 2012-05-05 7.3 Jakson Aquino * Use the R package vimcom:
     - Automatic update of the Object Browser when running R in a Tmux session.
     - The following options are now set on the vimcom R: allnames, open_df, and open_list.
     - New command in normal and visual modes when on the Object Browser: "d" deletes objects and detach libraries.
     - New option: vimrplugin_ob_sleep.
* New option, vimrplugin_external_ob, to open the Object Browser in a Tmux pane in the external terminal running R.
* New command  :Rhelp (thanks for Nir Atias for suggesting the new feature).
* Remove the command  :RUpdateObjListAll  because Vim may not load the syntax file if it is too big.
* Add support to knitr package.
* New command  :RSourceDir.
* New key bindings \r<Left> and \r<Right>.
* Correctly send selected blocks.
vim-r-plugin-0.9.6.zip 0.9.6 2011-12-13 7.3 Jakson Aquino * Fix path to R source() command on Windows.
* New default value of vimrplugin_vimpager = "tab".
* New default value of vimrplugin_objbr_place = "editor,right"
* Autocompletion of function arguments with <C-X><C-A>.
vim-r-plugin-0.9.5.zip 0.9.5 2011-12-07 7.3 Jakson Aquino * Changed the way that blocks are sent to R.
* Added "terminal" to the list of known terminal emulators (thanks for "i5m" for the patch).
* Use Tmux to start the Object Browser beside the R console if vimrplugin_objbr_place =~ "console".
vim-r-plugin-111114.zip 111114 2011-11-14 7.3 Jakson Aquino * Changed key binding for commenting/uncommenting code from \cc to \xx.
* Added function SendChunkToR() and its corresponding key bindings: \cc, \ce, \cd and \ca (thanks to Xavier Fernández i Marín for suggesting the feature).
* New option (vimrplugin_ca_ck) was created to fix bug reported by Xavier Fernández i Marín: spurious ^A^K being added to lines sent to R.
* Don't blink the menu and toolbar buttons when doing omni completion.
* Use Tmux to run R in an external terminal emulator.
vim-r-plugin-111014.zip 111014 2011-10-14 7.3 Jakson Aquino Fix bug in function that send commands.
vim-r-plugin-111014.zip 111014 2011-10-14 7.3 Jakson Aquino * Fixed spell check bug in R documentation files (.Rd).
* Fixed beep bug when sending commands to R.
* New option: vimrplugin_notmuxconf.
* Fixed bug when starting tmux before vim: the environment variable VIMRPLUGIN_TMPDIR was not being set. Thanks to Michel Lang for reporting the bug and helping to track its source, and thanks to Eric Dewoestine for explaining how to fix the bug.
* Fixed bug in code indentation after unbalanced brackets and parenthesis when r_indent_align_args = 0 (thanks to Chris Neff and Peng Yu for reporting the bugs).
* Really make the use of AppleScript the default on OS X (thanks for Jason for reporting the bug).
vim-r-plugin-110805.zip 110805 2011-08-05 7.3 Jakson Aquino * New option: vimrplugin_tmux.
* Set Tmux as the default instead of either GNU Screen or Conque Shell.
* Document Tmux as the preferred way of running the plugin on Linux.
* Vim-LaTeX-suite plugin can be used with Rnoweb files without any additional configuration. The necessary code was added to the ftplugin/rnoweb.vim.
* Added count argument to normal mode commands gn and gN (thanks to Ivan Bezerra for the suggestion).
vim-r-plugin-110614.zip 110614 2011-06-14 7.3 Jakson Aquino * When doing the command \rh, the plugin tries to show the help for the method corresponding to the class of the object passed as argument to the function. The same with \rp (thanks to Thomas Scheike for suggesting the feature).
* Removed scipt rpager.sh.
* Added script global_r_plugin.vim to allow the use of the plugin with any file type.
vim-r-plugin-110222.zip 110222 2011-02-22 7.3 Jakson Aquino * Added syntax/rhelp.vim.
* New command for rnoweb files: BibTeX current file (\sb).
* New commands for the object browser: open visible lists (\r=) and close visible lists (\r-).
* Reorganization of the GUI menu.
vim-r-plugin-110208.zip 110208 2011-02-08 7.3 Jakson Aquino * Fixed bug in "else if" constructions (thanks to Dan Kelley for reporting the bug).
* Support for commenting/uncommenting lines.
vim-r-plugin-110203.zip 110203 2011-02-03 7.3 Jakson Aquino * Fixed bug in  :RUpdateObjList  when the function arguments included S4 objects (thanks to Gerhard Schöfl for reporting the bug).
* Improvements in indentation of R code (thanks to Dan Kelley for finding and reporting indentation bugs and testing many versions of indent/r.vim).
* New indentation options: r_indent_align_args, r_indent_ess_comments, r_indent_comment_column, and r_indent_ess_compatible.
* New file: indent/rhelp.vim.
vim-r-plugin-110117.zip 110117 2011-01-17 7.3 Jakson Aquino * Fixed indentation bug in Rnoweb files (thanks to Dan Kelley for reporting the bug).
vim-r-plugin-101217.zip 101217 2010-12-17 7.3 Jakson Aquino * Renamed the function SendCmdToScreen to SendCmdToR.
* Clear the current line in the R console before sending a new line.
* Always starts R on the script's directory.
* Don't send "^@$" as part of a paragraph in rnoweb files (thanks to Fabio Correa for reporting the bug).
* More useful warning message when PyWin32 isn't installed.
* Initial support to Apple Script on Mac OS X (thanks to Vincent Nijs for writing and testing the code).
vim-r-plugin-101121.zip 101121 2010-11-21 7.3 Jakson Aquino * Fix for when whoami returns domain name on Windows (thanks to "Si" for fixing the bug).
vim-r-plugin-101118.zip 101118 2010-11-18 7.3 Jakson Aquino * New command:  :RUpdateObjListAll.
* New option: vimrplugin_allnames.
* Allow the use of Python 3.1 on Windows.
* Minor improvements in indentation of R code.
* The file r-plugin/omni_list was renamed to r-plugin/omniList because its field separator changed to ";".
* Fixed bug that was causing ^H to be exhibited in the R documentation in some systems. (Thanks to Helge Liebert for reporting the problem).
vim-r-plugin-101107.zip 101107 2010-11-07 7.3 Jakson Aquino * New feature: complete chunk block when '<' is pressed in rnoweb files.
* New option: vimrplugin_rnowebchunk.
* New key bindings in Normal mode for Rnoweb files: gn (go to next R code chunk) and gN (go to previous R code chunk).
* New command:  :RBuildTags.
* Added fold capability to syntax/r.vim.
* Improved indentation of rnoweb files: thanks to Johannes Tanzler for writing the tex.vim indent script and for permitting its inclusion in the Vim-R-plugin.
* R CMD BATCH now is called with --no-restore --no-save (key binding \ro).
* The file r-plugin/omnilist now has an additional field and was renamed as omni_list.
* Use 64 bit version of R by default on Windows if the directory bin/x64 exists.
* New Windows only option: vimrplugin_i386.
vim-r-plugin-101025.zip 101025 2010-10-25 7.3 Jakson Aquino * New option: vimrplugin_routmorecolors.
* Fixed bug in the object browser when a data.frame or list had just one element (thanks to Jan Larres for reporting the bug).
* Do not copy omnilist and functions.vim to ~/.vim/r-plugin if the directory where the plugin is installed is writable (thanks to Jan Larres for the suggestion).
vim-r-plugin2-101023.zip 101023 2010-10-23 7.3 Jakson Aquino * New options: vimrplugin_objbr_place and vimrplugin_objbr_w.
* New default value: vimrplugin_vimpager = "vertical"
* The R help can now be seen in a Vim buffer on MS Windows.
* Fix width of help text when R version >= 2.12.0.
* Implemented actions in the object browser: summary, print, etc...
* Browse libraries objects in object browser.
vim-r-plugin2-101016.zip 101016 2010-10-16 7.3 Jakson Aquino * Minor bug fixes in the object browser.
vim-r-plugin2-101015.zip 101015 2010-10-15 7.3 Jakson Aquino * New feature: Object browser.
* Conque Shell will be used if installed unless explicitly told otherwise in the vimrc.
* New valid value for vimrplugin_vimpager: "tabnew"

vim-r-plugin2-100923.zip 100923 2010-09-23 7.3 Jakson Aquino * New option: vimrplugin_vimpager.
* Do not let Vim translate "File" in R menu.
* Fixed bug when the option vimrplugin_r_path was used (thanks to Asis Hallab for reporting the bug),
* Fixed bug (E687) when user created custom key binding (thanks to Philippe Glaziou for reporting the bug).
vim-r-plugin2-100917.zip 100917 2010-09-17 7.3 Jakson Aquino * Changed the use of vimrplugin_r_path: now the option includes only the directory part of the path.
* Initial support to Conque Shell plugin. Thanks to "il_principe orange" for suggesting the use of Conque Shell, "ZyX-I" for writing the initial code to use Conque Shell, and Nico Raffo for writing the plugin and additional code to integrate both plugins.
* New options: vimrplugin_conqueplugin and vimrplugin_conquevsplit, vimrplugin_r_args.
* Initial support for Vim-R communication on Windows using Python.
* Fixed bug when the plugin was installed in a directory other than ~/.vim (thanks to Tom Link).
vim-r-plugin2-100825.zip 100825 2010-08-25 7.3 Jakson Aquino * Minor improvements in syntax highlighting.
* New option: vimrplugin_buildwait.
* New option: vimrplugin_r_path (thanks to Asis Hallab).
vim-r-plugin2-100803.zip 100803 2010-08-03 7.0 Jakson Aquino * Fixed bug in .Rsource name making in some systems.
vim-r-plugin2-100801.zip 100801 2010-08-01 7.0 Jakson Aquino * Dropped options vimrplugin_hstart and vimrplugin_browser_time.
* If ~/.vim/r-plugin/functions.vim is not found, try to copy it from  /usr/share/vim/addons/r-plugin/functions.vim.
* Minor bug fixes.
vim-r-plugin2-100730.zip 100730 2010-07-31 7.0 Jakson Aquino * Added menu item and key binding for run "R CMD BATCH" and open the resulting ".Rout" file.
* Fixed bug when more than one Vim instance used the same file to send multiple lines of code to R (thanks to Bart for reporting the bug).
vim-r-plugin2-100728.zip 100728 2010-07-28 7.0 Jakson Aquino * Adapted the code to build a Debian package.
vim-r-plugin2-100719.zip 100719 2010-07-19 7.0 Jakson Aquino * Renamed the directory "tools" and some files.
* Added options vimrplugin_listmethods and vimrplugin_specialplot.
* Improved syntax highlight of R batch output (.Rout files).
* No longer uses the external programs grep, awk and sed to build the additional syntax file containing the list of functions.
vim-r-plugin2-100710.tar.gz 100710 2010-07-10 7.0 Jakson Aquino * Fixed :RUpdateObjList bug when list had length 0.
vim-r-plugin2-100707.tar.gz 100707 2010-07-07 7.0 Jakson Aquino * Fixed 'E329: No menu "R"' when more than one file were loaded simultaneously by calling vim with either -p or -o parameters. Thanks to Peng Yu for reporting the bug.
* Correctly recognize a newly created file with extension ".R" as an R script file.
vim-r-plugin2-100521.tar.gz 100521 2010-05-21 7.0 Jakson Aquino * Replaced "-t" with "--title" to make xfce4-terminal work again.
vim-r-plugin2-100512.tar.gz 100512 2010-05-12 7.0 Jakson Aquino * Thanks to Tortonesi Mauro who wrote a patch to make the plugin work with pathogen.vim.
* Added simple syntax hightlight for .Rout files.
* Increased the time limit of RUpdateObjList to two minutes.
* Improvement in the syntax highlight based on code written by Zhuojun Chen.
* Thanks to Scott Kostyshak who helped to improve the documentation.
* Iago Mosqueira suggested that the plugin should be able to run one R process for each Vim instance, and his suggestion was implemented with the option g:vimrplugin_by_vim_instance.
vim-r-plugin2-091223.tar.gz 091223 2009-12-23 7.0 Jakson Aquino * Changes in omni completion: now using two tags files, one for .GlobalEnv and other for all other environments. The command :RUpdateObjList must be used to update the list of objects that are not in .Globalenv. Arguments of functions are displayed in a scratch window.
* Syntax highlight for R functions. The command :RUpdateObjList must be used to update the list of functions to be highlighted.
vim-r-plugin2-091016.tar.gz 091016 2009-10-16 7.0 Jakson Aquino * The plugin now can run together with screen.vim, thanks to Eric Van Dewoestine, the author of screen.vim, who added script integration to screen.vim.
* Andy Choens has made many improvements on the documentation.
* Added the possibility of custom key binding creation to call any R function with the word under cursor as argument.
* The key bindings related with Sweave are activated even if the file type is not rnoweb.
* Replaced <Leader> with <LocalLeader> in the key bindings.
* Added "Send Paragraph" commands.
vim-r-plugin2-091004.tar.gz 091004 2009-10-05 7.0 Jakson Aquino * José Cláudio Faria has began to work in the project as co-author.
* Some ideas from Tinn-R project were ported to the plugin.
* The main menu has new items and the toolbar new icons.
* Documentation improvements.
vim-r-plugin2-090828.tar.gz 090828 2009-08-28 7.0 Jakson Aquino * Faster startup.
* Better support for Rnoweb files: the cursor goes to '^<<' if the sent line is '^@$'.
vim-r-plugin2-090811.tar.gz 090811 2009-08-12 7.0 Jakson Aquino * Now use screen instead of funnel.pl. The bugs and limitations related with funnel.pl are solved.
* Deleted key binding for R-devel.
* Automatically detect available terminal emulators and choose one of them.
* By default, no longer calls help.start() the first time that <C-H> is pressed.
vim-r-plugin2-090810.tar.gz 090810 2009-08-10 7.0 Jakson Aquino * Added R icons for some terminal emulators.
* Removed the script open-gvim-here. You may use Vim's option autochdir.
* Added option g:vimrplugin_term.
* Improved indentation script.
* Changed key binding from <S-Enter>, which doesn't work in any terminal, to <M-Enter>, which at least works in xterm.
vim-r-plugin2-090610.tar.gz 090610 2009-06-11 7.0 Jakson Aquino The options expandtab, shiftwidth and tabstop are no longer set by the plugin. Better word detection before calling R's help(). Fixed bug in underscore replacement. Fixed small bug in code indentation. Added scipt rpager.sh. Added two new plugin options: no underscore replacement and fixed name for the pipe file instead of random one.
vim-r-plugin2-090523.tar.gz 090523 2009-05-23 7.0 Jakson Aquino * Key bindings now are customizable.
* Default key binding for calling R's args() changed to <S-F1>.
* New R script rargs.R gives better results for generic functions than R's args() called directly.
vim-r-plugin2-090519.tar.gz 090519 2009-05-20 7.0 Jakson Aquino * Don't send large blocks of code to R to avoid xterm freezing.
* Automatically call help.start() after <C-H> is pressed for the first time, and wait 4 seconds for the browser start before calling R's help(). These features are customizable.
* Fixed tags file script.
vim-r-plugin2-090516.tar.gz 090516 2009-05-16 7.0 Jakson Aquino * Added documentation.
* Added ability to send function to R, revert the automatic convertion of "_" into "<-" and call R's help().
* Added archive with some files to ease desktop integration, if desired.
vim-r-plugin2-090507.tar.gz 090507 2009-05-08 7.2 Jakson Aquino Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo