18
votes

so I downloaded sublime text 3 which allegedly "Sublime Text now scans the files in your project, and builds an index of which files contain which symbols. This backs the new features Goto Definition and Goto Symbol in Project".

I created a new project containing the source code of zend framework...I then attempt to do goto definition and goto symbol but they are all still only allow you to "Goto" definitions/symbols in the current file instead of the entire project.

How exactly should I configure sublime text 3 such that I can use the goto definition/symbol to any method in the project and not just the current file (akin to Eclipse's Ctrl + Shift + M Open method feature).

2
Just to make sure, you were doing ctrl+shift+r not ctrl+r when you tried this in the new project correct?skuroda

2 Answers

18
votes

First off, make sure the relevant folders are added to your project by checking that they appear in the side bar under FOLDERS (which you can toggle using -K -B). If the Zend folder isn't there, add it by going to Project » Add Folder to Project....

Then you should use Goto » Goto Symbol in Project... (or --R). Goto Definition should search in the whole project. At least this is what it behaves like for me on Sublime 3 build 3019 for OS X.

Replace with CTRL and with SHIFT if on Windows.

6
votes

Assuming this is not a shortcut issue (You can test this by trying to find symbol from the menu)

Try:

  1. Quit Sublime Text 3.
  2. Clear out the Sublime Text 3 Index folder
    • In OS X, delete the contents of ~/Library/Application Support/Sublime Text 3/Index
    • In Windows, delete the contents of AppData\Local\Sublime Text 3\Index\
  3. Open ST3 and your project
    • Open Console (View -> Show Console)
    • Check for errors

Most likely after step 3, your project will be back to normal, but if it isn't check what the problem is while indexing and try to search for that specific problem.

EDIT: Depending on the size of your project rebuilding cache might take looong