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)))
}
konradzdeb/extraInserts documentation built on Feb. 20, 2023, 7:56 p.m.