• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

jonschlinkert/sublime-markdown-extended: Top 100 Sublime Text plugin! Markdown s ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

jonschlinkert/sublime-markdown-extended

开源软件地址(OpenSource Url):

https://github.com/jonschlinkert/sublime-markdown-extended

开源编程语言(OpenSource Language):


开源软件介绍(OpenSource Introduction):

sublime-markdown-extended package control total downloads

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:

  1. Open a file with the extension you want to set a default for (i.e. .md)
  2. 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:

image

This is what it looks like with proper spacing:

image

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

image

Without a trailing whitespace

image

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 package
  • html|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

image

After

image

LESS

Before

image

After

image

HTML

Before

image

After

image

JavaScript

Before

image

After

image

Coffee

Before

image

After

image

LiveScript

Before

image

After

image

Shell

Before

image

After

image

YAML Front Matter

See gray-matter

Before

image

After

image

Coffee Front Matter

See gray-matter

Before

image

After

image

Authors

Jon Schlinkert

Alexander Krivoshhekov

Copyright and license

Copyright 2013-2015 Jon Schlinkert

MIT License




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
devinus/markdown: A simple Elixir Markdown to HTML conversion library发布时间:2022-08-18
下一篇:
ngoctran1798/MARKDOWN发布时间:2022-08-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap