question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Automatically Activate Markdown Preview

See original GitHub issue

I would like to eliminate the step of pressing ctrl+k v to preview the md file I open. For the preview should always be on.

Thank you

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:49
  • Comments:42 (8 by maintainers)

github_iconTop GitHub Comments

29reactions
RWeigeltcommented, Feb 7, 2016

Here are my 2 cents on the handling of Markdown files in Visual Studio Code.

I think that the main use case for opening a Markdown file is reading it. Not only for developers who consume the documentation of tools and libraries, but also for people like me whose job involves writing lots of documentation. I don’t have definitive numbers, but I’m pretty sure I read (or at least scan) many more Markdown files than I edit on a given day. That’s why I think that the current situation is a bit cumbersome:

  • When I open a Markdown file, it is displayed as plain text / source
  • If I want to read it with as little distraction as possible, I press ctrl+shift+v.
  • But when I see something I’d like to edit, pressing ctrl+k v doesn’t work. I first have to switch back to the text editor (ctrl+shift+v), then enter the split view (ctrl+shift+v).
  • Regardless of whether I choose the better reading experience or (if I expect an edit) the better editing experience, I always have to press a hotkey immediately after opening a Markdown file.

For me personally (this may be a matter of personal preference), the perfect UX would look like this:

  • When I open a Markdown file, I automatically see the preview mode that you get today when pressing ctrl+shift+v.
  • Then, when I want to make an edit, I can switch to split view very fast, either by pressing an Edit button or using a simple hotkey. For Markdown preview (which doesn’t have much interaction) it would be possible to use f2, which is the ultimate “change”/“edit”/“rename” hotkey across Windows, Office (most important key in Excel…) and Visual Studio.

Back to the feature request by @dfinke, who wanted a setting to force Visual Studio code into split editor when opening a Markdown file:

I suggest a setting that controls how Markdown files are opened by default (e.g. markdown.defaultView), with the following values:

  • source for the (source) text editor
  • preview for the preview mode (i.e. the ctrl+shift+v mode)
  • split for the split editor (i.e. the ctrl+k v mode)

From the behavior of the UI it seems to me that the split editor is currently not a real standalone mode, but that ctrl+k v is merely a shortcut for manually splitting the editor and switching the second editor view to preview mode. This means that opening a Markdown file directly in split editor may require some rework (e.g. what should happen when opening several Markdown files).

To achieve a “quick win” within a limited budget, it would be possible to first implement the source and preview values of the markdown.defaultView setting and add a split setting later. That would not break the compatibility of existing configurations.

Of course I’d love to have a hotkey for switching directly from preview to split edtor, but having a markdown.defaultView setting alone would already be a huge improvement for my daily work.

15reactions
hardmagnettcommented, Jan 13, 2018

I think the best solution is something like this editor https://typora.io/

Now I’m using Typora, but it is annoying to switch from IDE to markdown editor.

It would be cool if Visual Studio Code can work with markdown syntax like in example.

P.S. It also has simple switch by shortcut from editor mode to reader mode.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Markdown editing with Visual Studio Code
VS Code automatically synchronizes the Markdown editor and the preview panes. Scroll the Markdown preview and the editor is scrolled to match the...
Read more >
VSCode preview markdown by default - Stack Overflow
Open a markdown ( *.md ) file, then open the Command Palette and select >View: Reopen Editor With... > Markdown Preview (Experimental) ....
Read more >
Tips To Enable Notepad++ Markdown Preview And ... - YouTube
We will also learn how to enable live preview of markdown HTML files, and also how to enable syntax highlighting for markdown in...
Read more >
Usage - Markdown Preview Documentation - GitHub Pages
Enable the enable_autoreload setting in MarkdownPreview.sublime-settings . · Install LiveReload package from Package Control. · Restart. · Open the ...
Read more >
Markdown previews automatically scroll to your edit location
When editing a Markdown file through the web interface, selecting the Preview tab will now automatically scroll to the place in the preview...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found