MarkdownCopy : Copy Markdown to clipboard as HTML
| script karma
Downloaded by 59
Comments, bugs, improvements
|A simple plugin to allow copying of buffers formatted as markdown to the clipboard as formatted HTML text. This can be used, for example, to write emails in markdown in Vim and then paste them into Outlook as formatted text.
The plugin currently only supports Windows, although it wouldn't be too hard to port `HtmlClipboard.py` to support other operating systems and I'd welcome pull requests. I only wrote this to allow me to write Outlook emails in Vim, so haven't tried to support Linux/Mac OS X at the moment.
Note that this uses the `HtmlClipboard` python class written by Phillip Piper and published on activestate.com. Links in the README.md file included in the zip file.
I only added the vim code.
The plugin offers two commands:
Hopefully the names make it fairly clear what they mean. CopyToClipboardAsHtml accepts a range, but will default to sending the entirety of the current buffer.
Source code is held in a repository at https://bitbucket.org/abudden/vim-markdowncopy
1. Vim >= 8.0.254 (this plugin uses `:pyx` commands to interact with python).
2. Vim must be compiled with working python support.
3. Python compatible with Vim. I've only tested this with python 3.6 at present, although it should work with any python 2.7+.
4. Python module pywin32.
5. A markdown-to-html (and vice-versa) conversion tool. I use pandoc.
I have tested this with 64-bit Anaconda Python 3.6.1 (which comes with pywin32 as standard), 64-bit Vim 8.0.776 from tuxproject.de and pandoc 18.104.22.168. It was written in about half an hour so may well have a lot of bugs!
Install as per any other Vim plugin - I'd recommend pathogen, but there are plenty of other plugin managers available.
Rating scripts is only available on the
script versions (upload new version)
Click on the package to download.
ip used for rating: 22.214.171.124