Search code examples
windowsrvimlatexsweave

Set up Vim to work with R and Sweave in Windows


I have installed vim in windows and would like to configure it so i can send code to R. I want to also use Sweave with it. However, i have Googled and failed to find clear step-by-step instructions on how to set this up.

my attempts so far:

  1. installed Vim using executable from ftp://ftp.vim.org/pub/vim/pc/gvim73_46.exe
  2. downloaded R-plugin from https://github.com/jcfaria/Vim-R-plugin/zipball/master and extracted it to a folder on my pc. following instructions in the r-plugin.txt file, i installed python-3.2.msi and pywin32-216.1.win32-py3.2exe. I extracted the plugin zip-file to C:\Program Files (x86)\Vim\vimfiles\ merging like-named folders together. then i opened Vim and typed :helptags C:\Program Files (x86)\Vim\vimfiles\doc. I closed Vim then I started R and reopened Vim. I typed :new anewfile.R and got the error message

"Python interface must be enabled to run Vim-R-Plugin. Please do ':h r-plugin-installation details

and when i type this i get

error149, no help for r-plugin-installation

I also did not see the buttons that send code to R.

I failed to understand the instruction that , "You may have to adjust the value of |vimrplugin_sleeptime|."

What should i do? -I already have Miktex 2.9 on my PC. will Vim see it? How do I set up Vim to see Latex? Will appreciate any help.

Note: I have used rstudio with Sweave and also eclipse but there are some issues i need to resolve and hence need to try vim and see how it will work out.


Solution

  • I suppose that this solution will not satisfying you completely but Rstudio IDE features a basic VIm editing mode: Global Option > Code Editing > Enable vim editing mode.