summaryrefslogtreecommitdiff
path: root/Rprofile
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2016-10-27 14:57:15 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2016-10-27 14:57:15 +0200
commit5fde8f77e46f2b3156facacbabfc04a60897f769 (patch)
tree9a90d67440a2dbd3ad605b4daae374058245b235 /Rprofile
parent1fdd169e954b2d72980dda3849e1617aff40ffc8 (diff)
Load vimcom only if R was called by vim
@jalvesaq Many thanks for the tip!
Diffstat (limited to 'Rprofile')
-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