4

Is there a shortcut to jump to a chunk in a R Markdown (on a Mac)? I'm looking for a way to quickly go between one chunk to another.

Will M
  • 692
  • 9
  • 20

4 Answers4

3

I'm not completely sure this is possible on Mac, but in RStudio for Windows you can select to show the «document outline» in the IDE. Not really a shortcut perhaps, but it can easily be used to jump to different named chunks in the R Markdown document by clicking it.

enter image description here

By default, I believe the outline is set to only show «Sections» (i.e. ## Header here), so to enable it to show named chunks, go to Tools -> Global options -> R Markdown -> Show in document outline. Then set it to «Sections and Named Chunks»

enter image description here

henrik_ibsen
  • 763
  • 1
  • 7
  • 16
2

fn + Command + Up/Down works on the latest RStudio. It also jumps to heading sections.

fcdt
  • 2,371
  • 5
  • 14
  • 26
Kene David Nwosu
  • 828
  • 6
  • 12
1

This preference option exists on the Mac desktop RStudio as well.

V Vulpes
  • 11
  • 1
0

Thesedays, there's a popup at the bottom of the source pane that gives an outline view and allows you to select chunks/sections.

Paul
  • 527
  • 5
  • 17