R/addin.R

Defines functions boom_addin

boom_addin <- function() {
  # nocov start

  ## fetch context and selection
  context <- rstudioapi::getSourceEditorContext()
  selection <- rstudioapi::primary_selection(context)[["text"]]
  eval.parent(str2lang(paste0("boom::boom(",selection, ")")))
  invisible()
  # nocov end
}
moodymudskipper/boom documentation built on Feb. 10, 2021, 9:40 a.m.