Groceries: sublime3 implements real-time preview of markdown format

References:
1. packagecontrol official manual
1. Introduce two Markdown plugins under Sublime3

Implementation steps

  1. Install and open Sublime3
  2. Install Package Control

    Press ctrl+`or View > Show Console, enter the following code in the console opened at the bottom and press Enter, and wait for the installation to end:

    import urllib.request,os,hashlib; h = ‘6f4c264a24d933ce70df5dedcf1dcaee’ + ‘ebe013ee18cced0ef93d5f746d80ef60’; pf = ‘Package Control.sublime-package’; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( ‘http://packagecontrol.io/’ + pf.replace(’ ‘, ‘%20’)).read(); dh = hashlib.sha256(by).hexdigest(); print(‘Error validating download (got %s instead of %s), please try manual install’ % (dh, h)) if dh != h else open(os.path.join( ipp, pf), ‘wb’ ).write(by)

  3. Install MarkdownEditing and OmniMarkupPreviewer,
    the former is used to highlight Markdown syntax, the latter is used to preview the effect of markdown editing, and also supports the style of rendering code highlighting.

    1. First use the shortcut key Ctrl(or Command) + Shift+ pto enter the Sublime command panel, type "package install" from the list select "install Package" and press Enter.
    2. Enter the markdown editing keyword, select MarkdownEditing and press Enter.
    3. Enter the Omni keyword, select OmniMarkupPreviewer and press Enter.
    4. Enter the livereload keyword, select LiveReload and press Enter.
    5. After waiting for the plugin to be installed, create the test.md file and open it with sublime for editing and testing
  4. Common shortcut keys

    • Ctrl + Alt + O: Preview in browser

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325939889&siteId=291194637
Recommended