R/insertRightAssignment.R

Defines functions insertRightAssignment

Documented in insertRightAssignment

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