Plugin: Make File Explorer path follow tabs

Browse, download and discuss plugins for Blumentals code editors

Plugin: Make File Explorer path follow tabs

Postby Aivars » Thu Apr 14, 2016 10:47 am

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 110 times
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2282
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Plugin: Make File Explorer path follow tabs

Postby pmk65 » Wed Mar 01, 2017 1:45 pm

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 are 10 types of people in the world: Those who understand binary and those who don't.
User avatar
pmk65
 
Posts: 584
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark

Re: Plugin: Make File Explorer path follow tabs

Postby Aivars » Wed Mar 01, 2017 2:13 pm

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.
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2282
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Plugin: Make File Explorer path follow tabs

Postby pmk65 » Tue Mar 21, 2017 8:30 pm

A little modification:

Change line 2 to:
Code: Select all
  if ((Actions.IsChecked("ActFileExplorer")) && (Doc.Filename != "")) {


That will keep the current path open when creating a new file. (which usually is saved in the same folder as the previous.)
There are 10 types of people in the world: Those who understand binary and those who don't.
User avatar
pmk65
 
Posts: 584
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark

Re: Plugin: Make File Explorer path follow tabs

Postby Klipper » Fri Oct 19, 2018 5:11 pm

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
User avatar
Klipper
 
Posts: 13
Joined: Fri Jun 17, 2011 3:18 pm

Re: Plugin: Make File Explorer path follow tabs

Postby pmk65 » Thu Oct 25, 2018 12:35 am

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


You can modify the plugin yourself.
  1. Open the "init.js" file in the plugin folder.
  2. Change the OnDocFocus function to this:
    Code: Select all
    function OnDocFocus(Doc) {
      if ((Actions.IsChecked("ActFileExplorer") && (Script.ReadSetting("Enabled", "1") == "1")) {
        Actions.Execute("ActActivateFolderOfCurrentFile");
      }
    }
  3. 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);
  4. Save the file.
  5. Create a file named "properties.ini" in the same folder as the "init.js" file.
  6. Open the "properties.ini" and add this content:
    Code: Select all
    [Properties]
    Enabled=check

    [Values]
    Enabled=1
  7. Save the file.
  8. 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.
User avatar
pmk65
 
Posts: 584
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark

Re: Plugin: Make File Explorer path follow tabs

Postby Klipper » Wed Nov 14, 2018 1:26 pm

Wow, thank you very much.
Will try this asap.
User avatar
Klipper
 
Posts: 13
Joined: Fri Jun 17, 2011 3:18 pm


Return to Plugins for HTMLPad / Rapid CSS / Rapid PHP / WeBuilder

Who is online

Users browsing this forum: No registered users and 1 guest