Giter VIP home page Giter VIP logo

Comments (12)

jalvesaq avatar jalvesaq commented on August 24, 2024

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.

jalvesaq avatar jalvesaq commented on August 24, 2024

See also on Vim:

:h netrw

from vim-r-plugin.

dchapsky avatar dchapsky commented on August 24, 2024

Thanks for the info, I'll try those out and see which combo works for me.

from vim-r-plugin.

dchapsky avatar dchapsky commented on August 24, 2024

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.

jalvesaq avatar jalvesaq commented on August 24, 2024

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.

jalvesaq avatar jalvesaq commented on August 24, 2024

The bug should be fixed now.

from vim-r-plugin.

dchapsky avatar dchapsky commented on August 24, 2024

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.

dchapsky avatar dchapsky commented on August 24, 2024

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.

jalvesaq avatar jalvesaq commented on August 24, 2024

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.

dchapsky avatar dchapsky commented on August 24, 2024

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.

jalvesaq avatar jalvesaq commented on August 24, 2024

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.

jalvesaq avatar jalvesaq commented on August 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.