TextMate 2 New Window (via AppleScript)

Often I find myself in a situation where I need to quickly paste some text and edit it a bit. Switching to TextMate also switches spaces to my last TM session, which might not be my current space. With other programs (and TextMate 1 for that matter) this can be overcome by selecting “New file” or “New window” from dock menu.

But the problem is that TextMate 2 alpha currently does not have
“New file” option in the Dock menu. I really miss this, because of my workflow – I use spaces to manage projects and programs I have open concurrently and I don’t want to mix the TextMate windows between spaces. So opening new TM2 window in current space is a must.

But surely the developers are preoccupied with more important features and thus I decided to throw in my 2 cents and cobbled together an AppleScript that one can use to open new window in current space.

TMNewWindow

Place this script in your Applications folder and wait until Spotlight has indexed it. Then push whatever shortcut you have for Spotlight (or Alfred, if you are like me) and enter few first chars. I have found that tmn is enough to trigger this application.

Hitting enter will fire this app and a sec later new TextMate window should be opened in current space. Definitely faster than switching to TM2, hitting ⌘N and then moving the window to correct space.

 

▼ Download TMNewWindow

 

 

Be Sociable, Share!

Related posts:

  1. Sublime Text 2 New Window (via AppleScript)
  2. Safari New Window
  3. BetterTouchTool and Safari
  4. Mount partitions like a boss (AppleScript)

Leave a Comment

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>