It occurred to me that some people are still writing their blog post from WordPress, that is so last year. I also realized, while reading Hugh McGuire question, that TextMate is really powerful for blogging. I’ve been using it for quite some time now but didn’t realize until now all the tiny features I use while blogging. Here’s a short screencast of how I use TextMate to post to my blog.
TextMate blogger useful shortcuts
- ^⌥⇧B – Switch to Blog bundle
- ⇧⌘: – Spell check
- ^⌥⌘ – Preview
- ^⌘ – Publish
- title[tab] – Snippet for post title
- cat[tab] – Fetch the list of categories
- ^⇧L – Turn highlighted text into a link (also fetch the page title!)
- ^⇧⌘L – Search current text in Google and turn into a link
- ⌘B – Make current text bold
- ⌘I – Make current text italic
- ^⌘T – Search through Bundle items (and shortcuts)
- ^⇧⌥⇧⌘⌥X – Do absolutely nothing
Gary got another list of useful shortcuts in TextMate.
How do you write your blog posts ?









10 Comments
October 24, 2007 at 11:03 am
Awesome post.
I, too, write everything (blog posts, emails, documents) in TM, or VIM. I have some snippets / commands for doing cool stuff like converting ruby code to HTML. I just highlight some ruby code, hit cmd-ctrl-opt-C, and I get the corresponding HTML in my pasteboard. I have something similar rigged up for pastie.
I haven’t been able to get posting to my blog (mephisto) working with a command from TextMate, so I copy & paste that. If anybody knows how, it’d be great to hear.
What about emailing in GMail from textmate? That would be awesome too.
October 24, 2007 at 11:44 am
Oh that would be so cool to do email stuff from TM. I know there’s a Mail bundle but not for sending emails inside TM.
What does your command to highlight some ruby code look like?
Thx for the comment James!
October 25, 2007 at 6:28 am
I have a script called ruby2html.rb (the code from your article) in my path, so I just have a simple snippet:
html.rb < $TM_FILEPATH | pbcopy
pbcopy is a command-line util that accesses the pasteboard. Very powerful, being able to pipe output in to the pasteboard.
October 25, 2007 at 8:52 am
oh cool!
I use the script code2html.rb that supports multiple language. I wonder how I could pass in an argument for the language name? From a dropdown box? Or maybe just setting a different command from each would be a better idea.
Thx for the pointer James!
October 25, 2007 at 9:09 am
After some thinking, here’s my command in TM, replacing current highlighted text:
echo “$TM_SELECTED_TEXT” | code2html ruby
I duplicated this command for each language I use and replace the last argument and bound them all to CTRL+SHIFT+H
December 23, 2007 at 8:11 pm
[...] Blogging from TextMate screencast [...]
August 8, 2008 at 3:40 pm
[...] Eintrag ist der erste den ich direkt aus Textmate schreibe. Das passt schon ganz gut. Hier habe ich die Shortcuts für die Bedienung [...]
October 13, 2008 at 1:55 am
[...] überzeugend fand ich das Einfügen von Bildern per Drag&Drop. Einige sehr nützliche Shortcuts habe ich dann auch noch [...]
October 26, 2008 at 2:54 am
[...] überzeugend fand ich das Einfügen von Bildern per Drag&Drop. Einige sehr nützliche Shortcuts habe ich dann auch noch [...]
February 14, 2009 at 5:39 pm
[...] Du kan se en video och lära dig några kortkommandon på Marc-Andrés blogg. [...]