Plugin: Make File Explorer path follow tabs
Plugin: Make File Explorer path follow tabs
When this plugin is installed, File Explorer will change its current path automatically to document's path when tabs are switched. Will work in editors 2016 build 183+.
- Attachments
-
- File Explorer Follow Tabs.zip
- (685 Bytes) Downloaded 1346 times
Blumentals Software Programmer
Re: Plugin: Make File Explorer path follow tabs
I really LOVE this plugin. Simple, yet extremely useful.
There is however a small problem/annoyance (Not the plugin itself, but the way WeBuilder works internally) with the File Explorer filetree aligning to the left.
Example:
Try opening a couple files from the WeBuilder plugins folder.
Then switch between documents, and you'll see the File Explorer filetree is aligning to the left, making it hard to see the folder name without having to scroll or make the File Explorer panel wider.
A solution would be to align the File Explorer filetree to the right. (Could be an extra action, you could call from plugin if it conflicts with regular (non-plugin) use of the File Explorer)
There is however a small problem/annoyance (Not the plugin itself, but the way WeBuilder works internally) with the File Explorer filetree aligning to the left.
Example:
Try opening a couple files from the WeBuilder plugins folder.
Then switch between documents, and you'll see the File Explorer filetree is aligning to the left, making it hard to see the folder name without having to scroll or make the File Explorer panel wider.
A solution would be to align the File Explorer filetree to the right. (Could be an extra action, you could call from plugin if it conflicts with regular (non-plugin) use of the File Explorer)
There are 10 types of people in the world: Those who understand binary and those who don't.
Re: Plugin: Make File Explorer path follow tabs
I think the programmatically selected item should always try to scroll into view. Aligning to the right wouldn't be ok for those cases where you switch from a location deep into the folder hierarchy to some folder in the root of the filesystem/project.
I'll add this to todo list and we'll check what the technically difficulty level of this improvement is.
I'll add this to todo list and we'll check what the technically difficulty level of this improvement is.
Blumentals Software Programmer
Re: Plugin: Make File Explorer path follow tabs
A little modification:
Change line 2 to:
That will keep the current path open when creating a new file. (which usually is saved in the same folder as the previous.)
Change line 2 to:
Code: Select all
if ((Actions.IsChecked("ActFileExplorer")) && (Doc.Filename != "")) {
There are 10 types of people in the world: Those who understand binary and those who don't.
Re: Plugin: Make File Explorer path follow tabs
Hi,
I like this plug-in very much, but in some circomstances I need to disable the plugin, because it's working contra-productive.
My question: Is there a possibility to assign a short-cut to disable/enable this plugin?
I searched for it, but could not find a way to assign a shortcut.
If not possible yet, can you please add that possibility?
Best regards,
Klipper
I like this plug-in very much, but in some circomstances I need to disable the plugin, because it's working contra-productive.
My question: Is there a possibility to assign a short-cut to disable/enable this plugin?
I searched for it, but could not find a way to assign a shortcut.
If not possible yet, can you please add that possibility?
Best regards,
Klipper
Re: Plugin: Make File Explorer path follow tabs
You can modify the plugin yourself.Klipper wrote:Hi,
I like this plug-in very much, but in some circomstances I need to disable the plugin, because it's working contra-productive.
My question: Is there a possibility to assign a short-cut to disable/enable this plugin?
I searched for it, but could not find a way to assign a shortcut.
If not possible yet, can you please add that possibility?
Best regards,
Klipper
- Open the "init.js" file in the plugin folder.
- Change the OnDocFocus function to this:
Code: Select all
function OnDocFocus(Doc) { if ((Actions.IsChecked("ActFileExplorer") && (Script.ReadSetting("Enabled", "1") == "1")) { Actions.Execute("ActActivateFolderOfCurrentFile"); } }
- Add this code (at the bottom):
Code: Select all
function Toggle() { var status = 1; if (Script.ReadSetting("Enabled", "1") == "1") status = "0"; Script.WriteSetting("Enabled", status); } Script.RegisterDocumentAction("", "Toggle File Explorer Follow Tabs", "", &Toggle);
- Save the file.
- Create a file named "properties.ini" in the same folder as the "init.js" file.
- Open the "properties.ini" and add this content:
Code: Select all
[Properties] Enabled=check [Values] Enabled=1
- Save the file.
- Reload the editor. - You should now have a new entry under "plugins" which you can asign a shortcut to.
There are 10 types of people in the world: Those who understand binary and those who don't.
Re: Plugin: Make File Explorer path follow tabs
Wow, thank you very much.
Will try this asap.
Will try this asap.
-
- Posts: 3
- Joined: Sun Sep 17, 2023 5:54 pm
Re: Plugin: Make File Explorer path follow tabs
Their is error in the code provided missing bracket in the end
correct code is
correct code is
Code: Select all
function OnDocFocus(Doc) {
if ((Actions.IsChecked("ActFileExplorer") && (Script.ReadSetting("Enabled", "1") == "1"))) {
Actions.Execute("ActActivateFolderOfCurrentFile");
}
}
-
- Posts: 1
- Joined: Thu Sep 19, 2024 3:46 pm
Re: Plugin: Make File Explorer path follow tabs
This plugin for Blumentals editors (build 2016, 183+) syncs File Explorer's current path with the document's location when switching tabs. It's lightweight and enhances workflow efficiency for users managing multiple files across directories. where's my water