gvim to Markdown Preview

I use a couple simple mappings in my vimrc to preview markdown documents in my
browser. It isn’t as cool as something like Marked for Mac OS X but it gets
the job done on the workstation.

This uses a Python installation of markdown just installed using:

pip install python-markdown

The vimrc includes:

nmap md :%!markdown %

nmap p :w!:!start /min cmd /c markdown -x tables % > "C:\temp\temp.html"
&& "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
"file://C:/temp/temp.html"

imap p :w!:!start /min cmd /c markdown -x tables % > "C:\temp\temp.html"
&& "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
"file://C:/temp/temp.html"

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s