Home Download Buy Blog Forum Support

Go to Declaration

Go to Declaration

Postby Surt on Sat Jan 29, 2011 11:05 am

Hi, i'm new to sublimetext, i was wondering if it's possible to "go to Declaration". I use it a lot on my everyday PHP coding.
On keybind pressed, when I'm over a function, what it does is Open the project file where the function is and place the cursor on it. This way i can jump around my code without need to open files manually.

I was triying with "Ctrl+P" but i need to especify file and function.
Surt
 
Posts: 1
Joined: Sat Jan 29, 2011 10:59 am

Re: Go to Declaration

Postby benhoyt on Sat Jan 29, 2011 9:43 pm

This is a really great idea. I just started using Sublime Text 2, and the Goto Anything feature is brilliant.

However, if there was a way to goto symbols in a cross-file way, that'd be awesome. I presume this would mean the editor would have to keep an in-memory index of all symbols in your project so it's fast enough. (I don't mean an index file like ctags, because Sublime already knows what symbols are based on the language definition.)

For instance, you could type something like Ctrl+P then "@@my_func" to start searching for the symbol my_func in any of your files.

Would it be possible to do this via a plugin?

At present, do most people do this using Find in Files? (Not as slick, because it'll match more than just symbol definitions, but does the job.)
benhoyt
 
Posts: 8
Joined: Sat Jan 29, 2011 9:34 pm

Re: Go to Declaration

Postby famulus on Fri Mar 25, 2011 3:19 pm

Are there any plans to support this in the future?

This is the number one reason that keeps me going back to more heavyweight IDEs like Eclipse. E.g. when programming in Scala where symbols can be in files that have a completely unrelated name, it is very hard to find these.

Thanks!
famulus
 
Posts: 1
Joined: Wed Mar 09, 2011 9:44 am

Re: Go to Declaration

Postby jao on Mon Sep 05, 2011 12:57 pm

If you're up for these features 'go to declaration' and others vote for this feature request: http://sublimetext.userecho.com/topic/5 ... -indexing/
jao
 
Posts: 1
Joined: Mon Sep 05, 2011 12:55 pm

Re: Go to Declaration

Postby marmotz on Mon Sep 05, 2011 1:28 pm

Use SublimeCodeIntel plugin !
marmotz
 
Posts: 4
Joined: Thu Sep 01, 2011 12:45 pm

Re: Go to Declaration

Postby joaodrp on Mon Sep 05, 2011 5:08 pm

marmotz wrote:Use SublimeCodeIntel plugin !


It only works (with all features) for python
joaodrp
 
Posts: 31
Joined: Fri Jul 29, 2011 11:29 am


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], fizzicist and 11 guests