Sublime Forum

Fuzzy filesystem find?

#35

@facelessuser, can you please make this a repo instead of a gist. That way I can just pull request my changes.

I’m making some tweaks and fixing some stuff. Looks good though.

0 Likes

#36

I will tonight or tomorrow. I didn’t except this to take off like it has.

0 Likes

#37

@facelessuser

The :mkdir/file commands are really cool.

I forgot to mention in my previous post that the plugin feels a lot snappier now. I was very pleased with this when I ran into the following problem: sometimes, when I press .., it registers two keypresses by the time I pull my finger off the enter key. I’ve only tried the newer versions of the plugin on my netbook and it’s possible the key is wonky – or maybe my finger is :smile:

I was thinking, if it’s possible to write a message to the status bar while the panel is open, that that might be a place (as a temporary? fix) to write out the current directory. This the sort of information that I don’t need at all, until I do – and then I really need it.

Thanks again for working on this.

Sure… :wink:

0 Likes

#38

Because it’s not checking the size of every file or getting the contents of every folder.

@Facelessuser: any reason you went with on_modified rather than on_query_context + keybindings? I feel like the latter offers more potential… One thing I need to figure out: reloading while keeping the contents of the quickpanel input intact. (i.e. opening the quickpanel with initial text)

0 Likes

#39

[quote=“C0D312”]

Because it’s not checking the size of every file or getting the contents of every folder.[/quote]

Sorry I was unclear here. I understand why it’s faster than the previous few versions, but it feels faster than the very first version, as well. I couldn’t figure out how go back into a gist’s history to test this, though. And it may just be that I’ve built a bit of muscle memory. At first, it was just weird using enter rather than tab for moving through directories. (I.e., for /home/alex/downloads I’m used to typing cd /h<tab>a<tab>dow<tab>.)

0 Likes

#40

Okay, so I’m close to figuring out the initial_text thing. I’m using on_activated to populate the window. Unfortunately, it crashes sublime…

EDIT: hmmm… the on_activated method is being called 3 times whenever the panel is opened.

Anyway, I found my infinite loop. Fixing now.

0 Likes

#41

[quote=“C0D312”]
@Facelessuser: any reason you went with on_modified rather than on_query_context + keybindings? I feel like the latter offers more potential… One thing I need to figure out: reloading while keeping the contents of the quickpanel input intact. (i.e. opening the quickpanel with initial text)[/quote]

I am not against on_query_context, I am just exploring. Now that I can grab the quick panel view and process it, I may bring in some on_query_context down the road. I think on_query_context is good for things that specifically work well with keystrokes. but things like the mkdir/mkfile feature don’t work well with keystrokes. The home feature works well with either, so currently I am using on_modified until I have a **need **for on_query_context.

on_query_context is more powerful is some ways, but weak in other ways depending on your task. It also adds a more complexity (require a keymap file etc) that I am purposely avoiding until if/when I need to use it.

[quote=“quodlibet”]
Sorry I was unclear here. I understand why it’s faster than the previous few versions, but it feels faster than the very first version, as well. I couldn’t figure out how go back into a gist’s history to test this, though. And it may just be that I’ve built a bit of muscle memory. At first, it was just weird using enter rather than tab for moving through directories. (I.e., for /home/alex/downloads I’m used to typing cd /h<tab>a<tab>dow<tab>.)[/quote]

With what I have discovered recently, using tabs should not be a problem in the future. I am experimenting with giving it a terminal feel.

0 Likes

#42

[quote=“C0D312”]Okay, so I’m close to figuring out the initial_text thing. I’m using on_activated to populate the window. Unfortunately, it crashes sublime…

EDIT: hmmm… the on_activated method is being called 3 times whenever the panel is opened.[/quote]

Yeah, there is some quirkiness I haven’t completely mapped out yet. It took me a bit to get the on_modified/on_activated to work proper with my flags etc. Currently I have it working in a state I only mostly understand. There are a couple of things I had to do that I don’t quite understand. I am just happy it works :wink:.

0 Likes

#43

Well, I suffered through a lot of this stuff when working on the SMART_snippets plugin, so I’ve gotten pretty familiar with handling views, event_listeners, and the like. So I’ve got some ideas…

0 Likes

#44

[quote=“C0D312”]
Well, I suffered through a lot of this stuff when working on the SMART_snippets plugin, so I’ve gotten pretty familiar with handling views, event_listeners, and the like. So I’ve got some ideas…[/quote]

Cool, I will let you know when the repo is up. I look forward to seeing what you cook up :smile:.

0 Likes

#45

Repo is here: github.com/facelessuser/FuzzyFileNav

I changed the how mkdir and mkfile command work. Now you type file/folder name and the type the respective command :mkfile or :mkdir

0 Likes

#46

I have been away from this thread for a while - wow! Thanks for implementing this. Makes navigating the file system mush easier.

0 Likes

#47

Couple of changes on the repo.

Home directory specification has now been moved to a settings file.
Activating home directory now requires “~/” or “~”. This is to avoid triggering home directory if accessing a file with the “~” character at the beginning.

Added option to create commonly navigated folders in a settings file. You can access them by using the “/" or "” trigger.

I think that is it for now.

0 Likes

#48

-Fix “…” where it would sometimes jump back two
-Add “+[slash]” and “-[slash]” command to show all hidden files (regex excluded files) or hide them again respectively.
-Display folder and file accessibility error message in status bar (error dialog kept quick panel from opening again)
-Display last open folder if file open fails

That is it for today.

0 Likes

#49

Stop pushing out updates. I keep making changes and fixes but you update it before I can share them. :frowning:

In my version, pressing . will show the hidden files, then backspacing will hide them. I also figured out how to repopulate the quickpanel on reload to make it truly dynamic. I like what you did with the favorites but I was thinking about having */ use the glob module to show files within folders (for times when you don’t remember which folder something was it). Just an idea.

0 Likes

#50

Sorry, just had couple of easy things I wanted to knock out today. I should be done for the day though :smile: .

0 Likes

#51

I am kind of shying away from the “.” notation. For one, the exclude regex can hide anything, so if you don’t hide “.” files, using “.” is completely valid. Also, though I favor Unix/Linux systems, this is meant to work on windows as well where “.” does not have the same significance it does in Unix/Linux for hidden items. Currently, I don’t detect if Window’s files are hidden, but down the road I might.

I am interested to see what you mean here.

Know of the shortcuts are set it stone right now. If there is a logical shift to change the shortcuts, I will. Since this is not formally released, I am changing things even if they are dramatic if I think it will help the plugin. Not sure what your application using glob is, but if you come up with a good application of it, do share.

I have a habit of touching a plugin when in alpha/beta development a lot. Once things become stable, I don’t touch them much at all.

0 Likes

#52

[quote=“facelessuser”]

I am kind of shying away from the “.” notation. For one, the exclude regex can hide anything, so if you don’t hide “.” files, using “.” is completely valid. Also, though I favor Unix/Linux systems, this is meant to work on windows as well where “.” does not have the same significance it does in Unix/Linux for hidden items. Currently, I don’t detect if Window’s files are hidden, but down the road I might.[/quote]

Just a couple quick notes (I’m at work):

Because showing or hidden the excluded files is a toggle, it makes more sense to have one keybinding, rather than two (as is the case at the moment). I also rather like using “.” to narrow down the results to files only (assuming they all have an extension and you don’t use dots inside the filename, which happens to be the case with my systems).

Speaking of the regex, I don’t know what the plan is, but for my uses, I just copied the exclusion filter I use to all commands and bookmarks – which would add some overhead, if I decided to change it. Maybe it would be a good idea to enable a “default” exclusion filter, which can then be overridden at the command/bookmark level when necessary.

Thanks again for your amazing work.

Alex

0 Likes

#53

I may make it an actual shortcut that can be configurable. Like maybe “ctrl+.” or something like that. It just doesn’t make sense in windows, windows hides the files completely different, so having the first dot trigger hidden toggle in windows would just be confusing (even if it makes perfect sense in Unix/Linux). But if it was bound like a shortcut with a modifier, I think it would make more sense.

I have been thinking about making the exclude regex global as well.

0 Likes

#54

I figured I’d share my version so you could see what I’ve been working on. github.com/BoundInCode/FuzzyFileNav

I haven’t added the favorites yet since I’ve changed a lot internally, too much to just merge the changes. I added an initial_text arg to the nav command. Regex_exclude is a global variable. Plenty of other things as well.

0 Likes