hyperlinks in Komodo 5.1.0b1 by Trent Mick

We released Komodo 5.1 beta 1 yesterday! Get it here:

Please try it out and give us your feedback:

emailhttp://listserv.activestate.com/mailman/listinfo/komodo-beta
bugshttp://bugs.activestate.com/enter_bug.cgi?product=Komodo
forumshttp://community.activestate.com/products/Komodo

This is the third release of Komodo 5.1 on the way to a planned final release very soon (hopefully within a week or two). Here are a few goodies in this release. (See my previous posts about the Komodo 5.1a1 and Komodo 5.1a2 releases.)

Hyperlinks

Many IDEs that have code intelligence support allow you to Ctrl+click (Cmd+click on a Mac) on a symbol to Go to Definition. Here was Komodo's feature request for that. This is now implemented in Komodo 5.1b1.

Komodo hyperlink go to definition

However, we've gone one step further and made a generic system where Ctrl+mouse-hover will underline interesting regions (hyperlinks) in your text for clicking on. The most common type of hyperlink is a symbol for "Go to Definition". However other types of hyperlinks include:

  1. Colors in CSS (including CSS in HTML files):

    Komodo hyperlink colors

    As in Firebug, you'll get a swatch of the color when hovering over the color. What's more, Ctrl+click will bring up the system's color picker with which you can change the color.

  2. HTTP and FTP URLs:

    Komodo hyperlink URL

    Ctrl+click will load that URL in your browser.

  3. Regular expression mapping to an HTTP URL.

    Komodo hyperlink regex

    Currently 5.1.0b1 includes a regex to map occurrences of "bug \d+" to the appropriate bug in ActiveState's bug database. Eventually we'll have a preferences dialog where adding these mappings will be easier, but for now here is how you can add your own.

  4. A generic handler to do whatever you can think of.

    The hyperlinks above are all implemented with a simple mechanism in Komodo's ko.hyperlinks JavaScript namespace. You can add your own handlers to do other things. Following how the regexhandler works is a good place to start. We'll try to give more examples later.

Note: The hyperlink types other than "Go to Definition" are only in Komodo IDE (i.e. not in Komodo Edit) for the 5.1.0b1 release. So, if you want to play you should either use Komodo IDE 5.1.0b1 or use the latest nightlies.

koext updates

koext is a command-line tool for helping in building Komodo extensions. There are some great Komodo extensions that users have been building here. However, it is far from as easy as it should be to dig in and build Komodo extensions. Part of the solution is the koext tool. (Another part is documentation for extension authors, but that is a story for another time.)

We've started doing some updates to koext again (see the change log). Recent changes are working towards making it easier to have a quick development cycle -- i.e. make it so that to test a change to your extension you just need to:

  1. make your edit;
  2. possibly run koext build --dev, e.g. if you changed an IDL file; and
  3. re-start Komodo

Instead of the more laborious:

  1. make your edit;
  2. run koext build to build a new .xpi file;
  3. re-install that .xpi in Komodo;
  4. re-start Komodo

In a subsequent post I'll describe how I setup to build a Komodo extension. Here is a brief intro to koext from way back

Other stuff

A quick list of other feature work, notable bug fixes and fixed annoyances in Komodo 5.1.0b1:

  • Komodo's new "History" feature now has session support which is currently used to make your history specific to a single Komodo window.

  • In Komodo IDE, the History now shows the section title for locations in the History. This can make the "Recent locations" menu a lot more useful:

    Komodo section titles in recent history list

  • In XML (and HTML and PHP, etc.) files, clicking on a tag will briefly flash (highlight) the matching tag (bug 81606).

  • Komodo's "jump to matching brace" now works as you'd expect for opening and closing tags in XML/HTML (bug 43239).

  • We've done some crash fix work so that Komodo 5.1b1 should be more stable that 5.1a2. It is hard to quantify and we continue to look for crash issues in Komodo.

  • Greatly improved the annoyance of it being very hard to grab the bottom-pane and sidebar splitters on Mac OS X (bug 80756).

  • Fixed the annoyance of being unable to resize Name/Type/Value panes in Locals/Globals debugger window (bug 80566).

  • fix: codeintel: calltips cannot show unicode doc comments http://bugs.activestate.com/show_bug.cgi?id=70448

  • Added a "duplicate line or selection" command.

  • Added Korean and Japanese JIS encodings (bug 80890).

As well there is more coming. Try out the Komodo nightly builds for the very latest stuff:

22 comments

  1. Sridhar Ratnakumar March 13, 2009 3:52 AM

    You forgot about Fast Open. :-)

  2. trentm March 13, 2009 5:36 AM

    @sridhar: Shhh! I'm saving that one. Fast open has improved too much since the beta. :)

  3. Karol March 15, 2009 8:38 PM

    This relase looks awesome.. However.. when i tried to play with "1.Colors in CSS (including CSS in HTML files)" it doesn't seems to work... is it working with Komodo IDE only ? I'm using latest Komodo Edit...

  4. Karol March 15, 2009 8:52 PM

    Ahh... mea culpa... i see now a line about version of komodo which this feature is included. Sorry

  5. Florent V. March 15, 2009 11:01 PM

    One more reason to get a Komodo IDE license. Still a bit too costly for my needs (I don't need 90% of the IDE-specific features), though.

  6. Karol March 15, 2009 11:32 PM

    Florent, this hyperlinks feature is available in latest komodo edit nightly build :)

  7. trentm March 16, 2009 12:26 AM

    @florent: As Karol clarified: hyperlinks are in Komodo Edit. They just didn't make it into Komodo Edit for the *beta 1* release build.

  8. Karol March 16, 2009 10:02 PM

    @trent
    IS there a possibility to adjust "highlight the matching tag" feature. I mean set the time of active highlightin to a little bit longer or even make whole block with another background ?
    It's just a bit annoying when i select tag, and a closing tag is at the bottom of my file, so when i scroll down, matching tag isn't highlighted anymore.

  9. trentm March 17, 2009 1:25 AM

    @karol: Actually the "flashing" of the matching tag isn't done if the matching tag isn't visible. That was done for performance reasons... in case the matching tag is 1000s of lines away. However, perhaps there is a better middle ground. Could you log a bug for this and we can discuss it there (with another of the Komodo devs)? http://bugs.activestate.com/enter_bug.cgi?product=Komodo

  10. Florent V. March 17, 2009 2:49 AM

    Nice to have that feature in the Edit version as well. Too bad the standard color picker in Linux/Gnome is very limited, but just having a preview of the color is quite useful.

    Fast Open file: I will use that one a lot.
    History feature: I wasn't sure how that one would work at first, since the scope is not the tab (as in a Web browser) but the whole application. Now I'm starting to get it.

  11. trentm March 17, 2009 7:40 AM

    @karol: Also, you can use `Ctrl+]` to jump to the matching tag quickly... if that is more what you want.

  12. David March 18, 2009 5:18 AM

    The hyperlink feature seems like a great idea, and once it's stable I'm sure I'll love it. Right now, it's wreaking havoc for me. :)

    Komodo will often try to hyperlink to something when I strike the command key, without clicking on any 'link'. (e.g.: CMD-Tab to switch applications).

    Sometimes, it'll open a file from some keyword it finds in the current document. (no seeming rhyme or reason as to which keyword it picks) Sometimes, it'll throw an error (error determining definition), again with no obvious reason where it picked the string of text to evaluate. Sometimes it'll open the color palette (even with no color codes in the active doc) Sometimes It'll send me to a webpage, and I've even seen it try to open a PDF once.

    I've not yet found a reproducible case to file report on. Wanted to mention it and see if anyone else is having similar problems. This is happening pretty frequently (5-20 times/hour).

    FYI: Using OSX 10.4.11

    Cheers,
    David

  13. trentm March 18, 2009 6:26 AM

    @david: Thanks. Yah, it seems to be a little more niggly on Mac OS X. Bug started: http://bugs.activestate.com/show_bug.cgi?id=82416

  14. David March 18, 2009 8:20 AM

    @trentm: If I manage a reproducible case, I'll be sure to add it to teh bug. Thanks for the great work and keeping users in the loop!

    Cheers,
    David

  15. Nathan March 20, 2009 3:34 AM

    I really like the Hyperlinking feature! Unfortunately I can not get it to work in CSS files.. are there any pre-requisites for this to work?

  16. trentm March 20, 2009 4:17 AM

    @nathan: The CSS hyperlinking didn't make it into the Komodo *Edit* Beta 1 build. Is that perhaps what you are hitting?

    It is in the latest nightly builds though: http://downloads.activestate.com/Komodo/nightly/

  17. Nathan March 23, 2009 12:31 AM

    Yes I'm using Komodo Edit, I'll get the Nightly build, thanks! :)

  18. Zak March 24, 2009 2:53 AM

    I know there has to be more then just a debugger difference between Komodo IDE and Komodo Edit, but it would certainly be nice if the debugger was in Komodo Edit (maybe some sort of plus version?) because that is the only difference between the two products that I find compelling about the IDE vs EDIT.

  19. Matthias March 25, 2009 5:45 PM

    "In XML (and HTML and PHP, etc.) files, clicking on a tab will briefly flash (highlight) the matching tag"

    It should read "tag", not "tab". Just clicked the tabs like a moron thinking "that doesn't make sense". :-(

    However, nice features, love 'em!

    Great work, thank you!

  20. trentm March 25, 2009 11:03 PM

    @matthias: Thanks. Fixed.

  21. jack April 9, 2009 1:06 PM

    Is there a preference to disable the flashing of matching tags? Thanks.

  22. trentm April 13, 2009 1:33 AM

    @jack: Not currently, no. I've added a request for this here: http://bugs.activestate.com/show_bug.cgi?id=82738

add a comment

You can use these HTML tags: <a>, <strong>, <em>, <i>, <b>.