| Title: | 'RStudio' Add-Ins for Formatted Section Titles |
|---|---|
| Description: | Provides 'RStudio' add-ins and helper functions for converting the current editor line, or a supplied character string, into formatted section titles for 'R' scripts. When used as an add-in, it uses 'rstudioapi' to read the active document context and replace only the selected line, so users can bind the add-ins to keyboard shortcuts. The formatter trims common comment and heading markers, converts the label to uppercase, and renders three styles: a five-line boxed title, a framed subtitle, and a simple inline header. Generated titles are padded or centered to a configurable width, using the package-specific width option when set and the session display width otherwise, which helps keep analysis scripts visually consistent and easier to navigate. |
| Authors: | Gabriel Curti [aut, cre] |
| Maintainer: | Gabriel Curti <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.1 |
| Built: | 2026-05-18 21:16:41 UTC |
| Source: | https://github.com/cran/bolder |
Formats text using the bolder title styles.
bolder_format_title( text, level = c("title", "subtitle", "simple"), width = bolder_width() )bolder_format_title( text, level = c("title", "subtitle", "simple"), width = bolder_width() )
text |
Text to format as a title. |
level |
Title level: title, subtitle, or simple. |
width |
Total title width. Defaults to |
Set options(bolder.width = 90) to customize the generated title width
for addins and direct calls that use the default width argument.
A character string containing the formatted title.
bolder_format_title("base de dados", "title") bolder_format_title("base de dados", "subtitle") bolder_format_title("base de dados", "simple")bolder_format_title("base de dados", "title") bolder_format_title("base de dados", "subtitle") bolder_format_title("base de dados", "simple")
RStudio addin that replaces the current editor line with a simple inline bolder title.
bolder_simple()bolder_simple()
Invisibly returns the generated replacement string. Called for the side effect of replacing the current editor line in RStudio.
RStudio addin that replaces the current editor line with a centered bolder subtitle.
bolder_subtitle()bolder_subtitle()
Invisibly returns the generated replacement string. Called for the side effect of replacing the current editor line in RStudio.
RStudio addin that replaces the current editor line with a centered bolder title.
bolder_title()bolder_title()
Invisibly returns the generated replacement string. Called for the side effect of replacing the current editor line in RStudio.