0

Disclaimer: I posted part of this question here with a focus on how to use Emacs+ESS, but a solution with vim or neovim is also of interest to me.


I'm using Debian Stable (currently Buster) to do my programming in GNU R. As an IDE I'm using both Nvim-R (a vim- and neovim- plugin) as well as Emacs+ESS but not Rstudio (although it's a great IDE for getting started).

Since the stability of Debian comes with the price of not having the newest software versions available, I'm on the verge of changing my workflow to not install GNU R on my metal directly but to use a container as an intermediate layer. I'm currently using docker as my virtualization layer with a preconfigured rocker image for that (more precisely the r-base image).

While this works in principle (I'm able to access the R CLI), I'm having an issue: I cannot easily to use my IDEs with that.

I don't want to install vim or Emacs in the container but run this from my machine directly. Using Nvim-R this means that I could use the following trick (which I found here):

let R_app = "docker"

let R_args =['run -it --rm', '-e DISPLAY=$DISPLAY', '-v /tmp/.X11-unix:/tmp/.X11-unix:ro', '--ipc host my-r-image']

But this looks quite inelegant. My question is therefore: is there a more elegant solution how to use Nvim-R with Docker?


Addendum: in my above mentioned first post I included some information on using Tramp for accessing docker using ssh but I'm unsure if such an approach would work for vim or neovim.

2
  • Vim is perfectly capable of editing over ssh using netrw. But, assuming you want the server to run in the container, you'll have to make that happen and make sure it can communicate (looks like a TCP client?) through the container, too.
    – D. Ben Knoble
    Jul 18 at 0:44
  • Re-reading, is your question "this works but seems weird, can I do it better"?
    – D. Ben Knoble
    Jul 18 at 0:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.