forked from ThinkR-open/remedy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
164 lines (90 loc) · 3.87 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
---
output:
md_document:
variant: gfm
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
[![Travis-CI Build Status](https://travis-ci.org/ThinkR-open/remedy.svg?branch=master)](https://travis-ci.org/ThinkR-open/remedy)[![Coverage status](https://codecov.io/gh/ThinkR-open/remedy/branch/master/graph/badge.svg)](https://codecov.io/github/ThinkR-open/remedy?branch=master)[![Covrpage Summary](https://img.shields.io/badge/covrpage-Last_Build_2018_09_06-brightgreen.svg)](https://github.com/ThinkR-open/remedy/tree/master/tests/README.md)
# remedy
`{remedy}` provides addins to facilitate writing in markdown with RStudio.
![](readme_gif/remedy_example.gif)
All the functions are meant to be mapped to keyboard shortcuts. A list of suggested shortcuts is provided towards the end of this README.
> Note that most of the addins/shortcuts below will also work without selecting any text.
## Install
```{r, eval = FALSE}
devtools::install_github("ThinkR-open/remedy")
```
Once you've installed the package, you don't need to load it with `library()`, the addins are installed on your machine as part of the package install process.
## Using `{remedy}`
Write quicker in markdown with `{remedy}`!
Here's a list of all available helpers:
![](readme_gif/remedy_example.gif)
### Align
Align selected blocks to their assignment operator, either `<-`
![](readme_gif/align.gif)
or `=`
![](readme_gif/alignequal.gif)
### Backtick
Enclose the selected word(s) in backticks.
![](readme_gif/backtick.gif)
### Chunk
Turn the selected text into a chunk.
![](readme_gif/chunck.gif)
### Emphasize
Embolden, italicize or strikethrough the selected text.
![](readme_gif/emphasise.gif)
### Headers
Turn the selected text into a header.
![](readme_gif/header.gif)
### Image
Turn the selected path into an image.
This element is context aware: if you select a text and a link, it turns the text into title between `![]`, and puts the link between `()`.
If the last element of the selection is not a link, you get an error message straight into you markdown document.
![](readme_gif/image.gif)
### LaTeX
LaTeX syntax :
![](readme_gif/latex.gif)
### List
Turn the selected text into an unordered list.
![](readme_gif/list.gif)
### Moving
#### On the right
Copy the selected text or the current line to the right.
![](readme_gif/right.gif)
### Table
Insert a table inside your doc.
There are basically two way to do that with remedy :
#### Empty table
![](readme_gif/table.gif)
#### Parse your data
Turn your dataframe into a markdown table :
![](readme_gif/table_remedy.gif)
### URL
Turn the selected text into a link.
This element is context aware: if you select a text and a link, it turns the text into title between `[]`, and puts the link between `()`.
If the last element of the selection is not a link, you get an error message straight into you markdown document.
![](readme_gif/url.gif)
### xaringan
Insert a xaringan pull-left and pull-right template.
![](readme_gif/xaringan.gif)
## Recommended shortcuts (macOS)
Here's a list of recommended shortcuts:
```{r}
remedy::remedy_opts$get('hotkeys')
```
### Managing Shortcuts
Use the [`{rsam}`](https://github.com/yonicd/rsam) package to set and manage for you the hotkey settings of `{remedy}`.
If you want to edit the default settings you can view the defaults `remedy_opts$get('hotkeys')` and change them through `remedy_opts$set(hotkeys=<NEW_SETTINGS>)`.
```{r, eval = FALSE}
hotkeys <- remedy::remedy_opts$get("hotkeys")
rsam::set_shortcut(sprintf('remedy::%sr',names(hotkeys)), hotkeys)
```
## Feedback and enhancement
You've found a bug, or have an enhancement idea? Feel free to open an issue : [https://github.com/ThinkR-open/remedy/issues](https://github.com/ThinkR-open/remedy/issues).