ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Paste Markdown

by Wuvist ST3 Mac New

Paste Chrome web selections into Sublime Text as Markdown on macOS

Details

Installs

  • Total 0
  • Win 0
  • Mac 0
  • Linux 0
Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11 Jun 10 Jun 9 Jun 8 Jun 7 Jun 6 Jun 5 Jun 4 Jun 3 Jun 2 Jun 1 May 31 May 30 May 29 May 28 May 27 May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Paste Markdown for Sublime Text

Paste a web selection copied from Chrome as Markdown instead of plain text.

Usage

  1. Select content on a page in Chrome and copy it with Cmd+C.
  2. Switch to Sublime Text.
  3. Open the Command Palette and run Paste Markdown: Paste HTML as Markdown.

The command converts common HTML elements including headings, paragraphs, emphasis, links, images, lists, blockquotes, code blocks, and tables. If the clipboard does not contain HTML, it pastes plain text by default.

Keyboard shortcut

Package Control packages should not claim shortcuts by default. To use Cmd+Ctrl+V, open Preferences > Package Settings > Paste Markdown > Key Bindings. Copy the example binding into your user keymap.

[
    {
        "keys": ["super+ctrl+v"],
        "command": "paste_markdown"
    }
]

Installation

Install Paste Markdown with Package Control.

For development, open Sublime Text's Preferences > Browse Packages..., then place or symlink this directory there as Paste Markdown:

ln -s /Users/wuvist/code/subl_paste_md \
  "$HOME/Library/Application Support/Sublime Text/Packages/Paste Markdown"

Sublime Text reloads the plugin automatically.

Settings

Open Preferences > Package Settings > Paste Markdown after installing, or override these keys in Packages/User/Paste Markdown.sublime-settings:

{
    "fallback_to_plain_text": true,
    "show_status_message": true
}

Development

The converter uses only Python's standard library. Run its tests with:

python3 -m unittest -v

The rich clipboard integration currently targets macOS.