ActiveState Community

Question about Tab Triggers and Zen Programming

Posted by joeycalamaro on 2009-10-14 18:53
OS: OS X

I'm demoing Komodo and I like what I see so far however I have a few questions about the editor. Firstly, coming from TextMate/Coda/Espresso I'm accustomed to tab triggers working in the following method:

key+tab=snippet

So if I were to create paragraph snippet, I could type the letter p, hit tab and the proper markup gets inserted. Offhand I can't find any way to do this on Komodo. If I want to use the tab key as part of the keybinding sequence in my snippet the tab has to come first. While this seems like a minor issue, it totally screws up the formatting since it's adding extra tabs everywhere. Is there a way to allow tab triggers to function as they do in the other top Mac editors?

My next question has to do with Zen programming. It seems that Komodo isn't supported:

http://code.google.com/p/zen-coding/

Is there an alternative zen addon for Komodo? Or can't you do zen programming in Komodo?

toddw | Thu, 2009-10-15 10:47

The default keybinding in Komodo is Cmd+T for the snippet abbreviations. There is a Komodo extension that you can install to make abbreviations use Tab:
http://community.activestate.com/node/2898

As for Zen - I don't know of any Komodo extensions that have been written for it. From the Zen web page it would seem it would be possible to integrate it with Komodo (as Zen uses Python or JavaScript - both of which Komodo supports).

Cheers,
Todd

joeycalamaro | Thu, 2009-10-15 11:17

Thanks for the link. Just looking over that addon briefly it would seem I have to reorganize my snippets in order for it to work is that correct? I typically only work in HTML, CSS and some Javascript so my snippets are organized by task, not language. For example, I have a set of design framework snippets (custom div elements with ids, etc.), Text Markup elements and so on.

From the looks of this addon I'd have to reorganize all of my snippets into one big folder set with the language. While it is a work around it's not very ideal. :-/ Even still thanks for the heads up. I'll certainly watch that addon.

joeycalamaro | Thu, 2009-10-15 11:30

Figured out a work around. I can simply just create two sets of snippets. One organized for clicking (yes I'm a clicker) and one organized for tab triggers. It's a bit of a pain but it should work.