Skip to content

Live Preview

Live preview gives you a real-time rendered view of your markdown alongside the editor. As you type, the preview updates to reflect your changes.

There are two ways to toggle live preview:

  • Press Space+p
  • Type the :preview command

Live preview supports two split orientations:

The editor appears on the left and the preview on the right. This is useful on wide terminals.

Live preview in horizontal split mode

The editor appears on top and the preview on the bottom. This works well on narrower or taller terminals.

Live preview in vertical split mode

Press Space+s to swap between horizontal and vertical orientation at any time.

To keep editing responsive, mdt debounces the preview rendering. Rather than re-rendering on every single keystroke, it waits for a brief pause in typing before updating the preview. This means you get smooth editing performance even on large documents.

When live preview is active, scrolling in the editor automatically scrolls the preview pane to the corresponding position, and vice versa. This keeps both views in sync so you always see the rendered output for the text you are editing.