Sublime Text 3 打造markdown編輯器

編輯插件

Markdown Editing

預覽插件

Markdown Preview

這個插件不能實時預覽,但可以設置快捷鍵在瀏覽器中預覽,在Preferences->Key Binding設置裏添加以下代碼

{ "keys": ["alt+m"], "command": "markdown_preview", "args": {"target": "browser", "parser":"markdown"} },

在編輯markdown文件時可以通過按alt+m快速在瀏覽器中預覽,雖然不如實時預覽方便,但markdown的格式很簡單,經常用的人並不需要頻繁的預覽,設計markdown的初衷本就是爲了讓編輯安心碼字,不用過多考慮格式的問題.

MarkdownLivePreview

這個插件可以實現實時預覽,在Preferences->Package Setting>MarkdownLivePreview>Settings的user配置文件,設置在打開時同步預覽:

// Your settings for MarkdownLivePreview. See the default file to see the different options. 
{
    // As soon as you open a markdown file, it opens the window preview
    "markdown_live_preview_on_open": true,

    // If an image starts with one of those strings, then it will be loaded from internet
    "load_from_internet_when_starts": ["http://", "https://"],

    // When the preview is opened, the markdown file is closed in the origin window and reopend in
    // the preview window. If this option is set to 'true', then the markdown file will NOT be
    // closed in the origin window
    "keep_open_when_opening_preview": false,

    // Choose what to do with YAML/TOML (---/+++ respectively) headers
    // Valid values: "wrap_in_pre", "remove".
    "header_action": "wrap_in_pre",

    // Wait at least the specified *seconds* before updating the preview.
    "update_preview_every": 0
}

這個插件有可時候可能並不work,所以推薦第一個Markdown Preview。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章