One rule: the line you click is shown at the top of the view you switch to.
Source → Preview: double-click any text in the Markdown editor. The preview opens with that line at the top.
Preview → Source: double-click in the preview. The editor opens with that line at the top.
Position is kept: when you come back to a preview tab, it shows where you were.
Stable with diagrams: for up to 10 seconds after opening, the preview returns to the same line even if Mermaid diagrams or images change the page height. It stops as soon as you scroll.
Nothing is sent outside your computer.
Usage
Open a Markdown (.md) file.
Goal
Action
Open the preview
Double-click text in the editor
Go back to the source
Double-click in the preview
Toggle with the keyboard
Ctrl+Shift+V (the cursor line goes to the top)
Select text in the editor
Drag with the mouse
Please note
Double-click no longer selects a word in Markdown editors. It switches to the preview instead. Drag to select text.
Double-click does nothing on an empty line.
After installing or updating, run Developer: Reload Window if it does not work.
Settings
Setting
Default
Meaning
markdownDoubleClickPreview.doubleClickToPreview
true
Double-click in the editor switches to the preview