Skip to content

Instantly share code, notes, and snippets.

@pwang2
Last active May 13, 2020 16:04
Show Gist options
  • Save pwang2/b1d9499ab8ab90e02d75d679369bd7cc to your computer and use it in GitHub Desktop.
Save pwang2/b1d9499ab8ab90e02d75d679369bd7cc to your computer and use it in GitHub Desktop.
.Rprofile
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