Sublime Text 3: Two Markdown plug-ins
I recently upgraded to Sublime Text 3, so it involved re-installing my favorite plug-in. As a heavy-duty Markdown user, Markdown plug-ins are essential (one of the most important reasons for choosing to write articles in a short book is that the MarkDown writing environment in a short book is quite comfortable ). Here we will record and share two common Markdown plug-ins.
- MarkdownEditing
MarkdownEditing is a necessary plug-in for Markdown writers. It not only highlights Markdown syntax, but also supports syntax highlighting in many programming languages.
- OmniMarkupPreviewer
OmniMarkupPreviewer is used to preview the effect of markdown editing. It also supports rendering code highlight styles.
Install plug-ins
Before installing the plug-in, we need to first install a Package Control plug-in which is the most indispensable in Sublime. In the future, we will need help to install and manage the plug-in.
Install "Package Control"
Use shortcutsctrl + `
Open the Sublime console, or select View>Show Console.
In the command line input box of the console, paste the following code and press enter to complete the installation of the Pacakge Control.
import urllib.request,os,hashlib; h ='eb2297e1a458f27d836c04bb0cbaf282'+'d0e7a3098092775ccb37ca9d6b2e4b7d'; 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)
Install MarkdownEditing
After Package Control is successfully installed, we can use it to conveniently manage the plug-in. First, use the shortcut key 'COMMAND + shift + p' to enter the Sublime command Panel, enter "package install", select "install Package" from the list, and press Enter. At this time, Sublime began to request the index of the remote plug-in repository, so the first use may have some small latency.
After the list is updated, enter the "markdown ed" keyword and select "MarkdownEditing" and press Enter. After the plug-in is installed, you must restart the Sublime plug-in to take effect. The following figure shows the effect of using sublime to edit code snippets.
MarkdownEdit Display Effect
In addition to the highlighted display syntax, MarkdownEditing also provides shortcut keys for quickly inserting the markdown tag. Below are two of my frequently used shortcut keys (for more shortcut keys, see their official documentation ).
- Command + option + k insert Link
- Command + shift + k insert Image
I prefer the "code snippet" added by MarkdownEditing to the shortcut key"
Input "mdi + tab" will automatically Insert the following Image Tag
![Alt text](/path/to/img.jpg "Optional title")
Enter "mdl + tab" to automatically generate the following link tag
[](link)
Install OmniMarkupPreviewer
After the basic editing needs are completed, you can view the Markdown rendering effect or output the html format. OmniMarkupPreviewer will be used. We also need to install this plug-in using Pacakge Control. Enter "command + shift + p" to enter the sublime command interface, enter "package ins", Press enter, type "ominmarkup", select OmniMarkupPreviewer, and press Enter.
Install OmniMarkupPreviewer
After the plugin is successfully installed, you can use the shortcut key to preview the edited markdown source file. Below are several common shortcut keys.
- Command + Option + O: preview in the browser
- Command + Option + X: Export HTML
- Ctrl + Alt + C: HTML Tag copy to clipboard
The following is the effect of the same markdown code preview in the browser.
Browser Preview
With the above two plug-ins, you can use markdown in sublime to fully meet your daily needs. enjoy the fun of markdown writing.
For more information about Sublime Text, see:
Ubuntu installation code editor Sublime Text 3 (Build 3083)
Animation display 16 Sublime Text Shortcut Key Usage
Ubuntu 12.10 install and crack Sublime Text 2
Install Sublime Text 2 on Ubuntu 13.04
Code artifact-Sublime Text package management tools and extensions
How to Develop the Sublime Text 2 plug-in
Install and crack the Sublime Text 2 editor in Windows Mac Linux
Text Editor Sublime Text User Experience
Sublime Text details: click here
Sublime Text: click here
This article permanently updates the link address: