summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Rprofile8
1 files changed, 5 insertions, 3 deletions
diff --git a/Rprofile b/Rprofile
index 5b77822..e3d81d5 100644
--- a/Rprofile
+++ b/Rprofile
@@ -14,7 +14,9 @@ local({
if (interactive()) {
library(colorout)
library(setwidth)
- # vimcom will generally only be installed on boxes where this is necessary
- if (requireNamespace("vimcom")) options(vimcom.verbose = 1)
- # However, vimcom does not get in the way of Nvim-R if it is loaded
+ # Load vimcom only if R was started by vim
+ if(Sys.getenv("VIMRPLUGIN_TMPDIR") != "") {
+ options(vimcom.verbose = 1)
+ library(vimcom)
+ }
}

Contact - Imprint