Tag Archives: Sublime Text

Sublime Text 3: goto function

This is for anyone using Sublime Text. I have a licensed version, but you can actually use it for free (if you don’t mind a periodic reminder to register). [Endorsement warning…] I find it to be the best light-weight editor I’ve ever used.

Sublime Text 3 is still in beta, but it introduces a very powerful Eclipse-like feature, that allows you to “jump to” a function. I believe you can do something like that within a file in Sublime Text v2, but with the project view in v3, you can do it across files. It also seems to recognize both global functions as well as inherited functions if you’re doing OOP javascript.

In v2, you can take advantage of within-file-goto-function by pressing [ctrl+r].

In v3, set up a project file, set cursor over a function and press F12.
You can also create a key binding so that you can hold ctrl and click with the mouse. Here are instructions for that:
http://stackoverflow.com/questions/16235706/sublime-3-set-key-map-for-function-goto-definition

Tagged ,