align_code: Align code at certain symbols

rs_align_code_at_patternR Documentation

Align code at certain symbols

Description

In selected lines, align code at first occurrence of certain symbol in each row.

Usage

rs_align_code_at_pattern(context = rs_get_context())

rs_addins_options(context = rs_get_context())

rs_align_code(
  at_symbol,
  context = rs_get_context(),
  algorithm = c("selection only", "rows in selection")
)

rs_align_code_at_equal(context = rs_get_context())

rs_align_code_at_arrow(context = rs_get_context())

rs_align_code_at_pipe_operator(context = rs_get_context())

rs_align_code_at_hash(context = rs_get_context())

rs_align_code_at_vertical_bar(context = rs_get_context())

Arguments

context

(class document_context)
Object with context of active RStudio document.

at_symbol

(character)
A regular expression that represents symbol treated as reference for code alignment.

algorithm

(character)
One of "selection only" and "rows in selection".

Note

Inspired by https://github.com/seasmith/AlignAssign.


GegznaV/addins.rs documentation built on May 5, 2023, 11:12 p.m.