Home Download Buy Blog Forum Support

"Goto definition" functionality

"Goto definition" functionality

Postby adamharte on Wed Apr 11, 2012 5:55 am

I am creating a plugin to support a new language, and I want to add "Goto definition" functionality, but I am not sure where to start with this. Are there any other language plugins that support this kind of thing? Is Sublime even suited for this? Anything would help me at this point.
adamharte
 
Posts: 3
Joined: Thu Jan 26, 2012 8:50 pm

Re: "Goto definition" functionality

Postby nick. on Wed Apr 11, 2012 1:28 pm

I believe anything with the scope entity.name.function appears in the GoTo Definition feature.
nick.
 
Posts: 266
Joined: Wed Jan 18, 2012 3:45 am

Re: "Goto definition" functionality

Postby adamharte on Wed Apr 11, 2012 9:06 pm

Oh, are you saying that there is already the GoTo Definition feature available by default? How do you use it?
adamharte
 
Posts: 3
Joined: Thu Jan 26, 2012 8:50 pm

Re: "Goto definition" functionality

Postby nick. on Thu Apr 12, 2012 1:49 am

When creating the language definition, use the scope entity.name.function for anything you'd like to see in the GoTo Definition panel.
nick.
 
Posts: 266
Joined: Wed Jan 18, 2012 3:45 am

Re: "Goto definition" functionality

Postby C0D312 on Thu Apr 12, 2012 2:06 am

A few plugins have this functionality. For example, SublimeCodeIntel, SublimeRope, and SublimeClang have "go to definition." What nick. is referring to is the "Go To Symbol" panel which displays a list of all the methods in the current file. You can get to this panel by pressing @ in the Go To Anything panel (control+p). This also works for any file in the current project. filename#function_name. I'm assuming you're referring to highlighting a method and pressing some keystroke to take you the the declaration of said function.
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: "Goto definition" functionality

Postby nick. on Thu Apr 12, 2012 1:38 pm

Good call C0D312, I hadn't understood the question that way. I use CTags for that feature.
nick.
 
Posts: 266
Joined: Wed Jan 18, 2012 3:45 am

Re: "Goto definition" functionality

Postby alexfradiani on Mon Jan 28, 2013 1:22 am

This functionality is very important for me.

Are you saying that installing the CTags plugin it can be possible to go to a function definition by a key combination? could this work for Javascript?
alexfradiani
 
Posts: 1
Joined: Mon Jan 28, 2013 1:20 am


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 15 guests