RStudio macOS Shortcuts
| Action | macOS Shortcut |
|---|---|
| Run code | |
| Run current line / selection | ⌘Enter |
| Run current chunk | ⌘⇧Enter |
| Source the file | ⌘⇧S |
| Source with echo | ⌘⇧Enter |
| Restart R session | ⌘⇧F10 |
| Insert pipe operator | ⌘⇧M |
| Insert assignment <- | ⌥- |
| Editing | |
| Undo | ⌘Z |
| Redo | ⌘⇧Z |
| Comment / uncomment lines | ⌘⇧C |
| Reindent lines | ⌘I |
| Reformat code | ⌘⇧A |
| Delete line | ⌘D |
| Code completion | Tab |
| Navigation | |
| Go to file / function | ⌘. |
| Go to line | ⇧⌥G |
| Go to definition | F2 |
| Switch to Source | ⌃1 |
| Switch to Console | ⌃2 |
| Find & Help | |
| Find | ⌘F |
| Find in files | ⌘⇧F |
| Help for function | F1 |
| Show keyboard shortcuts | ⌥⇧K |