rvimremote-accessvim-r

Running remote R session from the local instance of vim


I am using vim-r-plugin to send commands from vim to a running R session (and get back info about object list and auto-completions).

My aim is to get communication between local vim and remote session of R. I manged to send commands to R with screen.vim plugin. However this type of communication was one-way only.

For a while I thought that this is not really possible (or at least not very easy to achieve) however I discovered one site: http://manuals.bioinformatics.ucr.edu/home/programming-in-r/vim-r

The author there mentions accessing remote R sessions from local vim multiple times:

"Flexible code sending options from local vim instances to R sessions on remote machines or among remote machines."

"The vim session can run on a local computer, while the R session can run on the same or a remote system."

However nowhere on that site is there any description telling how to achieve this exactly.

I also asked the same question directly on the gougle-group of vim-r-plugin, and the author replied with an option to run everything remotely: https://groups.google.com/forum/#!topic/vim-r-plugin/293VyyQntZ0 . I managed to do that, but it's not what I am after and I didn't want to bother him any further.

So my question: is it possible? If not directly - maybe there are work-arounds of not having to duplicate my vim configuration on all the remote servers I am using?


Solution

  • Reply after more than half of a year! I tend to agree with others that it is a better idea to run everything remotely. However, this vimdoc may give what you want to achieve: