Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.


    View a Markdown Preview directly in VSCode

    Chris AchardChris Achard
    vscodeVS Code

    VSCode can natively preview markdown files. Open a markdown file in VSCode and press cmd-k v, or the Open Preview to the Side button.

    The Preview is live and updates as you type, and it switches live as you switch between markdown files.



    Become a Member to view code

    You must be a Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson




    Instructor: 0:00 We have a Markdown file called index.md open in VS Code. Let's fill it with some Markdown. We can say, "Hello World. This is Markdown." The first thing to notice is that it has some syntax highlighting built in for Markdown.

    0:16 But we can go beyond that and get a live preview by clicking this button over here. This is "Open Preview to the Side," and the shortcut key is Ctrl+K V. When we click that, we get a live preview. This has all the Markdown features, even syntax highlighting.

    0:33 If we have some JavaScript here, then that appears over here as well. We could even have more than one file. Let's make a new file called index2.markdown. We could say, "This is index 2." We see the live preview over here, and when we switch to the first file, the preview switches as well.