Markdown Extended
Top 100 Sublime Text plugin! Markdown syntax highlighter for Sublime Text, with extended support for GFM fenced code blocks, with language-specific syntax highlighting. YAML Front Matter. Works with ST2/ST3. Goes great with Assemble.
Details
Installs
- Total 330K
- Win 144K
- Mac 125K
- Linux 61K
Dec 21 | Dec 20 | Dec 19 | Dec 18 | Dec 17 | Dec 16 | Dec 15 | Dec 14 | Dec 13 | Dec 12 | Dec 11 | Dec 10 | Dec 9 | Dec 8 | Dec 7 | Dec 6 | Dec 5 | Dec 4 | Dec 3 | Dec 2 | Dec 1 | Nov 30 | Nov 29 | Nov 28 | Nov 27 | Nov 26 | Nov 25 | Nov 24 | Nov 23 | Nov 22 | Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 6 | 13 | 19 | 20 | 16 | 16 | 7 | 3 | 7 | 22 | 13 | 16 | 21 | 9 | 11 | 11 | 17 | 17 | 12 | 16 | 5 | 7 | 16 | 7 | 0 | 0 | 0 | 1 | 7 | 23 | 19 | 7 | 13 | 12 | 6 | 13 | 10 | 0 | 0 | 20 | 24 | 15 | 13 | 15 | 25 | 19 |
Mac | 4 | 10 | 8 | 12 | 14 | 14 | 3 | 2 | 12 | 16 | 21 | 8 | 15 | 7 | 8 | 9 | 11 | 22 | 23 | 9 | 5 | 2 | 7 | 3 | 0 | 0 | 0 | 0 | 11 | 13 | 7 | 7 | 4 | 14 | 15 | 11 | 10 | 0 | 0 | 16 | 17 | 9 | 6 | 10 | 12 | 9 |
Linux | 5 | 3 | 7 | 12 | 5 | 8 | 6 | 4 | 8 | 2 | 10 | 11 | 5 | 5 | 6 | 10 | 6 | 5 | 9 | 4 | 3 | 3 | 3 | 5 | 0 | 0 | 0 | 1 | 13 | 8 | 7 | 3 | 4 | 5 | 3 | 3 | 4 | 0 | 0 | 8 | 8 | 0 | 3 | 8 | 8 | 11 |
Readme
- Source
- raw.githubusercontent.com
sublime-markdown-extended
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
Although substantial changes have been made, thank you @aziz and other contributors to Knockdown, for the code for the fenced code blocks.
Get Monokai Extended for better highlighting.
Jump to Examples ↓
Getting Started
1. Installation
Package Control
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.
Manual Installation
Go to 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 + p
and search for “Markdown Extended”
3. Make “Markdown Extended” the default
To make Markdown Extended
the default highlighting for the current extension:
- Open a file with the extension you want to set a default for (i.e.
.md
) - Navigate through the following menus in Sublime Text:
View -> Syntax -> Open all with current extension as... -> Markdown Extended
Features:
- 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
Markdown Enhancements
The following examples use the Monokai Extended theme.
Whitespace
Significant whitespace
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
Supported languages
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|coffeescript
coffee front matter
cpp
csharp
css
c
c++
diff
ejs
erlang
underscore
go
graphql
lodash
handlebars|hbs
: requires the Sublime Text Handlebars packagehtml|html5
ini
jade
java
javascript|js
json
json front matter
julia
less
ls|livescript|LiveScript
lua
md|markdown
nginx
objective-c
objective-c++
perl
r
ruby
sass
scala
scss
shell
bash
sql|ddl|dml
postgresql|postgres|pgsql
styl
swift
swig
liquid
xml
yaml
yaml front matter
CSS
Before
After
LESS
Before
After
HTML
Before
After
JavaScript
Before
After
Coffee
Before
After
LiveScript
Before
After
Shell
Before
After
YAML Front Matter
See gray-matter
Before
After
Coffee Front Matter
See gray-matter
Before
After
Authors
Jon Schlinkert
Alexander Krivoshhekov
Copyright and license
Copyright 2013-2015 Jon Schlinkert