Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Markdown Double Click PreviewNew to Visual Studio Code? Get it now.
Markdown Double Click Preview

Markdown Double Click Preview

microfund

|
2 installs
| (0) | Free
Double-click to switch between a Markdown file and its preview. The line you clicked appears at the top of the other view.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Markdown Double Click Preview

Double-click to switch between a Markdown file and its preview. The line you clicked appears at the top of the other view.

日本語の説明はこちら

Features

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
markdownDoubleClickPreview.cursorLineAtTopInEditor true When returning from the preview, show the cursor line at the top of the editor
markdownDoubleClickPreview.reloadOnRequest true Reload the window when the file ~/.markdown-double-click-preview/reload-request is newly written (a hook for scripts that update the extension)

This extension also turns on the built-in setting markdown.preview.doubleClickToSwitchToEditor.

Requirements

  • VS Code 1.90 or later
  • Works with the built-in Markdown preview
  • Works in Remote-SSH (runs on the remote side)

License

MIT


日本語

マークダウンの元の字とプレビューを、ダブルクリックで切り替えます。 クリックした行が、切り替えた先の画面のいちばん上に出ます。

できること

決まりは 1つ: クリックした所が、切り替えた先の画面のいちばん上に出る。

  • 元の字 → プレビュー: 元の字の画面で字をダブルクリックすると、その行からプレビューが開く
  • プレビュー → 元の字: プレビューでダブルクリックすると、その行から元の字の画面が開く
  • 位置が残る: プレビューのタブへ戻った時、前に見ていた所から出る
  • 図があってもずれない: 開いてから最長 10秒は、図(Mermaid)や画像で高さが変わっても同じ行へ戻す。自分で動かしたら止まる

外へは何も送りません。

使い方

やりたい事 操作
プレビューを開く 元の字の画面で字をダブルクリック
元の字に戻る プレビューでダブルクリック
キーで切り替える Ctrl+Shift+V(カーソルの行がいちばん上に出る)
字を選ぶ マウスでなぞる

注意

  • 元の字の画面では、ダブルクリックで語を選べなくなります。 字を選ぶ時は、なぞってください
  • 空の行のダブルクリックでは切り替わりません
  • 入れた直後・版を上げた直後に効かない時は、「Developer: Reload Window」で窓を読み直してください

設定

設定 既定 意味
markdownDoubleClickPreview.doubleClickToPreview 入 元の字の画面のダブルクリックでプレビューに切り替える
markdownDoubleClickPreview.cursorLineAtTopInEditor 入 プレビューから戻った時に、カーソルの行をいちばん上に出す
markdownDoubleClickPreview.reloadOnRequest 入 ~/.markdown-double-click-preview/reload-request が新しく書かれたら窓を読み直す(入れ替え用の口)

あわせて、標準の設定 markdown.preview.doubleClickToSwitchToEditor を入にします。

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft