-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
67 lines (45 loc) · 2.83 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# profiles
<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
<!-- badges: end -->
The goal of \{profiles\} is to allow users to create and quickly switch between different RStudio "profiles." Profiles control various user preferences ranging from editor appearance (e.g., color theme, font, font size, zoom level, pane layout), dictionaries, and key bindings. This ability is particularly useful when different configurations would be useful at different times. For example, I use a heavily customized version of RStudio when doing my own coding; however, when teaching in R, I often want to revert back to the default configuration and increase the zoom level and font size. Using \{profiles\}, I can save profiles for `"working"` and `"teaching"` and swap between them with the click of a button.
## Installation
You can install the development version of profiles from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("jmgirard/profiles")
```
## Example
### Functions
To create a new profile, first configure your RStudio however you like (using Tools > Global Options...). Then use `save_profile()` to save the current configuration for later use. We can name it something like `"working"` to help us remember it.
```{r, eval=FALSE}
save_profile("working")
```
Then, let's say you want to do some teaching. You can use `default_profile()` to quickly jump back to the RStudio default configuration.
```{r, eval=FALSE}
default_profile()
```
Then I can adjust this to my liking, perhaps increasing the zoom level and font size. If I know I will be teaching again later, I can save this profile as well with the name `"teaching"`.
```{r, eval=FALSE}
save_profile("teaching")
```
Finally, after teaching is done, you might want to jump back into work. You can use `open_profile()` to quickly jump back into a previously saved configuration, such as `"working"`.
```{r, eval=FALSE}
open_profile("working")
```
If you ever want to check which profiles are available for the current user, you can use `list_profiles()` and this will print all profile names to the console. If you are done with a profile, you can also remove it by providing that profile's name to `remove_profile()` .
### Addin
For even easier access to these functions, each has an associated option under the RStudio Addins menu. They work the same way as the functions but will prompt you for the profile names via modal windows.
![Addin screenshot](https://i.imgur.com/5wYfA1q.png)