Joel on Software
Oct 23: Seoul:
WebAppsCon
Oct 27: Boston:
SD Best Practices
Feb 24: Miami:
Future of Web Apps
Search:

Wanted: Software Engineer at Pelco (Clovis, CA 93612). See this and other great job listings at jobs.joelonsoftware.com.

Getting MarkDown and SmartyPants working with EditPad Pro


This item ran on the Joel on Software homepage on Tuesday, September 19, 2006

MarkDown is a simple processor that converts text to HTML. For example, it converts *text surrounded by asterisks* to italics.

SmartyPants replaces "straight quotes" with “curly quotes” and makes a few other typographic improvements.

EditPad Pro is a very respectable text editor for Windows. It’s fast and contains scrillions of useful features. It’s not the fanciest thing in the world, but if you’re still using Notepad for the occasional bits of text, it’s a fine drop-in replacement.

Here’s what it takes to get them all working together on a typical Windows setup:

  • Install Perl, if you don’t already have it. For Windows, the easiest way to do this is from ActiveState’s download page. Just download the Windows MSI package and run it. Make sure to choose the option to associate .pl files with Perl.
  • Go into c:\Perl and make a directory called markdown.
  • Download Markdown and SmartyPants. Open the ZIP files and put Markdown.pl and SmartyPants.pl in the directory you just made, c:\perl\Markdown.
  • Also in that directory, make a little batch file named md.bat:

    @echo off
    c:\perl\markdown\Markdown.pl %1 > %~dpn1.tmp
    c:\perl\markdown\SmartyPants.pl %~dpn1.tmp > %~dpn1.html
    del %~dpn1.tmp 
    start %~dpn1.html


  • In EditPad Pro, choose Tools | Configure Tools. Click New. Set the Caption to “MarkDown”, and set the Command Line to c:\perl\markdown\md.bat "%FILE%". You may want to check the box in the Files tab that says “Save the current file if it has unsaved changes.”
  • Now you have a menu item Tools|Markdown which will save the file you’re working on and generate an HTML version of it (replacing the extension you used with .html), then it pops it up in a web browser so you can check it.


My new book is here! Apress has just published a new collection of 36 essays from Joel on Software, aptly named More Joel on Software. Get yours today! Available from Amazon.com or wherever fine cheese is sold.

About the Author: I’m your host, Joel Spolsky, a software developer in New York City. Since 2000, I've been writing about software development, management, business, and the Internet on this site. For my day job, I run Fog Creek Software, makers of FogBugz—the smart bug tracking software with the stupid name, and Fog Creek Copilot—the easiest way to provide remote tech support over the Internet, with nothing to install or configure.

Enter your email address to receive a (very occasional) email whenever I write a major new article. You can unsubscribe at any time, of course.

Email:

 
Home | Email | Bug Tracking Software | Remote Assistance | Complete Archive