• Posted by Peter Haza
  • On June 7, 2008

  • Filed under Programming, TextMate

  • 40 Comments

TextMate(2) – What we can expect to come.

I know I wasn’t the only one who immediately thought of TextMate2 when I read that some new Duke Nukem Forever footage was released,. The first thing I did was to log onto the TextMate irc channel and give Allan a wink.

ph^: allan: Now that Duke Nukem forever has released a new gameplay-video … :p

Anyway. Being a regular on the irc channel and mailing list for some time now, I’ve gained quite much information on what’s in development and even bits and pieces of what TM2 will offer.

Update: TextMate 2 should be in private alpha in a month’s time, and public beta in maybe six months. Read more here.

Update: More TM2 speculation here

DISCLAIMER: None of this is officially released, supported or confirmed by Allan/macromates.com. Some or all of this may never be part of the TextMate distribution at all. It will however be cool if it is!

Dialog2:

Dialog2 is the successor of Dialog, which intent was to allow bundles to use dialogs to request strings, show choices etc. With Dialog2, Ciaran Walsh is bringing the Dialog to the next level by amongst other code changes is introducing a set of new window helpers. It’s also written in a way that makes it a lot easier to extend and add more features later. There already is a ruby wrapper in place(Support/lib/ui.rb) which makes it very easy to take advantage of the new Dialog.

Prettier tool-tips

By using HTMLTips helper from Dialog2 you get easy access to creating custom tool tips in HTML and CSS. The result, here showed with “Documentation for Word” from the PHP Bundle: Ciaran\'s: HTML Tool Tips

Code completion

The new Dialog can also be used for code completion. Some footage shows how Dialog2 suggests functions as you type, and inserts the function as a snippet where you can tab to the next parameter. With the new aforementioned ruby wrapper for the new Dialog it should be a walk in the park for the bundle developers to add this. (I managed!)

Intelligent code completion / Intellisense

One of the biggest griefs in the community with TextMate has been the lack of intelligent code completion, often referred to as intellisense. Currently you can use ⎋ (esc) to toggle thru your previously written words and a predefined set of words defined by the bundle author, but it offers no way to see what parameters the functions and methods expects. There have been attempts by some bundle authors, but now there’s work in progress for making that easier too. Currently it requires the bundle author to write a lexer. Some example footage can be seen here(PHP), 2, 3 and here(Ruby).

Better handling of command line input (or lack thereof)

Another big problem in TM has been with shell commands that might need input. The first example that comes to mind is the subversion bundle. There is no way for the bundle to know whether you’re setup with ssh keys, ssh agent, or have to type your password every time you commit. Hence if subversion is asking for a password on STDIN while the command is executing, it will fail or even stall TextMate. Luke “alkemist” Daley set out to sort this, and with some help from allan he came up with tm_interactive_input. This basically injects into the read function in OS X and with some black magic kung fu figures out if the read process belongs to TM. If so, it will open up a dialog requesting the input.

Pretty bundles

Thomas “subtleGradient” Aylott is working on what he refers to as:

a rough framework for making gui applications built inside textmate command windows

and it looks like this: Persistent asynchronous script runner

It allows a bundle developer to create a GUI using HTML/CSS & Javascript. And the buttons in the GUI can run shell scripts and pass data to them interactively. With the possibly coming terminal stuff in TM2 it should also gain the ability to run any TextMate bundle commands, macros & snippets. .

TextMate 2

There isn’t a whole lot to say about TM2 yet, other than it’s coming. Allan has said several times that he does most of the TM2 development in TM2, so it’s there and it’s mostly working, it’s just not for the rest of us to see and use yet.

One feature that might make it into TM2 is the ability for bundles to get a copy of the current text buffer, which will allow a bundle to do some heavy scanning in the buffer, without affecting the responsiveness of TM. This is great news for auto-completion and other commands which needs to scan the whole document.

Another often requested feature is for bundles to have better access to TextMate’s scoping system. This could replace the need for a lexer for things like intellisense, and thus lower the bar for implementing such. If this makes it into TM2 only Allan knows, but I really do hope so.

I don’t really know what people expect from TM2, but your expectations should most likely be pointed towards bundles, not TextMate itself. TM2 is afaik a complete rewrite of TM, with a lot of new “invisble” features for the bundles to take advantage of, not the users directly. TextMate’s strength has never been the editor on its own, but the extensibility it supports, and thus bundles.

Other interesting things

  • Yehuda Katz, with help from others on github.com has released a ruby gem that allows you to install, uninstall and list TextMate bundles like normal ruby gems. This makes it very easy for those out there who aren’t friends with subversion. You can read more about it here.
  • There has been a lot discussion on how to best maintain bundles in a central repository. There has been many requests for a issue tracking system for the bundles, and I recall that both Jira and Lighthouse have been in the spotlight, but I think eventually Redmine pulled the longest straw due to its free and open nature, and that Allan can host it on macromates.com. But either way, nothing is written in stone, and there has been no final decision.
  • There has also been talk about moving from subversion to git, but I’m not quite sure this is going to happen. Due to the nature of bundles, where each bundle has one or more main maintainers, but also super maintainers who maintain all over, Allan has mentioned that subversion is doing this pretty good already, while git might be difficult here. Nothing is written in stone here either, but it is on the agenda.

40 comments

  1. Posted by gsg 9th June, 2008 at 06:59 pm |

    Is this some kind of sick joke or is OS X’ anti-aliasing really that bad?

  2. Posted by Peter Haza 9th June, 2008 at 11:24 pm |

    No, it’s just the image quality that’s not too good.

  3. Posted by guy 10th June, 2008 at 07:02 am |

    I wish textmate could handle lisp’s REPL. That’s all I wish for at night.

  4. Posted by Patrick 16th June, 2008 at 07:07 pm |

    Hi,

    thanks for this post. Hopefully there will be at least some of this features in TM2.

    After reading through your post I wanted to test the tm-completion bundle but unfortunately it doesn’t work for me. Do you know if I have to set up anything special for it to work?

    I have TextMate 1.5.7 (1464) under Leopard 10.5.3 running.

    Thanks in advance

  5. Posted by Peter Haza 16th June, 2008 at 08:10 pm |

    @Patrick: You will need to check out the support folder in Review for TextMate to get the complete method in TextMate::UI which the PHP Completion relies on, and build Dialog2 yourself.

    I don’t recommend doing this, as you may end up making TM useless (everything can be re-installed though), but if you’re willing to try I suggest you jump onto irc so you can have some interactive help while doing it so you’re sure you get it right.

  6. Posted by Patrick 17th June, 2008 at 02:37 pm |

    Thank you very much, now it works except the “Rescan Project” command. Without this command it’s a little hideous to use because I have to rescan all files separately.

    The last commit was on the 25th of April and I wonder if the screencasts were made with a newer version because I don’t have this little window where Ciaran “activates” the code completion.

    Greetings

  7. Posted by Peter Haza 17th June, 2008 at 05:37 pm |

    Yes, that is kinda the same project, but for that screencast Ciaran has written a plugin which listens for events (like when you modify a file), and then auto-scans the file.

    I’m not sure if Ciaran has made it public at all or if it’s just living on his computer, but he did release a non-gui version I recall.

    Project scan is anyway not working very well for bigger projects so far. This is all very much work in progress, and I think Ciaran is very busy trying to push out a release for his very promising MySQL query browser(named Dolphin), so we probably wont see an official release for the code completion in a while.

    I also feel that I should mention that there has been quite some movement in the repository around the auto-completion stuff. I think Thomas “subtleGradient” Aylott is refining it even more, but I haven’t had the time to look into it.

  8. Posted by Patrick 17th June, 2008 at 10:46 pm |

    Thanks for letting me know. It seems like I have to be a little bit patient and look out for any updates…

    Greetings

  9. Posted by Peter Haza 18th June, 2008 at 11:36 am |

    No problem, Patrick.

    If you want to be up to date on new stuff, you should join us on irc. If you think you know a lot about TextMate, you’ll realise how much you don’t know about all the “hidden” gems. I’ve been hanging in there for a year now and still almost every day I learn something new, not to mention all the cool new stuff I get to test out.

    It’s not even mandatory to chat!

    irc://irc.freenode.net/##textmate

  10. Posted by Patrick 18th June, 2008 at 03:58 pm |

    Thanks for the invitation. My IRC nick is patrick85 in case you want to ping me… ;)

  11. Posted by Trevor 14th August, 2008 at 07:34 am |

    Typo: “on it’s own” –> “on its own”

  12. Posted by Peter Haza 14th August, 2008 at 07:46 am |

    Fixed. Thank you.

  13. Posted by seyDoggy 14th August, 2008 at 05:27 pm |

    T… M… 2… drool

  14. Posted by Gippy 19th August, 2008 at 06:08 pm |

    go on, pull the other one! ;)

  15. Posted by Randy 9th September, 2008 at 01:02 pm |

    Those new features look nice. But until the lazy TextMate team (of 1 lol) delivers the long overdue TM2 I am going to continue to pirate TM1 and hand it out on CDs to everyone at my university…. I’ve gone through 4 spindles so far.

  16. Posted by Peter Haza 9th September, 2008 at 02:11 pm |

    Sounds like a pretty childish attitude to me. TM1 is still doing the job pretty well and the bundles are evolving like ever. What exactly are you waiting for? And since TM2 will be a free upgrade for TM1 users, why not get a valid license right away?

  17. Posted by nofxx 26th September, 2008 at 02:28 am |

    Need split screen!

  18. Posted by R13ckJ 18th October, 2008 at 12:09 pm |

    [quote comment="28"]

    Those new features look nice. But until the lazy TextMate team (of 1 lol) delivers the long overdue TM2 I am going to continue to pirate TM1 and hand it out on CDs to everyone at my university…. I’ve gone through 4 spindles so far.

    [/quote] Agreed, very childish and to be brutally honest idiotic: Firstly, you’re calling the Textmate developer lazy when you can’t even be bothered to reach into your own pocket; secondly, by not supporting Textmate’s development there might not even be a Textmate 2.

    Your logic’s completely flawed. We can only pray that you’re using Textmate for noting down daytime TV schedules rather than trying to do any programming. [quote comment="45"]

    Need split screen!

    [/quote] Oooo split screen… great idea!
  19. Posted by jsk 2nd November, 2008 at 01:18 am |

    Tried it a few hours, really nice, it is lightweight and a pleasure to use! unfortunately, it lacks s/ftp support. Guess I’ll stick with Coda and give another shot when the new version will be available.

  20. Posted by Charles Roper 5th November, 2008 at 02:42 pm |

    Some of the things that are in E Text Editor would be good, like Snippet Pipes, branching undo history, a bundles editor that’s actually integrated into the editor.

  21. Posted by Peter Haza 6th November, 2008 at 10:41 am |

    [quote comment="51"]

    Tried it a few hours, really nice, it is lightweight and a pleasure to use! unfortunately, it lacks s/ftp support. Guess I’ll stick with Coda and give another shot when the new version will be available.

    [/quote] Yeah, this is one of the most common complaints on TM. It does integrate pretty well with Transmit though, which I use occasionally, but it’s not as good as built-in. To me it doesn’t matter much though, since I work mostly locally with version control and deploy application versions, but I definitely see your point. However I do not think Allan will implement this in TextMate, but rather make TM integrate better with other apps. Only time will tell though.

    [quote comment="52"]

    Some of the things that are in E Text Editor would be good, like Snippet Pipes, branching undo history, a bundles editor that’s actually integrated into the editor.

    [/quote] I think the bundle editor as we know it will be gone in 2.0. I don’t know what snippet pipes or branching undo history is, but I think TM 2.0 will have group undo instead of single character undo.
  22. Posted by Patrick 6th November, 2008 at 12:39 pm |

    @jsk

    Either try MacFusion (http://www.macfusionapp.org/) which is free or ExpanDrive (http://www.magnetk.com/expandrive) which costs $29.

    Both applications allow you to mount FTP,SFTP and SSH connections directly into your Finder.

  23. Posted by MrGando 20th November, 2008 at 03:33 am |

    I really hope some of this features will be available in TM2, my biggest complain in TM is the code completition for Cocoa / Obj-C . If I am in MyClass.h , and declare like 5 method prototypes. Then I should be able to go to MyClass.m and autocomplete the method declarations ( – (void) my method: (NSInteger) int ) … with no problem. But TM autocomplete scope is just the file that you’re working in….

    Unless someone could tell me how to do this , I would really appreciate since I preffer TM than Xcode for writing my code… but without this , XCode does really save me A LOT of time.

    Thanks for all this information!

    -Nicolas

  24. Posted by rdas7 1st December, 2008 at 06:10 am |

    A new version of TextMate is like finding those lost Beatles tapes. Unlike Beatles music, though, I use TextMate every day. Every day, do you understand me. It’s awesome. But I need split screen, and code completion!! Best money I ever spent on an app though. More than I can say about CS3…

  25. Posted by Peter Haza 1st December, 2008 at 09:22 am |

    @rdas7: TextMate has just shipped a new build (1496), and this includes amongst other things a framework for code-completion. The PHP bundle is already using it for built-in functions. I’ve written a few words about it here: http://blog.peterhaza.no/new-textmate-build-now-shipping-with-dialog-2/

  26. Posted by Vlad Didenko 3rd December, 2008 at 08:34 pm |

    Nobody cares about about any meaningful refactoring support? Or is it there and I am just missing on it?

  27. Posted by RohitK 27th April, 2009 at 08:34 am |

    hi, Also Amazed why the programmers are not developing text mate 2. Developing of software is needed to fullfill the demand of users….but..Tm..

  28. Posted by Gary Pledger 12th May, 2009 at 02:29 pm |

    What can we expect to come? Apparently nothing.

  29. Posted by Marcel Dietzmann 19th May, 2009 at 11:52 pm |

    Maybe we will see a preview of TM2 at the WWDC 2009?

  30. Posted by G Thorburne 8th June, 2009 at 11:37 pm |

    8 spindles

  31. Posted by Gerald 6th August, 2009 at 11:11 am |

    This tool is great and affordable at the same time. You are pirating the wrong side of the force here ;-)

  32. Posted by Josh 9th September, 2009 at 12:52 pm |

    Three spindles last week! Back to school is busy and there seems to be lots of CS students with Macbooks.

  33. Posted by Anonymous Coward 29th October, 2010 at 12:17 pm |

    Is it true that Macromates is up for sale? If new ownership takes over perhaps something would ship by the end of 2011.

    Thanks.

  34. Posted by Peter Haza 29th October, 2010 at 12:41 pm |

    Njet, it's not true.

Trackbacks...

  1. Antipode - Link - Textmate 2: “I’m not dead yet!”
  2. Textmate 2.0/Avian - Soon in private beta
  3. New TextMate build, now shipping with Dialog 2
  4. TextMate 2.x – Room for speculation, with sources.
  5. Allan Odgaard on the Still-in-Progress TextMate 2 | dv8-designs
  6. Allan Odgaard on the Still-in-Progress TextMate 2 | reabilita.me

What do you think? Join the discussion...