Is there any keyboard shortcut to jump between headers when editing a Markdown file in Visual Studio code? It could be using an extension or (hopefully) without any. I am using MacOS.
Question posted in Visual Studio Code
View the official documentation.
View the official documentation.
3
Answers
You can use the extension Select By and the command
moveby.regex
to move the cursor to the next or begin occurrence of a regex.This jumps to the end of the next sequence of
#
characters or start of previous sequence.You can use the
Go to Symbol in Editor...
command, which on Windows and Linux is bound by default toctrl+shift+o
(not sure what it is on MacOS), and which opens a searchable and clickable selection menu of all the headings for Markdown files. You can also use arrow keys to navigate between entries listed in that menu. You also edit keybindings to your liking.You can also use the breadcrumbs bar (the thing between the tab bar and the editor panel). Just click on one of the heading entries in the breadcrumbs bar to get a popup menu where you can click on any other heading to jump there.
There’s also the outline view (a subsection of the Explorer view), which you can focus with the
Explorer: Focus on Outline View
command, and bind to a keybinding with theoutline.focus
command ID.Your
Outline
view does a very good job of outlining a markdown file. Clicking on the entries takes you to that header. For example:You can show the Outline either by right-clicking the Explorer header and enabling
Outline
or View/Open View/Outline.