-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nvim-r does not work with gui MacVim #42
Comments
Unless you have built MacVim yourself, it should not work. The last MacVim release includes Vim patches up to 1553, and Nvim-R requires 1579. However, you should have seen this error message:
|
Hi Jakson, Thanks for the prompt reply. I am using MacVim unstable 7.4.1589 (installed using brew install -HEAD macvim), and both +channel and +job features are enabled (I checked using :version command inside MacVim). I still get the above problem. -Song |
Unfortunately, in this case, I don't know what might be wrong because I don't have access to a Mac OS X. |
I tried Vim unstable + Nvim-R on my Debian stable. The gui vim (gvim) can send R commands without any problem. It seems that the problem is specific to gui MacVim. Hope someone with a Mac OS can figure it out. I will try to solve the problem as well. |
Hi Jakson, Just more information about the same problem. I know that you do not have access to Mac OS, but this information may ring a bell to you or someone else. (1) With Gui MacVim, after I call a R console using ",rf", I cannot send other commands like ",aa", ",rq" etc. And I also cannot use other plugins that use keyboard shortcuts. For example, I have vim-surround, and typing "yss)" is supposed to put () around a line, but now it does not work after I invoked R. I also have nerdcommenter, and typing ",cc" is supposed to comment the current line; it does not work either now. (2) I have set the mapping "vmap RDSendSelection", and "nmap RDSendLine" in my .vimrc. Now the magic is that the space bar still works for sending commands to R, and if I send a command using space bar just once, everything goes back to normal: ",aa" works now, and all other plugins work again. This is a mystery. I think it might be a bug in nvimcom. Hopefully the above phenomena provide you with some useful information. Cheers, |
It looks like the channel is waiting for input, and somewhat blocking input from the keyboard. When the first command in the R Console is executed successfully, nvimcom sends a message to Vim telling Vim to update the syntax highlight of functions. You can see this if you put in your .Rprofile: options(nvimcom.verbose = 4) Then, after starting R, type in the R terminal any valid command, such as the number
|
I tried that. With gui MacVim, I got nvimcom 0.9.14 loaded
then it is stuck there. And Vim is using 160% of CPU. If I type 1 in R console, it gives me When using terminal MacVim I got ... ... If I type 1 in R console, I get This looks like the right behaviour. |
The terminal MacVim seems to be OK. What is missing in gui MacVim is
which means that the What is the output of
after R is started (in both terminal and gui MacVim)? |
The output in terminal MacVim is
The output in gui MacVim is
|
The let R_silent_term = 1 This will switch to the old code that was already used in the Vim-R-plugin, but which I also don't know if works with gui MacVim. |
If I do that, the problem persists and the output of :echo rplugin_jobs is
|
Conclusion: the problem is in the |
Many thanks for your help, Jakson. I totally agree with your conclusion, and will bring this to the MacVim developer. |
It seems the bugs in MacVim were fixed: |
I confirm that Nvim-R is working on MacVim 7.4.1831. However I sometimes (not always) get the following error message after I send some code to R: Cheers, |
I believe it is fixed now: 3c76c67 |
Yes, Jakson. It fixes the issue. Many thanks. |
Thanks! |
I am using the Nvim-R on Mac OS X El Capitan (10.11.3). It works perfectly if I use Neovim or terminal MacVim to open a .R script and send commands to R from there. However, Neovim does not work with the gui version of MaVim. The problem is described as follows:
After openning a .R file from gui MacVim, I used ",rf" to call R console. R was then opened in a separate terminal window. Now the problem started. When I tried to use any command to send code, eg, ",aa", ",rq", etc, nothing was happening in R and I cannot see any command being sent.
Not sure if this is also happening in other operating systems.
The text was updated successfully, but these errors were encountered: