Sublime Forum

How to synchronize editor and folder view

#1

Hi,

Is there a way to sync editor and folder view? That, way when I open a file manually, it will be automatically visible in the folder view at the left.

Thanks in advance

2 Likes

Linking sidebar with open files
Synch Folder View with Active Buffer
#2

Hey,

there is a option View -> Side Bar -> Show/Hide Open Files, opened files appear in open files group above folders. Hope that will work for You.

2 Likes

#3

Hi,

Thank you for the answer, displaying open files is not actually what I am looking for. Instead, when I open a tab, I wish for folder view to show the same file within the folder-file-tree.

1 Like

#4

I get it now, if You will not find it (I think there is no such option, but I’m quite new with Sublime), submit your proposition on sublimetext.userecho.com/

1 Like

#5

You can right-click in an open file and click “Reveal in side bar”

1 Like

#6

@celalo

Maybe this will help, simple plugin:

goto Sublime package folder, make dir “Project Side Bar”, in this folder make a file “Project Side Bar.py” put code below:

import sublime
import sublime_plugin

class SideBarListener(sublime_plugin.EventListener):
    
    def on_activated(self, view):
        view.window().run_command('reveal_in_side_bar')

Save and it’s done, rest will be done out of box :wink:

3 Likes

#7

Good idea, very handy. If now the sidebar would scroll to a already visible file… But this is a problem of the reveal_in_side_bar command.

1 Like

#8

Wonderful plugin.

It’d be great if there’s an option for when I hide the sidebar it doesn’t open it automatically (I know it sounds contradictory to the purpose but it’s necessary for smaller screens).

1 Like

#9

Wow! Amazing Plugin. Thank you for sharing. :smile:

1 Like

#10

The inability to disable this unfortunately makes this otherwise outstanding plugin unusable for me.

1 Like

#11

For posterity.

From Hidden Side Bar reappears when ST regains focus:

[quote]You may have installed syncedsidebar plugin.
Don’t blame the author, can’t know if the sidebar is open or closed. Sublime limitation.[/quote]

1 Like

#12

Hi! This package come with an option:

{
	// Plugin active state. Allows projects to override this setting if it's annoying without disabling the plugin entirely.
	"reveal-on-activate": true
}

How can be established this option to a project? I want to disable the plugin in one of my projects and I’m trying to set the “reveal-on-activate”: false in my .sublime-project file but I don’t know how.

Thanks!

1 Like

#13

It looks like the sublime settings API has changed a bit since I wrote that. I’ve just submitted a pull request that works with the current setup :smile:

1 Like