Add a heading jump for markdown files in the Preview panel. Long README and docs files are hard to move through with line scrolling alone. A heading list lets you jump straight to a section.
Solution
Parse ATX headings (# through ######) from the previewed markdown, show them in a jump overlay indented by level, and scroll the preview to the chosen heading's line on select. Only offer the key when the current file is markdown.
Acceptance criteria
- A Preview key opens a heading list for markdown files and scrolls to the selected heading.
- Headings show their nesting level and preserve document order.
- Fenced code blocks that contain
# lines are not treated as headings.
- The key is listed in
internal/keybindings/keybindings.json and the help overlay.
- Unit tests cover heading extraction, including the code-fence exclusion.
Add a heading jump for markdown files in the Preview panel. Long README and docs files are hard to move through with line scrolling alone. A heading list lets you jump straight to a section.
Solution
Parse ATX headings (
#through######) from the previewed markdown, show them in a jump overlay indented by level, and scroll the preview to the chosen heading's line on select. Only offer the key when the current file is markdown.Acceptance criteria
#lines are not treated as headings.internal/keybindings/keybindings.jsonand the help overlay.