Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Add Markdown to TextMate Apps
Although I'm a longtime fan of BBEdit, I've also found TextMate wonderful for handling project-based documents -- and I love its text folding feature and comprehensive syntax colouring functionality. I must get to grips with its use of Bundles for this -- its CSS syntax rules are still very basic.

I was initially doubtful that its 'run command' functionality was as powerful as BBEdit's. I needed to get John Gruber's Markdown perl script added, as this is something I miss from BBEdit. It turns out to be simple, so here's what I did:
  1. Download and decompress markdown.pl, and copy the file into yopur user's Library/Application Support/TextMate/Scripts/ folder. You will have to create this last folder, but anywhere in your home directory would also do.
  2. Launch TextMate and choose Automation:Run command:Edit (or type Control-Alt-Command-C) to open the Bundle Editor.
  3. Create a new command (in Defaults) and name it Markdown.
  4. Add the following settings:
    • Save: Nothing
    • Command(s): Enter the full path to the location where you saved markdown.pl
    • Input: Entire document
    • Output: Open as new document
    • Activation: whatever you want
    • Scope: leave blank
  5. Exit the Bundle Editor window.
Type in some Markdown code, then choose your new Markdown script from the Automation menu -- and a new document is created with valid XHTML. I also created a command to replace the current text selection, which is also useful when creating long XHTML content.
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[9,233 views]  

Add Markdown to TextMate | 1 comments | Create New Account
Click here to return to the 'Add Markdown to TextMate' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Add Markdown to TextMate (can be done in TextMate 1.1b5)
Authored by: nchen on Mar 14, '05 12:53:42PM
If you are willing to use TextMate 1.1b5 and have experience with subversion, you can also download the markdown bundle from the subversion repository. It does exactly what this hint accomplishes but in a slightly more compatible manner. (read: it probably would not break in the latest version). Since the newer version of TextMate will probably use the new bundle system, it might be beneficial to stick with that. Also, there are a lot of good new bundles being developed everyday so some of them might interest you too.
Download TextMate 1.1b5
Details from where to get the repository bundles and where to put them are here.
Questions/Mailing list can be found here. There is a lot of information there and a bunch of people who are very helpful.

[ Reply to This | # ]