Extends Soda’s Monokai and the default markdown styles with additional syntax highlighting for YAML Front Matter, GitHub Flavored Markdown (GFM) and language-specific syntax highlighting inside GFM “fenced” code blocks
Get Monokai Extended for better highlighting.
If you already have Package Control installed in Sublime Text:
- Select “Install Package” from the Command Palette: Ctrl+Shift+P on Windows and Linux or ⇧⌘P on OS X)
- Search for “Markdown Extended” and click enter.
Preferences -> Browse Packages, and then either download and unzip this plugin into that directory, or:
git clone https://github.com/jonschlinkert/sublime-markdown-extended.git "sublime-markdown-extended"
2. Activate this Language
After installing this package, open a markdown file and switch the language to
Markdown Extended, using one
of the following methods:
- Select from the list of supported languages in your status bar at the bottom right corner of your editor
ctrl + shift + pand search for “Markdown Extended”
3. Make “Markdown Extended” the default
Markdown Extended the default highlighting for the current extension:
- Open a file with the extension you want to set a default for (i.e.
- Navigate through the following menus in Sublime Text:
View -> Syntax -> Open all with current extension as... -> Markdown Extended
- Support for YAML Front Matter
- Support for GFM “fenced” code blocks
- Language-specific syntax highlighting support inside GFM “fenced” code blocks for most popular languages (see below for the list of supported languages)
- Syntax highlighting for URLs in text which is auto-linked by GFM
- Proper syntax highlighting for bullets and numbers in ordered/unordered lists
- Proper syntax highlighting for bold and italics by ignoring multiple underscores in words
The following examples use the Monokai Extended theme.
Whitespace is significant only directly before and directly after fenced code blocks! Following these instructions will ensure that highlighting works properly and consistently._
This is very simple:
- Add a newline before and after clode blocks
- No trailing spaces after the last code block
If you don’t, it won’t break your code but it won’t always look awesome.
Comparisons with and without proper whitespace
Whitespace before the block
You will need to keep a space above and below fenced code blocks for predictable results with syntax highlighting. For example, this is what it looks like when there is no space before a fenced code block:
This is what it looks like with proper spacing:
Whitespace after the block
Also add a new line after code blocks, but make sure that there is no trailing whitespace next to the bottom fence.
With a trailing whitespace
Without a trailing whitespace
The following languages are highlighted inside fenced code blocks:
Note that in order for a language to be highlighted properly, you must have the language installed in Sublime Text.
coffee front matter
handlebars|hbs: requires the Sublime Text Handlebars package
json front matter
yaml front matter
YAML Front Matter
Coffee Front Matter
Copyright and license
Copyright 2013-2015 Jon Schlinkert