funap / npp-explorer-plugin

Explorer plugin for Notepad++ x64/x86
GNU General Public License v2.0
84 stars 10 forks source link

Root folder for documents #57

Closed tiomanisland closed 1 year ago

tiomanisland commented 1 year ago

It doesn’t allow me to specify which one is ROOT folder. The problem is that if I move into subfolder and perform a search, it will only look at that subfolder and folders below them. I would like it to always search in main (root) folder and below (project folder + subfolders). If I work on a project, root should be main folder, no matter if I move to images/ or any other subfolder.

Can you do this?

tiomanisland commented 1 year ago

@funap is this easy to do? Please.....

funap commented 1 year ago

@tiomanisland Added "set as root directory" to the right-click menu. If you have additional requests, I welcome new issues. https://github.com/funap/npp-explorer-plugin/releases/tag/v1.8.2.25

vinsworldcom commented 1 year ago

The downside I see with this is there is no way to tell what the root directory is set at or even if I have set it (long open Notepad++ session and I forget). There is no way to "unset" it, is there - unless setting it to another? How to clear it and get the previous behavior - searching current directory?

Cheers.

tiomanisland commented 1 year ago

Solutions:

1) If I used "Open folder as Workspace" then this folder has to be root. I am not sure if plugin can read that information.

2) Is it possible to add menu to right click on any folder (including top folder) in "Workspace" and say "This is now root folder for npp explorer?

vinsworldcom commented 1 year ago

@tiomanisland

I agree this is a nice-to-have feature, I just want some way to visually "see" that a root folder has been set and what it is. Since I would also like to have the current behavior of just fuzzy searching the current directory when I'm not dealing with a project. Also, I never use Folder as Workspace so relying on that I don't think is a good practice.

The current solution seems to work fine!

Cheers.

funap commented 1 year ago

@tylertitsworth thanks for suggesting.

If I used "Open folder as Workspace" then this folder has to be root. I am not sure if plugin can read that information. Is it possible to add menu to right click on any folder (including top folder) in "Workspace" and say "This is now root folder for npp explorer?

Currently, Notepad++ does not provide an API to read files and folders registered in the workspace from plugins. So, it is not possible to create such a solution... sorry. In the future, when Notepad++ supports plug-ins, we will consider adding options to change the behavior.

tiomanisland commented 1 year ago

Hmmm I understand. I could use Explorer instead of Folder as Workspace but I really don't like the fact that Explorer has 2 windows. Folders on top and files on bottom. It makes no sense to me, just waste of space. Is it possible to make Explorer use only files window because even in that window I can see subfolders or go up one folder? Besides that in Explorer icons in menu are fuc*ed up, they are tiny on 4k notebook (I think this is N++ problem as I noticed this in other plugins too) while on FAW eveything looks good.

@funap if you could just add setting "Show only files part" that would be fantastic.

I also agree with @vinsworldcom - it would be nice if folder icons shows green checkmark or something to show this has been selected as Root folder. Not sure if this is easy to do.