Markdown plugin for Sublime Text. Provides a decent Markdown color scheme (light and dark) with more robust syntax highlighting and useful Markdown editing features for Sublime Text. 3 flavors are supported: Standard Markdown, GitHub flavored Markdown, MultiMarkdown.
Important Note About Installation
Are you getting this error after installation: Error loading syntax file “Packages/Markdown/Markdown.tmLanguage”: Unable to open Packages/Markdown/Markdown.tmLanguage? This is caused by open markdown files at the install time. You have to manually change their syntax to your newly installed Markdown syntax. Read the below paragraph for more details on this.
Note: Sublime text has a native tiny package for Markdown. However, when MarkdownEditing is enabled, native package causes some conflicts. For this reason, MarkdownEditing will automatically disable it. Since it doesn’t bring anything new over MarkdownEditing, this is not a loss. But remember, when you disable MarkdownEditing, you have to reenable the native one manually (if you want).
If you are using Sublime Text 2, you have to disable the native package manually. To do that, add
Markdown to your
ignored_packages list in ST user settings:
"ignored_packages": [..., "Markdown"],
The preferred method of installation is via Sublime Package Control.
P(Windows, Linux) or
install packageand hit Return. A list of available packages will be displayed.
MarkdownEditingand hit Return. The package will be downloaded to the appropriate directory.
MarkdownEditingin the Sublime Text Packages directory for your platform:
git clone https://github.com/SublimeText-Markdown/MarkdownEditing.git ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/MarkdownEditing
git clone https://github.com/SublimeText-Markdown/MarkdownEditing.git %APPDATA%\Sublime/ Text/ 2/\MarkdownEditing
git clone https://github.com/SublimeText-Markdown/MarkdownEditing.git ~/.Sublime\ Text\ 2/Packages/MarkdownEditing
Enterwill automatically insert the new list item bullet.
Tabon the blank list item will indent it and switch the list bullet to another one (Order is
+in a cycle).
Tabon the blank list item will unindent it in the same way as above.
Tabs are supported.
Enterat the end of the line will continue with a new blank task.
Enterwill automatically extend blockquote.
>will convert it to blockquote. The first and the last line don’t have to be fully selected; partial select works, too.
()pair for a link
R). They will start with
#, so you will know they belong to markdown files at a glance. Also they will be on top of the list because of the precedence of
~wraps selected text with
#when there’s a selection will surround it with
#to make it a headline. Multiple presses add additional hashes, increasing the level of the header. Once you hit 6 hashes, it will reset to 0 on the next press. The
mde.match_header_hasheswill determine if the
#are mirrored on both sides or just at the beginning of the line.
mde.match_header_hashesoption in your settings to enable (disabled by default).
Tab. That is, typing
Tabon a line containing only
-characters will add or remove enough characters to it to match the length of the line above.
||Creates or pastes the contents of the clipboard as an inline link on selected text.|
||Creates or pastes the contents of the clipboard as a reference link.|
||Creates or pastes the contents of the clipboard as an inline image on selected text.|
||These are bound to bold and italic. They work both with and without selections. If there is no selection, they will just transform the word under the cursor. These keybindings will unbold/unitalicize selection if it is already bold/italic.|
||These will add the corresponding number of hashmarks for headlines. Works on blank lines and selected text in tandem with the above headline tools. If you select an entire existing headline, the current hashmarks will be removed and replaced with the header level you requested. This command respects the
||Inserts a footnote.|
||Fold/Unfold current section.|
||Fold all sections under headings of a certain level.|
||Go to the previous/next heading of the same or higher level|
||Go to the previous/next heading|
Underscores in words doesn’t mess with bold or italic style:
Fenced code blocks gets syntax highlighting inside:
Keyboard shortcuts gets highlighted like in GitHub:
Strikethrough is supported:
Adjusts every setext-style header to add or remove
- characters as needed to match the lengths of their header text.
Converts every setext-style header into an ATX style header. If something is selected only the headers in the selections will be converted, otherwise the conversion will be applied to the whole view.
Scans document for referenced link usages (
[some link][some_ref] and
[some link]) and checks if they are all defined. If there are undefined link references, command will automatically create their definition snippet at the bottom of the file.
Performs lint on current Markdown file. See lint rules. Some of the linting rules are customizable via user settings file.
Switches the highlighted list between numbered and bulleted style.
Adds a footnote after the word under cursor. If cursor is already on a footnote, jumps to its definition or reference.
Add definition stubs (if there is none) for all footnotes references.
Jumps cursor between definitions and references.
Adds a new link under cursor.
Adds a new inline link under cursor.
Adds a new inline image under cursor.
Adds a new image under cursor.
Adds a footnote under cursor.
Deletes the definition and references of a link.
Sorts and gives a report on current link references usage.
The plugin contains 3 different Markdown flavors: Standard Markdown, GitHub flavored Markdown, MultiMarkdown. Default is GitHub flavored Markdown. If you want to set another one as default, open a Markdown file and select your flavor from the menu:
View > Syntax > Open all with current extension as. You’re done.
You may want to have a look at the default settings files. They are located at:
Packages/MarkdownEditing/Markdown.sublime-settings [GitHub flavored Markdown] Packages/MarkdownEditing/Markdown (Standard).sublime-settings Packages/MarkdownEditing/MultiMarkdown.sublime-settings
If you want to override any of the default settings, you can open the appropriate user settings file using the
Preferences > Package Settings > Markdown Editing menu. Each flavor has a different settings file.
Bold and italic markers are configurable through ST shell variables. You can use
Preferences > Package Settings > Markdown Editing menu to see the default settings file. In order to override it, copy & paste its content into the user settings file (
Packages/User/Bold and Italic Markers.tmPreferences) from the menu and make your edits. It is pretty straightforward.
In order to activate the dark or the yellow theme, put one of these lines to your user settings file of the flavor (
"color_scheme": "Packages/MarkdownEditing/MarkdownEditor-Dark.tmTheme", "color_scheme": "Packages/MarkdownEditing/MarkdownEditor-Yellow.tmTheme", "color_scheme": "Packages/MarkdownEditing/MarkdownEditor-ArcDark.tmTheme",
If you want to go with your already existing theme, you can reenable it with the same method as above. Keep in mind that, that theme may not cover all the parts of the Markdown syntax that this plugin defines.
By default, when you install the plugin, files with these extensions will be assigned to Markdown syntax: “md”, “txt”, “mdown”, “markdown”, “markdn”. If you want to prevent any of these extensions to be opened as Markdown, follow these steps:
Sublime can be configured into a WYSIWYG (what you see is what you get) editor with two other plugins:
Install them if you haven’t. Then
Now open palette and choose “Preview in Broswer” and you will get a WYSIWYG editor.
Knockdown offers useful Markdown features and a custom Markdown theme. All of its unique features except its theme are ported to MarkdownEditing and some of them are actually improved further in MarkdownEditing.
Setext-style headers (
---) do not show up in the symbol list. This is due to a Sublime Text limitation (see #158). However, we are able to put a placeholder to indicate the existence of the header. We encourage you to use Atx-style headers (
Installing for the first time while having markdown files opened may cause MarkdownEditing to behave unexpectedly on those files. Close and reopen those files to fix it.
MarkdownEditing was originally created by Brett Terpstra and has become a community project with the goal of consolidating the best features from the varied collection of Markdown packages for Sublime Text. Current development is headed up by Ali Ayas and Felix Hao.
Related blog posts from Brett:
This plugin contains portions of code from Knockdown.
You can support contributors of this project individually. Every contributor is welcomed to add his/her line below with any content. Ordering shall be alphabetically by GitHub username.
MarkdownEditing is released under the MIT License.
Ingin mendapatkan kabar terbaru dari dunia teknologi dan lifehack? Klik media sosial di bawah ini