Sublime Forum

Jump to definition( f12 ) only works for open files


Hello I am trying to use F12 to jump to a typedef definition for my C project. When the header files are individually opened, F12 works just fine. I can’t figure out how to get the feature to work with files that are part of my project’s scope. Am I missing something? TYVM



Do you perhaps have "index_files": false or "index_exclude_patterns": ["*.h"] in your settings? It would also be worth checking the index status through the menu: Help > Indexing Status…



I checked I don’t think I have it disabled. Works when the files are open, but can’t hit them when they’re just part of the project directory.

Edit: I think my project directory was too big(165,000). Got it down to about 20,000 files and still pretty slow.

Is there any way to specify only indexing .c and .h files?

Forgot to mention, my directory is mounted from sshfs.



Seems to be a lot better after adding this to my project file to specify only looking for .c and .h files. TY!

“path”: “/Volumes/sshfs/libs”,
“index_include_patterns”: [".c", ".h"]