Skip to content

Commit

Permalink
Eliminate the need of library(vimcom) in Rprofile
Browse files Browse the repository at this point in the history
  • Loading branch information
jalvesaq committed Mar 6, 2016
1 parent 5bb5df8 commit a253b08
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
18 changes: 0 additions & 18 deletions doc/r-plugin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,6 @@ dependencies:

* Perl (required to run `latexmk`).

Add the following lines to your `Rprofile`:
>
options(vimcom.verbose = 1)
if(Sys.getenv("VIMRPLUGIN_TMPDIR") != "")
library(vimcom)
<
If you do not know where your .Rprofile is, do the following command in R
Console to open it:
>
edit(file = "~/.Rprofile")
<

------------------------------------------------------------------------------
3.2. Preliminary system setup on Unix (Linux, Mac OS X, etc)~
Expand Down Expand Up @@ -193,9 +182,6 @@ Put the following lines in your `~/.Rprofile`:
if(interactive()){
library(colorout)
library(setwidth)
options(vimcom.verbose = 1) # optional
if(Sys.getenv("VIMRPLUGIN_TMPDIR") != "")
library(vimcom)
}
<
Before proceeding, you have to start a new shell session to have the alias
Expand Down Expand Up @@ -1760,8 +1746,6 @@ higher value for the variable in your |vimrc|. Example:
>
let vimrplugin_vimcom_wait = 10000
<
Note: You should have the line `library(vimcom)` in your `~/.Rprofile`.


------------------------------------------------------------------------------
*vimrplugin_vim_wd*
Expand Down Expand Up @@ -2587,8 +2571,6 @@ please read this document from the beginning.
# Load the required libraries:
library(colorout)
library(setwidth)
if(Sys.getenv("VIMRPLUGIN_TMPDIR") != "")
library(vimcom)
# Use the text based web browser w3m to navigate through R docs
# in Linux Console after help.start():
Expand Down
6 changes: 6 additions & 0 deletions r-plugin/common_global.vim
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,12 @@ function StartR(whatr)
call writefile([], g:rplugin_tmpdir . "/liblist_" . $VIMINSTANCEID)
call delete(g:rplugin_tmpdir . "/libnames_" . $VIMINSTANCEID)

if $R_DEFAULT_PACKAGES == ""
let $R_DEFAULT_PACKAGES = "datasets,utils,grDevices,graphics,stats,methods,vimcom"
elseif $R_DEFAULT_PACKAGES !~ "vimcom"
let $R_DEFAULT_PACKAGES .= ",vimcom"
endif

if g:vimrplugin_objbr_opendf
let start_options = ['options(vimcom.opendf = TRUE)']
else
Expand Down

0 comments on commit a253b08

Please sign in to comment.