diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2016-10-27 14:57:15 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2016-10-27 14:57:15 +0200 |
commit | 5fde8f77e46f2b3156facacbabfc04a60897f769 (patch) | |
tree | 9a90d67440a2dbd3ad605b4daae374058245b235 /Rprofile | |
parent | 1fdd169e954b2d72980dda3849e1617aff40ffc8 (diff) |
Load vimcom only if R was called by vim
@jalvesaq Many thanks for the tip!
Diffstat (limited to 'Rprofile')
-rw-r--r-- | Rprofile | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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) + } } |