Nvim-R icon indicating copy to clipboard operation
Nvim-R copied to clipboard

How to work with vim's `mksession`?

Open kinh-nguyen opened this issue 4 years ago • 2 comments

I'd like to be able to start vim from saved session created with mksession.

Currently, when we save a session with Nvim-R running, reopening that will recover the same layout including an R instance. But Nvim-R would not recognise that R started by vim.

kinh-nguyen avatar Feb 10 '21 11:02 kinh-nguyen

Please, see session "5.5. R must be started by Vim" of Nvim-R's documentation. The communication between Neovim/Vim and R depend on some environment variables having exactly the same value in both applications. Moreover, both must have their TCP servers running (nclientserver on Neovim and nvimcom on R) and both must know the TCP port of each other.

That is, although not impossible, it would not be easy to make mksession to work.

jalvesaq avatar Feb 10 '21 19:02 jalvesaq

I didn't try it yet, but maybe this plugin can be an alternative solution to handle multiple files in vim. If it works with Nvim-R, let us know. https://gitlab.com/nvpm/nvpm

I'd like to be able to start vim from saved session created with mksession.

Currently, when we save a session with Nvim-R running, reopening that will recover the same layout including an R instance. But Nvim-R would not recognise that R started by vim.

SoaresAlisson avatar Nov 27 '21 05:11 SoaresAlisson