TheSpyder / SyncedSideBar

Sublime Text plugin to sync project sidebar (folder view) with currently active file.
341 stars 23 forks source link

Synching does not work if the path in project settings is "/" #25

Closed certainlyakey closed 10 years ago

certainlyakey commented 10 years ago

It seems that it's not a bug of plugin but rather a bug of ST itself. If I put / as the path to project file instead of absolute path - it makes project file portable and working on both Windows and OS X (if you sync ST profile between platforms) - current file does not sync to the sidebar. Also, ST Reveal in sidebar vanilla command stops working, it shows File not found in open folders error in status bar. The files and folders are shown normally, it's just that they are not in sync. With an absolute path everything's OK.

Here's for example how most of my .sublime-project files look:

{
    "folders":
    [
        {
            "path": "/"
        }
    ]
}

I'd be glad if someone could clarify or help with this.

TheSpyder commented 10 years ago

Correct, this has nothing to do with the plugin. The native reveal in side bar command is what the plugin uses, if that is broken there's nothing we can do. You could try the forums or http://sublimetext.userecho.com/ for bug reporting.

Wouldn't using "/" load your entire filesystem? :)

At my day job we use "path": "." for our sublime configs, it's portable between OS X and Linux (we don't use windows). Give that a try and see if it works for you.

certainlyakey commented 10 years ago

Thanks for the clarification. "/" for path in "*.sublime-project" means that if you place this file in the root of the project, it will add the contents of this folder to the project files.

As for Sublime Text config files (did you mean Packages folder?), I didn't know that there's a way to tell the app the path to its settings without using symlinks. Where do you put "path": "."?

TheSpyder commented 10 years ago

I meant in the project config, that same .sublime-project file.

Using the path of the project file is exactly what we use path "." for. Just replace the "/" with "." in your project file - I suspect that will be more portable than "/" since both windows and mac support "." to mean the current folder while windows uses "\" for folder paths.

certainlyakey commented 10 years ago

It seems "." works as well as "/", and sidebar is in sync too! Thank you, @TheSpyder!