Editor Hyperlinks

Komodo can interpret certain strings in the buffer as hyperlinks. ‘Ctrl’+‘mouse hover’ (‘Cmd’+‘mouse hover’ on macOS) underlines the link. ‘Ctrl’+‘mouse click’ performs an action specific to the type of hyperlink selected.

There are three default hyperlink types:

Go to Definition (Komodo IDE only)

Code objects such as classes, methods, and subroutines link to their definition. This uses the built-in Go to Definition feature.

URLs

HTTP, HTTPS and FTP URLs are opened in the browser configured in Web & Browser preferences.

Colors

‘Ctrl/Cmd’+‘mouse hover’ over a color value in CSS (including CSS embedded in HTML) shows a pop-up swatch for the selected color. ‘Ctrl/Cmd’+‘mouse click’ raises a color picker dialog box for choosing and inserting a new color. Colors are inserted in RGB hexadecimal notation (e.g. “#ff0000” for red).

Custom

You can define your own hyperlinks using the ko.hyperlinks functions in the Komodo JavaScript API.

For example, the following userscript will match the given pattern and when clicked, will try to open the URL “http://foo.com/$1", where $1 is the regular expression match group 1. You can use $0 through to $9.

Hyperlink handlers are checked in the order they were originally added. Since the built-in “Go to Definition” handler matches quite a few patterns, it may be necessary to preempt it by reordering the handlers. To do this, replace the last line of the userscript above with the following: