Skip to content

Commit 8d856a5

Browse files
simplify things, just let the user follow the instructions on the prompt.
1 parent 02bf622 commit 8d856a5

File tree

2 files changed

+19
-33
lines changed

2 files changed

+19
-33
lines changed

README.Rmd

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,32 +27,26 @@ version](https://www.r-pkg.org/badges/version/styler)](https://cran.r-project.or
2727

2828
The goal of styler is to provide non-invasive pretty-printing of R source code
2929
while adhering to the [tidyverse](https://style.tidyverse.org) formatting rules.
30-
styler can be customized to format code according to other style guides too.
30+
styler can be customized to format code according to other style guides too.
3131

3232
The following online docs are available:
3333

3434
- [latest CRAN release](https://styler.r-lib.org).
3535

3636
- [GitHub development version](https://styler.r-lib.org/dev).
3737

38-
3938
## Installation
4039

4140
You can install the package from CRAN.
4241

4342
```{r, eval = FALSE}
4443
install.packages("styler")
45-
46-
# if you want to benefit from caching, styler will ask you to install R.cache
47-
# if you don't have it already
48-
install.packages("R.cache")
49-
50-
# If you just installed R.cache, you need to authorise it to create a permanent
51-
# caching directory on your computer once.
52-
cache_info() # then type 'y' for Yes.
5344
```
5445

55-
46+
You will be prompted to decide on how to use the [caching
47+
feature](https://styler.r-lib.org/dev/reference/caching.html). See `?caching`
48+
for details, in particular when you don't use styler interactively (i.e. not
49+
from the R prompt or Rstudio Addin, )
5650

5751
Or get the development version from GitHub:
5852

@@ -61,9 +55,6 @@ Or get the development version from GitHub:
6155
remotes::install_github("r-lib/styler")
6256
```
6357

64-
And set up caching the same way as for the CRAN version.
65-
66-
6758
## API
6859

6960
You can style a simple character vector of code with `style_text()`:
@@ -115,10 +106,11 @@ Note that compared to the default used above `scope = "tokens"`:
115106

116107
While spaces still got styled (around `=` in `(x)`).
117108

118-
This was just the tip of the iceberg. To learn more about customization options
119-
with the tidyverse style guide, see the [help file for `tidyverse_style](https://styler.r-lib.org/reference/tidyverse_style.html) for a
120-
quick overview or the
121-
[introductory vignette](https://styler.r-lib.org/articles/introducing_styler.html).
109+
This was just the tip of the iceberg. To learn more about customization options
110+
with the tidyverse style guide, see the [help file for
111+
`tidyverse_style](https://styler.r-lib.org/reference/tidyverse_style.html) for a
112+
quick overview or the [introductory
113+
vignette](https://styler.r-lib.org/articles/introducing_styler.html).
122114

123115
## Features
124116

@@ -127,12 +119,11 @@ quick overview or the
127119
* do not re-style [deliberate code
128120
alignment](https://styler.r-lib.org/articles/detect-alignment.html).
129121

130-
* [ignore some lines](https://styler.r-lib.org/dev/reference/stylerignore.html) for
131-
styling.
132-
133-
* [cache styled expressions](https://styler.r-lib.org/dev/reference/caching.html)
134-
for speed.
122+
* [ignore some lines](https://styler.r-lib.org/dev/reference/stylerignore.html)
123+
for styling.
135124

125+
* [cache styled
126+
expressions](https://styler.r-lib.org/dev/reference/caching.html) for speed.
136127

137128
## Adaption of styler
138129

README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,20 @@ You can install the package from CRAN.
2929

3030
``` r
3131
install.packages("styler")
32-
33-
# if you want to benefit from caching, styler will ask you to install R.cache
34-
# if you don't have it already
35-
install.packages("R.cache")
36-
37-
# If you just installed R.cache, you need to authorise it to create a permanent
38-
# caching directory on your computer once.
39-
cache_info() # then type 'y' for Yes.
4032
```
4133

34+
You will be prompted to decide on how to use the [caching
35+
feature](https://styler.r-lib.org/dev/reference/caching.html). See
36+
`?caching` for details, in particular when you don’t use styler
37+
interactively (i.e. not from the R prompt or Rstudio Addin, )
38+
4239
Or get the development version from GitHub:
4340

4441
``` r
4542
# install.packages("remotes")
4643
remotes::install_github("r-lib/styler")
4744
```
4845

49-
And set up caching the same way as for the CRAN version.
50-
5146
## API
5247

5348
You can style a simple character vector of code with `style_text()`:

0 commit comments

Comments
 (0)