An Interest In:
Web News this Week
- March 26, 2024
- March 25, 2024
- March 24, 2024
- March 23, 2024
- March 22, 2024
- March 21, 2024
- March 20, 2024
Vim Essential Plugin: Markdown to HTML
We’re cheating a bit in this episode. Rather than installing an actual plugin, we’ll be using a couple tools to allow us to write and convert Markdown to HTML. It’s really a simple process, and can save great deals of time.
Usage
First, we need to download Markdown and place it within our runtime folder. On the Mac, you can drag the Markdown.pl
file into your usr/local/bin/
folder. And that’s it; you’re all set! Next, to trigger the markdown-to-html conversion, we need to provide two parameters: the path to the Markdown.pl
file, and the command itself.
Within Vim, the following should do the trick:
:%! /usr/local/bin/Markdown.pl --html4tags
This instructs the Markdown.pl
file to run on the curent page. But, that’s a little too much typing; let’s instead save this to our .vimrc
file, and assign it to a shortcut.
".vimrc file"Markdown to HTMLnmapmd :%!/usr/local/bin/Markdown.pl --html4tags
With this line of code, whenever we type – by default – backslash + md
, that command will run, thus converting our markdown to clean HTML.
Original Link: http://feedproxy.google.com/~r/nettuts/~3/GJhz-NqtYHE/
TutsPlus - Code
Tuts+ is a site aimed at web developers and designers offering tutorials and articles on technologies, skills and techniques to improve how you design and build websites.More About this Source Visit TutsPlus - Code