Member-only story
How to Easily Format Markdown Files in VS Code
VS Code markdown extensions to the rescue!
Every respectable software project needs a README
. This file provides crucial information about what the project is, how to work with it, and other relevant information for developers. README
files are written in markdown, a special markup syntax. The syntax for markdown is simple enough, but it can be a pain to manually type out, and it’s easy to make simple mistakes and typos.
Wouldn’t you like to just use the Cmd+B
keyboard shortcut to bold some text instead of typing **
around your text? Or what about creating a nicely formatted table in your README
, especially when editing an existing table? Wouldn’t it be nice if the table formatting and column width adjustments were taken care of for us? Markdown is wonderful, but it’s not exactly as easy as working with a Google doc when applying formatting.
The SFDocs Markdown Assistant VS Code extension is here to help!
Common Use Cases
In this article, we’ll look at some common use cases when writing a markdown file. We’ll first look at simple text formatting like bold, italic, or strikethrough. Next, we’ll look at writing numbered lists. Finally, we’ll look at creating and modifying tables.
Let’s get started!
Bold, Italic, and Strikethrough Text
Let’s start with the simple stuff. In markdown syntax, you can make your text bold by wrapping your text in **
, italic by wrapping your text in _
, and strikethrough by wrapping your text in ~~
. It’s not a huge burden to type out these characters, but it’d be really nice if we could just use keyboard shortcuts to format the text in the same way that we can when working with a Google doc.
Here’s the markdown we’ll use to apply these styles:
And here’s what the output looks like when viewing the markdown file: