Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

The humble beginnings of a better Markdown editing package for Sublime Text 2 and 3

branch: master

This branch is 0 commits ahead and 0 commits behind master

Octocat-spinner-32 macros Make bold and italic markers configurable November 23, 2013
Octocat-spinner-32 messages Unbold/unitalicize selection if it is already bold/italic November 23, 2013
Octocat-spinner-32 samples Add sample markdown October 28, 2013
Octocat-spinner-32 screenshots Add yellow theme November 15, 2013
Octocat-spinner-32 snippets Cleaning in the repo November 21, 2013
Octocat-spinner-32 tests Highlight inside keyboard shortcut tags (<kbd>) October 30, 2013
Octocat-spinner-32 .gitignore ignoring June 08, 2013
Octocat-spinner-32 Bold and Italic Markers.tmPreferences Make bold and italic markers configurable November 23, 2013
Octocat-spinner-32 Default (Linux).sublime-keymap Move common keymaps for the 3 OSs to the default keymap file November 21, 2013
Octocat-spinner-32 Default (OSX).sublime-keymap Move common keymaps for the 3 OSs to the default keymap file November 21, 2013
Octocat-spinner-32 Default (Windows).sublime-keymap Move common keymaps for the 3 OSs to the default keymap file November 21, 2013
Octocat-spinner-32 Default.sublime-commands Allow preference files to be opened from Command Palette. January 18, 2013
Octocat-spinner-32 Default.sublime-keymap Unbold/unitalicize selection if it is already bold/italic November 23, 2013
Octocat-spinner-32 Indent%3A Raw.tmPreferences Import some settings from the native Markdown plugin October 22, 2013
Octocat-spinner-32 Main.sublime-menu Make bold and italic markers configurable November 23, 2013
Octocat-spinner-32 Markdown (Standard) (Windows).sublime-settings Regulation of file extension assignments October 28, 2013
Octocat-spinner-32 Markdown (Standard).sublime-settings Add yellow theme November 15, 2013
Octocat-spinner-32 Markdown (Standard).tmLanguage Add link reference definitions to the symbol list October 29, 2013
Octocat-spinner-32 Markdown (Windows).sublime-settings Regulation of file extension assignments October 28, 2013
Octocat-spinner-32 Markdown.sublime-settings Add yellow theme November 15, 2013
Octocat-spinner-32 Markdown.tmLanguage Make the "space after `>`" optional for blockquotes November 03, 2013
Octocat-spinner-32 MarkdownEditor-Dark.tmTheme Inside blockquotes, lighten some stuff, too November 03, 2013
Octocat-spinner-32 MarkdownEditor-Focus.tmTheme undoing errant tmTheme addition April 01, 2013
Octocat-spinner-32 MarkdownEditor-Yellow.tmTheme Add yellow theme November 15, 2013
Octocat-spinner-32 MarkdownEditor.tmTheme Inside blockquotes, lighten some stuff, too November 03, 2013
Octocat-spinner-32 MultiMarkdown.sublime-settings Add yellow theme November 15, 2013
Octocat-spinner-32 MultiMarkdown.tmLanguage Change UUIDs of the syntax files October 26, 2013
Octocat-spinner-32 README.md Clean up a few things and add some more credits. November 23, 2013
Octocat-spinner-32 Symbol List - Heading.tmPreferences Display Markdown headers in the Project Symbol List (Ctrl+Shift+R) November 23, 2013
Octocat-spinner-32 Symbol List - Hide.tmPreferences Do not display symbols from fenced code blocks in the symbol list November 23, 2013
Octocat-spinner-32 bootstrap.py Disable native Markdown package automatically on plugin install November 04, 2013
Octocat-spinner-32 custom_find_under_expand.py Improve bold and italic keybindings November 04, 2013
Octocat-spinner-32 distraction_free_mode.py Add option to keep current line centered November 03, 2013
Octocat-spinner-32 footnotes.py Fixes for some Sublime 3 errors July 08, 2013
Octocat-spinner-32 gather_missing_links.py Fixes for some Sublime 3 errors July 08, 2013
Octocat-spinner-32 insert_references.py Fixes for some Sublime 3 errors July 08, 2013
Octocat-spinner-32 jumpToMarker.py fix for leading space regex being too permissive September 04, 2012
Octocat-spinner-32 list_markdown_references.py fix for leading space regex being too permissive September 04, 2012
Octocat-spinner-32 messages.json Unbold/unitalicize selection if it is already bold/italic November 23, 2013
Octocat-spinner-32 numbered_list.py fix dashlines under list item December 28, 2012
Octocat-spinner-32 paste_as_link.py Fixes for some Sublime 3 errors July 08, 2013
Octocat-spinner-32 paste_as_reference.py Fixes for some Sublime 3 errors July 08, 2013
Octocat-spinner-32 quote_indenting.py Fixes for some Sublime 3 errors July 08, 2013
Octocat-spinner-32 underlined_headers.py Merge pull request #44 from rogercloud/master January 18, 2013
README.md

MarkdownEditing

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.

MarkdownEditing

Dark and yellow theme available.

Overview

Features

  • Asterisks and underscores are autopaired and will wrap selected text
  • If you start an empty pair and hit backspace, both elements are deleted
  • If you start an empty pair and hit space, the right element is deleted
  • backticks are paired
  • Left bracket pairing is modified to eliminate the selection and leave the cursor at a point where you can insert a [] or () pair for a link
  • Displays Markdown headers in the Project Symbol List (Ctrl Shift 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 presedence of #.
  • V will paste the contents of the clipboard as an inline link on selected text
  • R will paste the contents of the clipboard as a reference link
  • K inserts a standard inline link, K inserts an inline image
  • Ctrl B and Ctrl I 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.
  • ~ surrounds selected text with ~~ (strikethrough).
  • Typing # 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 match_header_hashes will determine if the # are mirrored on both sides or just at the beginning of the line.
  • Typing return at the end of a line that begins with hashmarks will insert closing hashmarks on the headline. They're not required for Markdown, it's just aesthetics, and you can change the match_header_hashes option in your settings to disable.
  • ^ 1 through ^ 6 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 now respects the match_header_hashes preference setting.
  • 6 will insert a footnote and jump to its definition. If your cursor is in a definition, it will jump back to the marker.
  • F will locate footnote markers without definitions and insert the marker for the definition
  • G will do the same for missing reference links

Keymap for Windows and Linux. Most of them are similar with the keymap on Mac OS X.

  • Ctrl Win V will paste the contents of the clipboard as an inline link on selected text
  • Ctrl Win R will paste the contents of the clipboard as a reference link
  • Ctrl Win K inserts a standard inline link, Shift Win K inserts an inline image
  • Ctrl 1 through Ctrl 6 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 now respects the match_header_hashes preference setting.
  • Ctrl 6 will insert a footnote and jump to its definition. If your cursor is in a definition, it will jump back to the marker.

Footnote commands submitted by J. Nicholas Geist and originated at geekabouttown

GFM Spesific Features

Underscores in words doesn't mess with bold or italic style:

underscore-in-words

Fenced code blocks gets syntax highlighting inside:

fenced-code-block

Keyboard shortcuts gets highlighted like in GitHub:

keyboard-shortcut

Strikethrough is supported:

strikethrough

Commands

Fix Underlined Markdown Headers

[TODO]

Installation

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).

Package Control

The preferred method of installation is via Sublime Package Control.

  1. Install Sublime Package Control
  2. From inside Sublime Text 2, open Package Control's Command Pallet: CTRL SHIFT P (Windows, Linux) or CMD SHIFT P on Mac.
  3. Type install package and hit Return. A list of available packages will be displayed.
  4. Type MarkdownEditing and hit Return. The package will be downloaded to the appropriate directory.
  5. Restart Sublime Text 2 to complete installation. Open a Markdown file and this custom theme. The features listed above should now be available.

Manual Installation

  1. Download or clone this repository to a directory MarkdownEditing in the Sublime Text 2 Packages directory for your platform:
    • Mac: git clone https://github.com/SublimeText-Markdown/MarkdownEditing.git ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/MarkdownEditing
    • Windows: git clone https://github.com/SublimeText-Markdown/MarkdownEditing.git %APPDATA%\Sublime/ Text/ 2/\MarkdownEditing
    • Linux: git clone https://github.com/SublimeText-Markdown/MarkdownEditing.git ~/.Sublime\ Text\ 2/Packages/MarkdownEditing
  2. Restart Sublime Text 2 to complete installation. Open a Markdown file and this custom theme. The features listed above should now be available.

Configuration

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

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 (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",

If you want to go with your already existing theme, you can reenable it with the same method as dark theme. Keep in mind that, that theme may not cover all the parts of the Markdown syntax that this plugin defines.

Tips

  • Sublime Text has a Distraction Free mode which is great with Markdown writing. Key binding for it: Shift F11.

  • If you work with Markdown tables too often, you may want to have a look at another plugin named TableEditor. It brings huge improvements for table editing. Several table formats are supported.

  • There is a plugin named Typewriter which provides a typewriter like writing environment. Excerpt from its homepage:

    Typewriter Typing disables your cursor keys and all bindings that move the cursor and/or select text, leaving you only with letters, numbers, symbols, Backspace, Delete and Enter.

  • Markdown files usually contains URLs. If you want to open URLs under the cursor with a keybinding, you may want to install OpenUrl plugin. It will work on other file types, too.

Similar Plugins

  • Knockdown

    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.

  • Sublime Markdown Extended
  • SmartMarkdown

Credits

This plugin contains portions of code from Knockdown. 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.

Footnote commands were submitted by J. Nicholas Geist and originated at geekabouttown.

License

MarkdownEditing is released under the MIT License.

Something went wrong with that request. Please try again.