On Ubuntu 12.04, I took to the following steps to install Vim-R-plugin:
- First I had to install timux:
sudo apt-get installl tmux - Having already installed vim-pathogen, I used git to clone to install vim-r-plugin and vim-screen plugin, which is also required:
cd ~/.vim/bundle
git clone git://github.com/vim-scripts/Vim-R-plugin
git clone git://github.com/vim-scripts/Screen-vim---gnu-screentmux
- Then I changed my localleader to “,”, by adding:
let maplocalleader = ",",to my .vimrc file. - Finally I added the following lines to my .Rprofile:
if(interactive()){
library(colorout)
library(setwidth)
library(vimcom)
}
That it, everything works perfectly.
Hi, I am interested in using vim + R. Since I need often to work on a remote machine, a terminal-based R environment is really what I am looking for. The remote server is running Ubuntu 12.04, but I have only a rough knowledge about vim. Can you add some more explanation on your procedure to configure vim? Is it the standard procedure? Do you know where to find a tutorial for using vim-r-plugin?
Thank you,
Andrea
I have exactly the same set up as above except for having installed a newer tmux version from source — I had some trouble with the one in the ubuntu repositories.
As for the r-vim plugin I really recommend the vim-r plugin documentation, it is excellent:
http://www.lepem.ufc.br/jaa/r-plugin.html#r-plugin-use
Andrea, I would also refer to the vim-r-plugin documentation (as svenski did already). It is very extensive and covers everything you need to get started. Which steps in the vim configuration do you have troubles with?
Thank you for your replies
I have followed the steps for the installation and it seems that everything in the procedure worked fine. However I was not able to use the plugin key bindings and to send commands to R when I open a *.R file with vim.
The only thing that I managed is to start a R session, but only via a customization of the key binding, by adding to my .~/vimrc the lines:
and then pressing F2 during the vim session.
I am using a terminal on a OSX machine and I am connected via ssh to a remote Ubuntu server.
Hi, I resolved the problem…
It seems that the commands of the plugin have to be issued in a small time window… You need to input the sequence of letter very fast, otherwise it won’t work…
Hi, how and where do I access this file .Rprofile?
That depends on your platform. On Linux it usually is located in your home directory. ‘vim ~/.Rprofile’ should get you there. I am not sure for windows, maybe this link helps.
Got it.. Thanks