Sublime Forum

How to "go to" Javascript functions?

#1

I presume Sublime Text’s “Goto Anything” thingy is able to jump to specified functions. Now I have some JS function called “Fieldpopup()” in the header of my HTML file.
What would I have to enter if I want to jump there within the file?

0 Likes

#2

[quote=“tux.”]I presume Sublime Text’s “Goto Anything” thingy is able to jump to specified functions. Now I have some JS function called “Fieldpopup()” in the header of my HTML file.
What would I have to enter if I want to jump there within the file?[/quote]

Press Ctrl+P then type, “@field” and you should jump to the function :smile:

0 Likes

#3

Ahhh great, thanks. :smile:
Are there any docs about that?

0 Likes

#4

[quote=“tux.”]Ahhh great, thanks. :smile:
Are there any docs about that?[/quote]

Maybe on sublimetext.info

0 Likes

#5

AFAICS the goto thingy does not have a description there yet. :confused:

0 Likes

#6

It was introduced in one of the download pages.

[quote]Goto Anything: ‘@’ operator will select the current symbol by default
Goto Anything: ‘:’ operator won’t scroll the view until a line number is entered
Goto Anything: ‘#’ operator won’t set the whole word flag on the find panel
Goto Anything: ‘#’ operator can be used to search for punctuation
Goto Anything: Fixed a bug where an unexpected file could be selected[/quote]

0 Likes

#7

Whew. URL? Got lost on the website…

0 Likes

#8

You can see it the description in the “20110129 Changelog”, near the bottom of the page at http://www.sublimetext.com/2.

As a quick note, you can also use ctrl+r, which will pop up the goto anything box with the @ already in there.

The various shortcuts are:
ctrl+p - goto anything
ctrl+r - goto symbol (@)
ctrl+g - goto line(:slight_smile:
ctrl+; - goto word (#)

0 Likes

#9

Yikes. Thank you very much! :smile:

0 Likes