R/insert_lines.R

Defines functions rs_insert_line_sw rs_insert_line_ds rs_insert_line_ss

Documented in rs_insert_line_ds rs_insert_line_ss rs_insert_line_sw

# Insert lines ---------------------------------------------------------------

#' Insert various lines
#'
#' Use
#' \code{rs_insert_ss_line()} to insert \code{------};\cr
#' \code{rs_insert_ds_line()} to insert \code{======};\cr
#' \code{rs_insert_dw_line()} to insert \code{~~~~~~} at the cursor position.
#'
#' @param start (numeric) The number of column the line begins at.
#' @param end (numeric) The number of column the line ends at.
#'
#' @name insert_symbol_sequences
#' @export
#' @family 'Insert at cursor position' addins
rs_insert_line_ss <- function(start = rs_get_ind_first_selected_col(), end = 79) {
    rs_insert_symbol_seq("-", start, end)
}

#' @name insert_symbol_sequences
#' @export
rs_insert_line_ds <- function(start = rs_get_ind_first_selected_col(), end = 79) {
    rs_insert_symbol_seq("=", start, end)
}

#' @name insert_symbol_sequences
#' @export
rs_insert_line_sw <- function(start = rs_get_ind_first_selected_col(), end = 79) {
    rs_insert_symbol_seq("~", start, end)
}

Try the spAddins package in your browser

Any scripts or data that you put into this service are public.

spAddins documentation built on Dec. 15, 2017, 1:03 a.m.