Comments (12)
The Vim-R-plugin documentation has details on how to use Tmux,
including a "sample detachable session". You can run Vim and R in the
remote machine inside Tmux. The Tmux session can be started, detached,
and reattached through ssh from anywhere. I don't use advanced Tmux
features, but I think that you cannot run R in a Tmux session at a
machine and Vim in another Tmux session at another machine and make
the two Tmux sessions communicate with each other.
If you really want to run Vim and R in separate machines, you can try
the following (untested) procedure in a terminal emulator:
- Start Tmux
- Start Vim
- Start R with \rf
- Go to R console pane
- Quit R manually with q()
- Run ssh
- Start R on the remote machine
Note, however that most of the plugin features will no be available.
Perhaps, you will will only be able to send lines to R console. The
object browser, the ability to read R documentation on Vim and other
features which depend on the vimcom package will not work since the
plugin looks for vimcom server on localhost. Moreover, you won't be
able to send a selection of lines, a paragraph etc because temporary
files are written on the local machine to be sourced by R (which would
be on the remote machine).
from vim-r-plugin.
See also on Vim:
:h netrw
from vim-r-plugin.
Thanks for the info, I'll try those out and see which combo works for me.
from vim-r-plugin.
One quick follow up, how would I get the r session to actually start when I'm running R + vim remotely? Currently I duplicated the same setup I'm using on an ubuntu box but on the remote box I'm getting a
"Please, set the variable 'g:vimrplugin_term_cmd' in your .vimrc" error. I'm not sure what terminal I'd set it to since I only have ssh access to the remote box.
from vim-r-plugin.
You have actually found a bug in the Vim-R-plugin. The term_cmd is the
command to start a terminal emulator, but if no terminal emulator will
be started (because either you already are in a terminal emulator and
will split it with tmux or you are on Linux console), then there is no
need to set the value of term_cmd. The error message means that none
of a few terminal emulators that the plugin looks for was found.
Please, put in your vimrc:
let vimrplugin_term_cmd = "xterm -e"
This should circumvent the bug (I will fix it soon).
from vim-r-plugin.
The bug should be fixed now.
from vim-r-plugin.
Hmm, I've tried both options, first by just setting the value to "xterm -e" and then separately trying the updated version of the plugin. In both cases I got the same weird results. Essentially both times when I tried to start R with \rf vim became non responsive and any text i input was written to my terminal, but not to vim or R. Should I be looking for R to start in the background in some way?
from vim-r-plugin.
I'm gonna re-open this issue since I still haven't been able to get R to start through vim on a remote machine. I can also pop open a new issue if you think that would make more sense.
from vim-r-plugin.
Sorry for not replying to your last post, but I'm currently very busy and couldn't look at the issue yet. I think it's better to let this issue open.
from vim-r-plugin.
Just as a note for anybody keeping track at home, I've had some luck with using the conque-shell integration in a tmux session instead of just tmux when working on a remote box.
from vim-r-plugin.
I've improved the detection of errors at the plugin startup. Perhaps you will get a useful error message now when you try to run the plugin remotely.
from vim-r-plugin.
I'm closing the bug because you didn't confirm that it still exists. Please, open it again if it persists.
from vim-r-plugin.
Related Issues (20)
- \aa \ae and echo HOT 4
- Sporadic failures to send code chunks to R HOT 6
- vim-r & vim-markdown Rmd syntax highlighting no longer working HOT 13
- omnicompletion not working in .Rmd, .rnw HOT 11
- E364: Library call failed for "SendToRConsole()" HOT 7
- Rhelp is not working with vimpager HOT 4
- tmux settings have changed HOT 12
- \o not working for some cases. HOT 2
- Clear R console input before send R code from vim HOT 4
- ReplaceUnderS() not compatible with vim macros or repeat insert. HOT 4
- Sending command starting with a - (minus) sign HOT 3
- Ignoring Environment Variables on Windows HOT 9
- Running R code in Roxygen example sections does not work for visual selections HOT 12
- To remove extra spaces in vimrplugin_assign_map HOT 2
- tmux -V not available on OpenBSD HOT 2
- Issue with clipboard HOT 2
- [Regression] StartR fails with vim-r 1.2.9 HOT 2
- Vim-R-plugin was replaced by Nvim-R HOT 3
- Start 'tmux' before Vim. The X Window system is required to run R in an external terminal. HOT 1
- Can't see R documentation and plots HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-r-plugin.