diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Rprofile | 20 | ||||
-rwxr-xr-x | install | 2 | ||||
-rw-r--r-- | vimrc | 19 |
4 files changed, 31 insertions, 11 deletions
@@ -1,2 +1,3 @@ bak VimCom +test.R diff --git a/Rprofile b/Rprofile new file mode 100644 index 0000000..5b77822 --- /dev/null +++ b/Rprofile @@ -0,0 +1,20 @@ +options(pdfviewer="okular") +options(browser="firefox") + +# R package repositories +local({ + r <- getOption("repos") + r["CRAN"] <- "https://cran.rstudio.com" + #r["CRAN"] <- "http://cran.at.r-project.org" # if https does not work + #r["eddelbuettel"] <- "https://eddelbuettel.github.io/drat" + #r["ghrr"] <- "https://ghrr.github.io/drat" + options(repos = r) +}) + +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 +} @@ -6,7 +6,7 @@ cd $(dirname $BASH_SOURCE) BASE=$(pwd) # dotfiles to install -for dotfile in bashrc vimrc gitconfig tmux.conf reportbugrc; do +for dotfile in bashrc vimrc gitconfig Rprofile tmux.conf reportbugrc; do mkdir -pv bak [ -e ~/.$dotfile ] && mv -v ~/.$dotfile bak/.$dotfile ln -sfv $BASE/$dotfile ~/.$dotfile @@ -22,25 +22,24 @@ Plug 'jalvesaq/R-Vim-runtime' Plug 'jranke/vim-pandoc', { 'branch': 'rmd' } Plug 'vim-pandoc/vim-pandoc-syntax' " R plugin {{{2 -if !exists("*job_getchannel") - " for vim versions <= 7.4.1453 use the legacy plugin +" for vim versions <= 7.4.1453 use the legacy plugin +if !has('nvim') && !exists("*job_getchannel") Plug 'jcfaria/Vim-R-plugin', { 'commit': 'd726d619f12a10fb5ac7967d373837735cff60f0' } + + let vimrplugin_map_r = 1 " is silent per default, therefore tried + "vnoremap r *@<Esc>:call SendSelectionToR("echo", "down")<CR> + " but this does not work as expected + + let vimrplugin_assign = 0 + let rmd_syn_hl_chunk = 1 "let vimrplugin_vsplit = 0 "let vimrplugin_rconsole_width = 100 - "let vimrplugin_pdfviewer = "/usr/bin/okular" "let vimrplugin_openpdf = 0 - let vimrplugin_assign = 0 "let vimrplugin_objbr_place = "script,left" - let rmd_syn_hl_chunk = 1 - - let vimrplugin_map_r = 1 " is silent per default, therefore tried - "vnoremap r *@<Esc>:call SendSelectionToR("echo", "down")<CR> - " but this does not work as expected else Plug 'jalvesaq/Nvim-R' vmap r <Esc>:call SendSelectionToR("echo", "down")<CR> - "let R_source_args = "print.eval = TRUE" let R_vsplit = 1 let R_assign = 0 endif |