ActiveState Community

Can I set ctrl+click to "Go To Definition"

Posted by aaroncampbell on 2008-07-17 07:14

I'm trying to switch from Zend Studio (having support issues with them, but I love their product so it's hard). Anyway, one of the things that I often used in Zend Studio was the ability to ctrl_click on any function. If it was a PHP function, it would take you to the PHP.net page. If it was a custom function, it would take you to it's definition.

It looks like it's supposed to do the same thing if I press ctrl+k,ctrl+g which isn't near as simple.

ToddW | Thu, 2008-07-17 10:59

You can get online help (php.net) on a function using Komodo's alternative language help, the Shift-F1 key combination by default.

The ctrl mouse-click on the function would be a nice addition to Komodo, and there is a request to add this feature to Komodo here:
http://bugs.activestate.com/show_bug.cgi?id=76721

Cheers,
Todd

aaroncampbell | Thu, 2008-07-17 13:22

Thanks.

jeffg | Thu, 2008-07-17 13:40

You can re-map the keybinding for go to definition ( or any number of other things ) in Komodo's prefernces:

Preferences / Editor / Key Bindings

You'll want to type in a term in the 'Commands' field in that pref pane to filter the list. There are two distinct commands You'll want to re-map:

'Source Code: Go to Definition'

and

'Help: Language-specific Help on Selection'

Admittedly this is not quite as convenient as Zend for two reasons:

1. you can't bind a Key / Mouse combination together ( however you *can* bind something much simpler than Ctrl+K,Ctrl+G )
2. you have to remind yourself whether the function is defined in your own code or PHP itself

--
JeffG
http://www.openkomodo.com/blogs/jeffg

aaroncampbell | Thu, 2008-07-17 14:20

Hopefully the ticket linked and the related ticket will be resolved and then I'll be able to use ctrl+click again (ctrl+hover would be nice too and helps to distinguish custom from built-in functions).