Skip to content

Instantly share code, notes, and snippets.

@lorenzwalthert
Last active July 28, 2018 13:41
Show Gist options
  • Save lorenzwalthert/3ee7a3b794ae3e36188a3b7baff0646e to your computer and use it in GitHub Desktop.
Save lorenzwalthert/3ee7a3b794ae3e36188a3b7baff0646e to your computer and use it in GitHub Desktop.
Styling indention
library(styler)
guide <- tidyverse_style(scope = "line_breaks", indent_by = 8)
guide_with_indention_rules_only <- purrr::modify_at(
guide, 3, ~.x[grepl("indent", names(.x))]
)
styler::style_text(
"call(
x = 2
)
a =3
", transformers = guide_with_indention_rules_only)
#> call(
#> x = 2
#> )
#> a =3
# Created on 2018-07-28 by the [reprex package](http://reprex.tidyverse.org) (v0.2.0).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment