R/insertNULLDefault.R

Defines functions insertNULLDefault

Documented in insertNULLDefault

#' Insert `%||%`
#'
#' Inserts [`%||%`][rlang::%||%] at the cursor position.
#'
#' @export
insertNULLDefault <- function() {
    glyph <- paste0("%||%", " ")
    rstudioapi::insertText(ifelse(nextToSpace(), glyph, prefixSpace(glyph)))
}
konradedgar/extraInserts documentation built on Feb. 20, 2023, 3:39 a.m.