[TxMt] Saving generated HTML from Markdown

Lists In@IDC listsin at integrateddevcorp.com
Sun Apr 1 12:21:03 UTC 2007


On Mar 31, 2007, at 11:05 PM, Allan Odgaard wrote:

>>> Alternatively, you can use the "Convert Document to HTML" (Ctrl 
>>> +Shift+H) command from the Markdown bundle in the Markdown document.
>>
>> That seems to convert to HTML in situ, is there an option to  
>> create a new HTML document from the source you're viewing?
>
> Go to Bundles → Show Bundle Editor → Edit Commands… (⌃⌥⌘C)
>
> Now locate Markdown → Convert Document / Selection to HTML (second  
> item in the Markdown bundle) and change the “Output” from  
> “Replace Selected Text” to “Create New Document”. Now  
> ⌃⇧H will open a new window with the HTML.

I have two different commands with two different scopes -- on one,  
the scope is text.html.markdown, the other is  
text.html.markdown.multimarkdown.  The first is the one that's being  
used and it was set to replace while the other was set to create a  
new document and they were bound to the same key; ⌃⇧H.

Thanks for the pointer, they now both do what I want.

>> Seems like this should be easier...
>
> Manually converting your Markdown formatted text to HTML in  
> TextMate and saving that somewhere is NOT a recommended workflow,  
> and that is why we do not have a “Save the HTML to a new  
> location” command by default (but it would be easy to add).
>
> Let me clarify on the purpose of using Markdown, it may arise in  
> two situations:
>
>  1) You are writing content for your blog, manual, web-site, or  
> similar. In this case you want your content to STAY in Markdown,  
> and have the conversion happen on display (potentially cached),  
> i.e. never inside TextMate (here you only need the Preview command)  
> -- the reason you want the content to stay as Markdown is so that  
> you can go back and edit the easy-to-read version of your content.
>
>  2) You are submitting content, which is required to be in HTML, to  
> somewhere, for example a comment on a blog. Here you want to write  
> in Markdown, convert to HTML, and submit that (likely throwing away  
> the original, since you generally do not keep a local copy of your  
> comments to blogs, etc.) -- if for example it was a web-site  
> comment, the workflow could be to invoke “Edit in TextMate” from  
> the browser, write in Markdown, press ⌃⇧H to convert it to HTML,  
> now save, close, and submit.

3) You have to write a document with relatively light formatting to  
be e-mailed and/or posted to a one-off web page during fast and  
furious specification development.  So, it needs to be pasted into an  
e-mail and/or "saved as" a simple file-based web page.  You need to  
keep the Markdown version as that will form the basis of the final  
version but it's much too cumbersome to edit and format in Word at  
this stage (or any stage, but that's another discussion).

In other words, editing actual text in Word sucks -- I'm much faster  
in TextMate.

In that third use-case, I see a great reason to have both Convert- 
 >new document and Save HTML to New Location.

Maybe I'm hitting this nail with the wrong type of hammer?  Maybe  
what I'm really looking for is Latex?  Seems like an awful lot of  
people on this list use it though I've never explored it at all.

What do other people use for writing specifications where TextMate is  
obviously the best tool (ever) for writing text but the final  
document needs to be fanch-schmancy for Suit consumption?

Thanks,

S




More information about the textmate mailing list