Toggle preview
Announcement
As of version 3.5.0, the internal implementation of "Toggle preview" has changed. The command closePreview
has superseded togglePreview
and togglePreviewToSide
.
A new command is introduced:
markdown.extension.closePreview
(version 3.5.0, commit 05fb1af27150fa8c1c271fc03533d28787ea25d1)
It is only available under VS Code's built-in Markdown preview (markdownPreviewFocus
open in new window context), and is only assigned two key bindings:
- Ctrl / ⌘ + Shift + V
- Ctrl / ⌘ + K V
The following commands have been deprecated:
markdown.extension.togglePreview
(deprecated since version 3.5.0, commit 05fb1af27150fa8c1c271fc03533d28787ea25d1)markdown.extension.togglePreviewToSide
(deprecated since version 3.3.0, commit 20316d5d0409aa49b77a2bf655768a6e4e111c07)
User impact
This is a seamless change for most users. No action is needed.
The new design minimizes conflicts, and should no longer override other key bindings accidentally.
If you encounter unexpected behavior, please follow VS Code's detecting and troubleshooting guideopen in new window.
Background
In March 2018, version 1.1.1 (commit 2652869776c11ef8b974c8a5018c72f5a9ca9a8d, issue #86open in new window) introduced "Toggle preview".
It turned out to be a poor design. Users occasionally complained, not only in our issue tracker, but also around GitHubopen in new window. We tried to patch it, but there was actually nothing to do. (PR #435open in new window)
Eventually in PR #780open in new window, thanks to Anton Tuchkov (@Technik-J)open in new window, who revealed that VS Code (since version 1.21.0open in new window) sets the markdownPreviewFocus
context for its Markdown preview, we are able to put an end to this problem.