Blogging from TextMate

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

Filed under tips

10 responses to “Blogging from TextMate

  1. 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.

  2. 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!

  3. 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.

  4. 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!

  5. 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

  6. Pingback: Ruby, Rails, TextMate « exceptionz

  7. Pingback: Bloggen mit Textmate - netztaucherbrille

  8. Pingback: Testpost aus Textmate » LexaT

  9. Pingback: Bloggen mit Textmate

  10. Pingback: Blogga från TextMate « Världen genom ett kaffefilter

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s