Giter VIP home page Giter VIP logo

Comments (11)

jalvesaq avatar jalvesaq commented on June 23, 2024

You have to install and load the vimcom package. If you are using a
released version of the Vim-R-plugin, you should install vimcom with
the install.packages() function:

install.packages("vimcom")

If you are using the development version of the Vim-R-plugin available
on github, you should use the development version of vimcom:
https://github.com/jalvesaq/VimCom

Once installed, load it:

library(vimcom)

from vim-r-plugin.

mzec avatar mzec commented on June 23, 2024

I have the vimcom package installed. I'm using the released Vim-R-Plugin version 0.9.7 and I've tried VimCom package versions 0.9-2 and 0.9-3, the problem persists. I only get the error a single time when using autocompletion after having executed some lines from vim.

from vim-r-plugin.

jalvesaq avatar jalvesaq commented on June 23, 2024

You must use vimcom 0.9-2 because this is the version that matches
Vim-R-plugin 0.9.7.

The message "VimCom Port not found" means that either the vimcom
package wasn't loaded or the server created in R by vimcom wasn't
detected by Vim. This is the cause of the problem because the variable
g:rplugin_lastrpl is created when a reply from vimcom server is
received by Vim.

Could you please put in your ~/.Rprofile:

options(vimcom.verbose = 1)
library(vimcom)

When starting R, the message "vimcom 0.9-2 loaded" should be printed
in R console. If you doesn't see this message, then vimcom wasn't
loaded.

If it's loaded but the problem persists, then, please change the value
of vimcom.verbose to 3 and report the messages printed in the R
console.

from vim-r-plugin.

mzec avatar mzec commented on June 23, 2024

OK, I have r-plugin 0.9.7 and vimcom 0.9-2 installed. I have added the line options(vimcom.verbose = 1) to .Rprofile in addition to library(vimcom) and the message that it is loaded doesn't appear. The package manager, however, reports that it is loaded and the contents of the package are present (I've tried calling the functions from the console just to check if they're there).

Omnicompletion does eventually happen as normal, but only after displaying the error messages and freezing for some 30 seconds or so.

This ONLY happens a single time after running some code from the editor, for example with leader-ss or leader-d. After this it works ok, until I run some code again.

I tried setting vimcom.verbose to 3, the R console doesn't output anywhing.

Thanks for your patience, by the way!

from vim-r-plugin.

jalvesaq avatar jalvesaq commented on June 23, 2024

I don't know what's causing the problem... What's your operating
system? What happens if instead of loading vimcom in the .Rprofile you
load it manually after starting R? Did you start R through Vim by
typing the \rf command?

from vim-r-plugin.

mzec avatar mzec commented on June 23, 2024

I'm using macOS 10.8.1 and R 2.15.1 from the GUI (R64.app, version 1.52). MacVim snapshot 65 has this issue. I just tried replicating it in the terminal vim + screen and it works okay, without problems or bugs. I guess it could be a problem with the R GUI or MacVim.

With MacVim + R64 GUI the issue persists regardless of whether I start with \rf or manually and regardless of whether I load the vimcom library with the .Rprofile or manually.

from vim-r-plugin.

mzec avatar mzec commented on June 23, 2024

Accidentally hit "close", sorry about that... O_o

from vim-r-plugin.

mzec avatar mzec commented on June 23, 2024

Okay, some more info. The vimcom verbose option doesn't seem to work in my R GUI on the mac. I tried playing around with R in the terminal. If I use terminal vim and open R with \rf, the message vimcom 0.9-2 loaded appears and everything works fine. If I just run R from the terminal command line, the message vimcom: environment variable VIMRPLUGIN_TMPDIR not found. appears in the R console.

Hope this helps :)

from vim-r-plugin.

jalvesaq avatar jalvesaq commented on June 23, 2024

Thanks for the feedback!

I can't help about R GUI on the Mac because I don't have a Mac to make tests. We have to wait until someone posts the solution.

The message "environment variable VIMRPLUGIN_TMPDIR not found" means that vimcom doesn't know where to write temporary files to be read by the Vim-R-plugin. I have to change the message to something more useful for users. Perhaps: "It seems that R was not started by Vim. The communication with Vim-R-plugin will not work."

from vim-r-plugin.

jalvesaq avatar jalvesaq commented on June 23, 2024

I released new versions of Vim-R-plugin and vimcom a few days ago. Do the problem persist?

from vim-r-plugin.

mzec avatar mzec commented on June 23, 2024

Just tested it, seems that it's working perfectly now! Thanks a lot!

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.