Sublime Forum

Goto Symbol (Ctrl-Shift-R) not working

#1

Usually when you open a folder in Sublime Text 3, the program takes some time to go through all the files in it to find symbols for Ctrl-Shift-R to use. This worked like a charm until this morning. Now immediately after opening a folder, Ctrl-Shift-R shows no symbols. After opening one file, Ctrl-Shift-R only knows about symbols in that file. When I close it, Ctrl-Shift-R immediately forgets about that file, too. That makes the feature quite a lot less useful. In the meantime, Sublime will happily still parse projects such as the Linux kernel and Ctrl-Shift-R will work like a charm there.

Reverting to a Freshly Installed State (mv ~/.config/sublime-text-3/ ~/.config/sublime-text-3.b/) didn’t work. Upgrading to build 3053 didn’t help.

0 Likes

#2

Hrm… in the rebuilt ~/.config/sublime-text-3/Index folder there’s 000011.log; strings 000011.log gives what looks suspiciously like a symbol list for my project. Maybe Sublime is failing to parse this file correctly?

0 Likes

#3

What happened is that Sublime Text refused to parse the directory because it exceeded some internal limit in number of files or sizes due to a leftover unpacked chroot. Removing that resumed normal functionality.

0 Likes

#4

Thanks a ton for this post @bp_! I’ve been experiencing the same thing for quite some time on multiple machines and this functionality not working almost drove me into the hands of a clunky IDE. Mine did work at one point and like your situation, seemed to suddenly stop working. I’ve been checking the forums once in a while for a glimmer of hope.

I fixed mine using these steps:

  1. Quit ST3.

  2. Clear out the Sublime Text 3 Index
    folder (I’m on OS X so I deleted the contents of ~/Library/Application Support/Sublime Text 3/Index).

  3. Open ST3 (and open your project if it’s not yet open) and wait for the index to rebuild. For me this took < 30 seconds and when complete the .log file had grown and I could use Goto Symbol in Project…
    again!

While testing I did spot this error in the console after opening a folder, seemed kinda related:

error: unable to open crawldb, indexing is unavailable

Before deleting my index I had three .sst files in Index, one under 1MB and two were ~2.1MB. ls -al on the busted Index directory gives:

drwxr-xr-x 11 Scott staff 374 Oct 18 22:12 . drwxr-xr-x@ 31 Scott staff 1054 Oct 18 22:12 .. -rw-r--r-- 1 Scott staff 0 Jun 29 15:21 000502.log -rw-r--r-- 1 Scott staff 2127999 Jun 29 14:41 000503.sst -rw-r--r-- 1 Scott staff 2128549 Jun 29 14:41 000504.sst -rw-r--r-- 1 Scott staff 844929 Jun 29 14:41 000505.sst -rw-r--r-- 1 Scott staff 16 Jun 29 14:41 CURRENT -rw-r--r-- 1 Scott staff 0 May 11 11:54 LOCK -rw-r--r-- 1 Scott staff 0 Oct 18 21:48 LOG -rw-r--r-- 1 Scott staff 0 Oct 18 21:48 LOG.old -rw-r--r-- 1 Scott staff 0 Jun 29 15:06 MANIFEST-000500

(edited to fix file path)

0 Likes

#5

Sounds like you guys are on the bug hunt, but as a work-around I just added the keybind to my user keybinds file:

For OSX:

  { "keys": "command+shift+r"], "command": "goto_symbol_in_project" }

For Windows / Linux:

  { "keys": "ctrl+shift+r"], "command": "goto_symbol_in_project" }
3 Likes

#6

I’m running into this exact issue (see bp_ 's original post). Cottser’s solution posted above didn’t work for me; I’m using Windows 7. I’ll post again / update if I can get things working.

I’m seeing the error “[WinError 2] The system cannot find the file specified” in the console. Perhaps deleting AppData\Local\Sublime Text 3\Index* has caused the project to be in an invalid state?

EDIT: Here’s what worked for me:

Delete the contents of AppData\Local\Sublime Text 3\Index
Delete all .sublime-workspace files in AppData\Roaming\Sublime Text 3
Reboot
Restart Sublime

(A reboot probably isn’t needed, but I did one anyway… you may be able to get by without it).

0 Likes

#7

For me, disabling Emmet package solved it.

0 Likes

#8

I also started having this issue. I found the issue with 2 different files on 2 different machines (work & home). I fixed my at-home file’s issue by changing some of my syntax. I am writing Javascript ES2015 and tried being clever by typing
new class MyBrokenClass { .... }
I moved the new keyword to beneath the class declaration (which even changed my syntax highlighting) and that fixed the issue for my home bug. I haven’t figured out the work bug yet. There’s a slim chance something in the syntax is causing issues? (I found this on a fresh install of Sublime, so no plugin bugs).

Hope that’s helpful…

0 Likes

#9

Just created an account to like your comment. Thank you so much, my friend!

0 Likes

#10

I had same issue. Just now I added this line my windows pc and its solve like magic

0 Likes

#11

There is an error in that line, its missing a [

{ “keys”: [“ctrl+shift+r”], “command”: “goto_symbol_in_project” }

0 Likes