Comments (11)
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.
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.
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.
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.
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.
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.
Accidentally hit "close", sorry about that... O_o
from vim-r-plugin.
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.
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.
I released new versions of Vim-R-plugin and vimcom a few days ago. Do the problem persist?
from vim-r-plugin.
Just tested it, seems that it's working perfectly now! Thanks a lot!
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.