Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime does not show all files and folders in its sidebar

Tags:

sublimetext2

I am using Sublime Text 2.0.2 on OS X (10.8.5). Most of the times, when I work on a project, I open the according folder so that it shows in the sidebar. Until now this has always been working perfectly.

Now I cloned a really big repository with lots and lots of folders and files, deeply nested within each other. To be exact: It's 20894 files within 4326 folders.

When I open the top-most folder of this repository, everything looks normal - but some folders appear as empty folders. Hence it looks like as if there were no files, although there definitely are some, even folders will not be shown.

It looks as if Sublime cuts everything below a certain folder and refuses to show it.

Does anybody know what causes this behavior and how to fix it?

Just waiting doesn't help: Although it may be that Sublime works in the background to read the tree, even after two hours of waiting nothing happened to the not-shown files and folders. So apparently there must be another problem.

And, as pointed out in the comments: There is no exclusion pattern.

In Sublime's console it says:

scan: /some/folder has been seen before, skipping (using inode)
previous path: /some/other/folder inode: 27425614.

The folder /some/folder is missing. It may be that this is correlated, but I'm not sure. Any ideas?

Please note that this question is actually not related to programming itself, but to a tool commonly used by software developers (there's even a tag for it). As the FAQ states that question related to such tools are fine, I posted it here.

like image 543
Golo Roden Avatar asked Oct 18 '13 13:10

Golo Roden


People also ask

How do I get the sidebar to show files?

In Windows '''Ctrl-K Ctrl-B" opens and closes the sidebar. Of course you first need to View->ShowOpenFiles, or have a project set in order to have access to the sidebar. THANK YOU, that's the answer I was looking for :) Ctrl-0 (zero) and the file is highlighted in the sidebar.

How do I view folders in Sublime Text 3?

Then on sublime text go to view>sidebar>show sidebar. Finally, 3 tabs away from view is a project tab. Click on project> add folder to project.. and then choose the folder you downloaded/unziped to your computer.

How do I view side by side in Sublime Text?

To view two row (horizontal) panes side-by-side use the shortcut SHIFT-ALT-UP-2 (PC) or SHIFT-OPTION-⌘-2 (Mac). Replace the last stroke with “3” to view three panes respectively. If you want to split a pane further, you can use ST3's “Group” feature.


2 Answers

Maybe it is busy trying to read the tree. You may try refresh the project anyway, but reading the large tree does take time.

I met this when I import the Android source tree. I ended up adding excludes to project (blacklisting) or create a smaller project (whitelisting).

EDIT: (ST3 only)

Now that symlinks seems to be the problem (see UPDATE below), you may try adding follow_symlinks to your project file (ST3's created project has this as default):

{
    "folders":
    [
        {
            "follow_symlinks": true,
            "path": "~/android/frameworks/av/camera"
        },
        {
            "name": "android.media",
            "follow_symlinks": true,
            "path": "~/android/frameworks/base/media/java/android/media/"
        },
        {
            "name": "android.media/jni",
            "follow_symlinks": true,
            "path": "~/android/frameworks/base/media/jni"
        },
        {
            "name": "av/media",
            "follow_symlinks": true,
            "path": "~/android/frameworks/av/media",
            "folder_include_patterns": [
                "*media*",
            ]
        },
        {
            "follow_symlinks": true,
            "path": "~/android/frameworks/av/services",
            "folder_include_patterns": [
                "*camera*",
            ]
        }
    ]
}

UPDATE (20131106):

I encounter the same issue working on the AOSP source tree which has no symlinks. If I used this instead of the andoird.media and andoird.media/jni above, media/java will not expand. So the above is a work around by explicitly expanding the folders in the project file.

        {
            "name": "android.media (failing)",
            "follow_symlinks": true,
            "path": "~/android/frameworks/base/media/",
            "folder_include_patterns": [
                "java",
                "jni"
            ]
        },

To create a project subl <folder> as usual. Save the project ("Project" -> "Save Project As"), then you can "Project" -> "Edit Project" to fine tune project settings.

To open a project:

  • subl <project>.sublime-project
  • "Project" -> "Open Project"
  • "Project" -> "Open Recent"

Official Documentation

like image 169
leesei Avatar answered Oct 04 '22 03:10

leesei


I had a similar issue with folders displaying incorrectly.

What worked for me was deleting the .sublime-workspace file and then open the project again.

like image 35
MrThunder Avatar answered Oct 04 '22 04:10

MrThunder