-
Notifications
You must be signed in to change notification settings - Fork 5
/
keyboard-shortcuts.qmd
54 lines (38 loc) · 1.94 KB
/
keyboard-shortcuts.qmd
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
# Keyboard Shortcuts
Keyboard shortcuts tend to make our lives easier. Some that you might already be familiar with in day to day life include quickly saving (Cmd + S or Ctrl + S), or Undo (Cmd + Z or Ctrl + Z).
There are many keyboard shortcuts that you can access in R, this section provides a brief tour of them, and why you might want to use them.
## Overview
* **Teaching** 5 minutes
* **Exercises** 5 minutes
## Questions
* What sort of keyboard shortcuts should I care about?
## Objectives
## Gifs of the action
### render document
### Insert Chunk
### Run Current Chunk
### Jump to
### Create multiple cursors
### Delete the current line
### Un/Comment out a line
### Reformat Section
### Show Keyboard Shortcut Reference
## Table of Common Shortcuts
Below is a small table of tasks you can perform with keyboard
| Action | Windows/Linux | Mac |
|-------------|---------------|----------------|
| Knit document | Ctrl + Shift + K | Cmd + Shift + K |
| Insert Chunk | Ctrl + Alt + I | Cmd + Option + I |
| Run Current Chunk | Ctrl + Alt + C | Cmd + Option + C |
| Jump to Shift+Alt+J | Cmd+Shift+Option+J |
| Show Keyboard Shortcut Reference | Alt+Shift+K | Option+Shift+K |
| Create multiple cursors | Ctrl + Alt + Up/Down | option + control + Up/Down|
| Delete the current line | Ctrl + D | Cmd + D|
| Un/Comment out a line | Ctrl + Shift + C | Cmd + Shift + C|
| Reformat Section | Ctrl + Shift + A | Cmd + Shift + A|
## Further Reading
- The [Rstudio Cheat Sheet](https://rstudio.github.io/cheatsheets/html/rstudio-ide.html#keyboard-shortcuts) has an index of shortcuts.
- This [help file](https://support.posit.co/hc/en-us/articles/206382178-Customizing-Keyboard-Shortcuts-in-the-RStudio-IDE) has a guide to customising keyboard shortcuts.
## Your Turn {.exercise}
- Using the Keyboard Shortcut Reference, find the keyboard shortcut for inserting a pipe character ( %>% or |>)
- Spend 3 minutes practicing these commands in a document.