Known Bugs and Workarounds - jamespeapen/Nvim-R GitHub Wiki
Known bugs that will not be fixed are listed in this section. Some of them can not be fixed because they depend on missing features in either R or Vim; others would be very time consuming to fix without breaking anything.
R must be started by Vim
The communication between Vim and R will work only if R was started by the
running Vim instance through the <LocalLeader>rf command. If you use Nvim-R to
start R in an external terminal and, then close Vim and open it again, there
will be no communication between R and the new Vim instance.
Please see the explanation on the communication between Vim and R at the end of https://github.com/jalvesaq/Nvim-R/blob/master/README.md
R's source() issues
The R's source() function of the base package prints an extra new line
between commands if the option echo = TRUE, and error and warning messages are
printed only after the entire code is sourced. This makes it more difficult to
find errors in the code sent to R. Details:
https://stat.ethz.ch/pipermail/r-devel/2012-December/065352.html
The menu may not reflect some of your custom key bindings
If you have created a custom key binding for Nvim-R, the menu in GVim will not always reflect the correct key binding if it is not the same for Normal, Visual and Insert modes.
Functions are not always correctly sent to R
The plugin is only capable of recognizing functions defined using the <-
operator. Also, only the current function scope is sent to R.
See: https://github.com/jalvesaq/Nvim-R/issues/34
Wrong message that "R is busy" (Windows only)
On Windows, when code is sent from Vim to R Console, the nvimcom library
sets the value of the internal variable r_is_busy to 1. The value is set
back to 0 when any code is successfully evaluated. If you send invalid code to
R, there will be no successful evaluation of code and, thus, the value of
r_is_busy will remain set to 1. Then, if you try to update the object
browser, see the R documentation for any function, or do other tasks that
require the hidden evaluation of code by R, the nvimcom library will refuse to
do the tasks to avoid any risk of corrupting R's memory. It will tell Vim
that "R is busy" and Vim will display this message. Everything should work
as expected again after any valid code is executed in the R Console.
Error if there is no package installed (Neovim on Windows only)
On Windows, Neovim fails to recognize that a directory is not writable, and
this is required by Nvim-R to detect if it is necessary to create the
directory defined by $R_LIBS_USER environment variable. Consequently, Nvim-R
does no try to create the directory and nvimcom installation fails. This
problem will happen if you have just installed or upgraded R. The workaround
is to manually open R and install any package with the install.packages()
command before using Nvim-R.
~/.Rprofile should not output anything (Windows only)
The compilation of nvimcom during R startup will fail on Windows if your
~/.Rprofile outputs anything. Example of how to replicate the bug:
print("Hello bug!")
You can't put syntax enable in your init.vim (OS X only)
It seems that if you put the command syntax enable in your init.vim on OS X,
file type plugins are immediately sourced. Consequently, some Nvim-R variables
(R_disable_cmds, and R_user_maps_only) will be used at their default values
even if their values have been set in the init.vim. The workaround is do not
include the superfluous command syntax enable in the init.vim. For details,
please, access: https://github.com/jalvesaq/Nvim-R/issues/668