Last active
May 13, 2020 16:04
-
-
Save pwang2/b1d9499ab8ab90e02d75d679369bd7cc to your computer and use it in GitHub Desktop.
.Rprofile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(colorout) | |
library(lintr) | |
library(styler) | |
grDevices::X11.options(width = 9.5, height = 8, ypos = 1000, xpos = 2800, pointsize = 10) | |
sysname <- Sys.info()[["sysname"]] | |
if (interactive() && sysname == "Linux" && Sys.getenv("DISPLAY") == "") { | |
if (Sys.getenv("TMUX") != "") { | |
options(browser = function(u) system(paste0("tmux new-window 'w3m ", u, "'"))) | |
} else if (Sys.getenv("NVIMR_TMPDIR") != "") { | |
options(browser = function(u) .C("nvimcom_msg_to_nvim", paste0("StartTxtBrowser(\"w3m\", \"", u, "\")"))) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment