Sublime Forum

Fuzzy filesystem find?

#121

Works like a charm.

[quote]
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.[/quote]

I have a feeling you’ve explained this before :blush:

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

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 :smile: 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

0 Likes

#122

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.

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.

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.

0 Likes

#123

HOW!?!?!

0 Likes

#124

[quote=“C0D312”]
HOW!?!?![/quote]

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:

"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.

0 Likes

#125

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?

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 :smile:

0 Likes

#126

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.

[quote=“quodlibet”]
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 :smile:[/quote]

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.

0 Likes

#127

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.

0 Likes

#128

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.

0 Likes

#129

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 :smiley: But, yeah, I’ll shut up now :laughing:

0 Likes

#130

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

[quote=“quodlibet”]
Incidentally, it’s considered a bad idea in typography to both make something bold and underline it :smiley: But, yeah, I’ll shut up now :laughing:[/quote]

What! *** I don’t*** understand what you are talking about. :confused:

0 Likes

#131

Added the ability to specify home setting and bookmark path setting in the preference file. Take a look at the default preference file for an example; also, check out the readme. Sorry if this breaks some things with personal settings.

0 Likes

#132

Hi all

can anyone explain me why i getting parse error “invalid escape” when i try to add such string

{"name": "downloads", "path": {"#multiconf#": {"host:SPC": "e:\downloads"}]}}
0 Likes

#133

Instead of e:\downloads try e:\\downloads (you need to escape the backslash with a backslash).

0 Likes

#134

Thanks, it help.
Probably README file needs to be changed, there we can see unescaped backslashes.

0 Likes

#135

[quote=“Sinled”]
Thanks, it help.
Probably README file needs to be changed, there we can see unescaped backslashes.[/quote]

Done. Thanks for the heads up.

0 Likes