Home Download Buy Blog Forum Support

Fuzzy filesystem find?

Re: Fuzzy filesystem find?

Postby quodlibet on Fri Aug 24, 2012 8:07 am

facelessuser wrote:Case sensitivity option is now in the settings file.


Works like a charm.

Only pressing enter will retrieve currently selected index in the list. If you use a shortcut like Ctrl+R, I can only grab the text you typed in. This is all based on limitations of the ST2 API.


I have a feeling you've explained this before :oops:

Just to clarify: is it possible to use TAB to fill-in "HTML.tmLanguage" in the following situation?

Image

I can probably open a rename panel on Ctrl+V before I do the copy/move action. It could then be populated with the name of the file/folder when copied or if you typed anything in the quick panel before pasting, it would grab that as the default.


My feeling here is that it would be best to assign it its own shortcut. Otherwise you would be adding an extra step when copying/moving and wrapping the renaming functionality inside a redundant process. Do you see what I mean? Another way of saying this is that although you can rename & move in one step using the CLI, you can't using most GUI file managers.

There's a semi-related issue with the plugin as it is. You've provided an option to keep the panel open after action, which is completely useless -- except when it isn't it :) I had suggested at some point that a way to have it both ways (i.e., keeping the panel open only when required) would be to use Ctrl+ENTER to trigger opening the file and keeping the file open. Does this idea hit on the limitation you mention above?

Thanks again,
Alex
quodlibet
 
Posts: 459
Joined: Sat Jun 18, 2011 5:53 pm

Re: Fuzzy filesystem find?

Postby facelessuser on Fri Aug 24, 2012 2:45 pm

quodlibet wrote:Just to clarify: is it possible to use TAB to fill-in "HTML.tmLanguage" in the following situation?

Image

Currently it uses a linux/unix like autocomplete that you would find in the terminal. What you are requesting is more like windows autocomplete in terminal. I would have to track the last autocomplete and cycle through the options on each tab discarding the last autocomplete on character key press...so maybe in the future, but not right now. I also cannot grab the visually selected item because there is no access to that in the API. But give it some time, and I may get something like the windows autocomplete after release.

My feeling here is that it would be best to assign it its own shortcut. Otherwise you would be adding an extra step when copying/moving and wrapping the renaming functionality inside a redundant process. Do you see what I mean? Another way of saying this is that although you can rename & move in one step using the CLI, you can't using most GUI file managers.


I can possibly add a rename specific shortcut that does what you request, and allow move/copy to continue functioning as is. I may do this after release.

There's a semi-related issue with the plugin as it is. You've provided an option to keep the panel open after action, which is completely useless -- except when it isn't it :) I had suggested at some point that a way to have it both ways (i.e., keeping the panel open only when required) would be to use Ctrl+ENTER to trigger opening the file and keeping the file open. Does this idea hit on the limitation you mention above?


I might, be able to do something. I have an idea that I might try today. I cannot simulate an enter press, so it can't capture Ctrl+ENTER because ENTER would fail and I cannot simulate it. I might be able to watch for CTRL+ENTER and set a flag, but let it pass through without capturing it. I will let you know. Now this would not work after things like CTRL+V. So if you are doing a bit of copying and pasting, the keeping of the dialog open would only work for opening files where enter is used. I will see what I can cobble together.
facelessuser
 
Posts: 1446
Joined: Tue Apr 05, 2011 7:38 pm

Re: Fuzzy filesystem find?

Postby C0D312 on Fri Aug 24, 2012 3:24 pm

. I might be able to watch for CTRL+ENTER and set a flag, but let it pass through without capturing it.

HOW!?!?!
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: Fuzzy filesystem find?

Postby facelessuser on Fri Aug 24, 2012 4:30 pm

C0D312 wrote:HOW!?!?!


It is nearly impossible to catch an "enter" or even a "modifier+enter" in the quick panel. But recently I discovered, you can capture enter if it is in a sequence like:

Code: Select all
"keys": ["ctrl+k","enter"]


Here you can use the on_query_context make sure the panel is active, and then just set a flag.

I am not saying it is super intuitive or ideal, but if you use a sequence, ST2 starts looking for the next key press after "ctrl+k" allowing "enter" to actually be captured.

Ugly hack...yes. Successful way to essentially modify a enter key stroke in the quick panel...yes.
facelessuser
 
Posts: 1446
Joined: Tue Apr 05, 2011 7:38 pm

Re: Fuzzy filesystem find?

Postby quodlibet on Fri Aug 24, 2012 4:36 pm

Currently it uses a linux/unix like autocomplete that you would find in the terminal. What you are requesting is more like windows autocomplete in terminal.


I’ve heard you make the distinction before and I’m not sure what you mean by it. In Linux, if you navigate to the Packages/HTML directory (which is what I was using as an example in the screenshot) and type `HTML.t` followed by TAB, it will autocomplete “HTML.tmLanguage”. My question was whether your plugin + Sublime’s built-in fuzzy stuff can handle something like this. (Although you’d need to write `HTML.tm` to counter the fuzzy search’s broader search.) Is this making any sense?

Now this would not work after things like CTRL+V. So if you are doing a bit of copying and pasting, the keeping of the dialog open would only work for opening files where enter is used. I will see what I can cobble together.


I generally use FuzzyNav to open files and, for me, that’s the likeliest candidate for multiple actions. I use the other functions for housekeeping (er, filesystemkeeping?). If I want to do a lot of operations, I would open a terminal or a file manager, which I think is acceptable. Actually, the more I think about it, I would be inclined to ignore everything I’ve said about this: I’ll change the `keep_panel_open_after_action` setting to false and that should solve most of my problems :)
quodlibet
 
Posts: 459
Joined: Sat Jun 18, 2011 5:53 pm

Re: Fuzzy filesystem find?

Postby facelessuser on Fri Aug 24, 2012 8:29 pm

quodlibet wrote:I’ve heard you make the distinction before and I’m not sure what you mean by it. In Linux, if you navigate to the Packages/HTML directory (which is what I was using as an example in the screenshot) and type `HTML.t` followed by TAB, it will autocomplete “HTML.tmLanguage”. My question was whether your plugin + Sublime’s built-in fuzzy stuff can handle something like this. (Although you’d need to write `HTML.tm` to counter the fuzzy search’s broader search.) Is this making any sense?

Maybe some distro's terminals handle things differently, but my experience is that if there are names that start the same and you haven't entered enough to differentiate one from another, Linux/Unix will not show anything, then if you hit tab again, it will show all the files that match, and you just type more until your result can only match one. I have used Linux for very long time, so I am certain that this convention exists. Some terminals may be more advanced. But anyways, the gist of what I am saying is right now you have "dumb" auto-completing. In the future, I plan on adding more "smart" auto-completing.

quodlibet wrote:I generally use FuzzyNav to open files and, for me, that’s the likeliest candidate for multiple actions. I use the other functions for housekeeping (er, filesystemkeeping?). If I want to do a lot of operations, I would open a terminal or a file manager, which I think is acceptable. Actually, the more I think about it, I would be inclined to ignore everything I’ve said about this: I’ll change the `keep_panel_open_after_action` setting to false and that should solve most of my problems :)

I might just add something where by default, the panel does not remain open, and if you press some shortcut, you will enable keeping the panel open. So if you want to keep the panel open to open multiple files, you would just press "ctrl+k" once and then all open, delete, etc. operations will allow the panel to stay open without any further interaction. But by default the panel will just close after an open, delete, etc. I think this is a healthy compromise.
facelessuser
 
Posts: 1446
Joined: Tue Apr 05, 2011 7:38 pm

Re: Fuzzy filesystem find?

Postby quodlibet on Fri Aug 24, 2012 10:41 pm

Incidentally, I was messing about with the sidebar earlier, and I noticed that the "Delete File" menu option provided by SideBarEnhancements uses the panel for confirmation. This must have been what I had in mind when we were talking about it awhile back (and had mistakenly confused it with the FileNavigator plugin). The SideBar plugin also provides a rename command (accessible via the palette > `File: Rename`) which functions more or less like what we were talking about, although obviously it requires the file to be open. I don't know if any of this is interesting or useful.
quodlibet
 
Posts: 459
Joined: Sat Jun 18, 2011 5:53 pm

Re: Fuzzy filesystem find?

Postby facelessuser on Sat Aug 25, 2012 2:54 am

Okay, I lied and went ahead and added smarter auto-complete and turned off case sensitivity in Linux/Unix by default. Let me know if you see any issues with this change, but overall, autocomplete should feel much nicer. I think that should take care of all major complaints.

Currently copy/cut and paste takes care of rename for now (but I will look into a more efficient same directory rename for the future after release).
Panel staying open option will probably get tweaked after release.
UI changes for prompts etc might get tweaked after release sometime.
Save option might be added sometime after release.
Code is getting a little sloppy, so I might try and clean that up after release as well.

Basically I want to play around with some different ideas before I do anything else, but I am hoping the better auto-complete is the last thing to make this feel really usable for now. I will continue to see how I can make this better, but I think it is about time for an official release.
facelessuser
 
Posts: 1446
Joined: Tue Apr 05, 2011 7:38 pm

Re: Fuzzy filesystem find?

Postby quodlibet on Sat Aug 25, 2012 8:37 am

facelessuser wrote:Okay, I lied and went ahead and added smarter auto-complete and turned off case sensitivity in Linux/Unix by default. Let me know if you see any issues with this change, but overall, autocomplete should feel much nicer. I think that should take care of all major complaints.


Cool. Hopefully this will make the interface faster and improve its "feel".

Incidentally, it's considered a bad idea in typography to both make something bold and underline it :D But, yeah, I'll shut up now :lol:
quodlibet
 
Posts: 459
Joined: Sat Jun 18, 2011 5:53 pm

Re: Fuzzy filesystem find?

Postby facelessuser on Sat Aug 25, 2012 3:15 pm

quodlibet wrote:Cool. Hopefully this will make the interface faster and improve its "feel".

I forgot to mention, tab cycles through all like matches in auto-complete. Shift+tab cycles backwards through them.

quodlibet wrote:Incidentally, it's considered a bad idea in typography to both make something bold and underline it :D But, yeah, I'll shut up now :lol:

What! I don't understand what you are talking about. :?
facelessuser
 
Posts: 1446
Joined: Tue Apr 05, 2011 7:38 pm

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: Exabot [Bot], Yahoo [Bot] and 20 guests