Sublime Forum

Fuzzy filesystem find?

#105

Jon,

Please, please, pleasssse expose the index of the selected item in the quickpanel. So many awesome things will come out of it.

0 Likes

#106

[quote=“C0D312”]Jon,

Please, please, pleasssse expose the index of the selected item in the quickpanel. So many awesome things will come out of it.[/quote]

+1

I am so limited by this currently.

0 Likes

#107

Okay, big changes. I decided to listen to COD312 and do the shortcuts as follows (it felt nicer than I thought it would).

delete file: type name of file/folder to delete and press ctrl+d
new file/folder: type name of new file/folder press ctrl+n for file and ctrl+shift+n for folder
copy (target file or folder as source for copying): type name and press ctrl+c
cut (target fie or folder as source for move): type name and press ctrl+x
paste (initiate cut or copy into current folder with optional new name): press ctrl+v to paste the file or type new name and press ctrl+v

For OSX replace ctrl with super

old commands :del, :copy, :cut, :paste, :mkdir, :mkfile have been deprecated.

That is it for now. Let me know if I broke anything or if you hate the new way…but I kind of like the new way…so…

Thanks COD312 for the suggestion!

0 Likes

#108

-Do not show system hidden files by default ("." for Linux\Unix and Hidden attribute for windows)
-Allow setting to show hidden system files by default (not regex excluded files)
-Add Reveal shortcut to show file or folder in OSs file navigator. [ctrl+r] windows/linux [super+r] osx

0 Likes

#109

I must be really thick: I can’t figure out how copying/cutting & pasting works. (Creating & deleting files works fine.)

And a quick note: If possible, I would prefer if the warning about deleting files/folders used Sublime’s interface rather than the OS’s.

Alex

0 Likes

#110

Type file/folder name and use ctrl+c or ctrl+x for copy or cut respectively. Navigate to location you wish to paste it, and hit ctrl+v. If you want to rename it, type a name before pasting.

I don’t think I can get more “Sublime Interface” than by calling sublime’s interface like so:

[pre=#000000] if not sublime.ok_cancel_dialog("%s exists!\n\nOverwrite file?" % file_name):
return[/pre]

0 Likes

#111

I still can’t work out how to cut/copy/paste. I’m either colossally stupid (which might well be the case) or it’s not working in Linux. An example: I am trying to do is to rename MoveTab.py in my User folder to MoveTab.py.foo. I navigate to User/ and then type MoveTab.py and press Ctrl+X, which seems to work (i.e., the input field is erased), but then when I type MoveTab.py.foo and press Ctrl+V, I get the clipboard pasted in the panel’s input.

Yeah. I thought I remembered the File Navigator plugin used the panel for verification but I just checked and I was wrong.

Alex

0 Likes

#112

[quote=“quodlibet”]I still can’t work out how to cut/copy/paste. I’m either colossally stupid (which might well be the case) or it’s not working in Linux. An example: I am trying to do is to rename MoveTab.py in my User folder to MoveTab.py.foo. I navigate to User/ and then type MoveTab.py and press Ctrl+X, which seems to work (i.e., the input field is erased), but then when I type MoveTab.py.foo and press Ctrl+V, I get the clipboard pasted in the panel’s input.
[/quote]

I will take a look at linux. In all honesty, I haven’t tried linux yet. Did you have any errors in the console?

It might have at one time; maybe they changed it. Do you think confirmation in the panel would flow nicer? I can give it a try and we can see how we like it.

0 Likes

#113

No. I can grab a screencast if it helps (although, I tried to be explicit as to what I was doing in my previous description).

I like FuzzyNav because a) the default Linux open/save dialogs are crappy; b) all my computers are slow enough that I find the delay until the dialogs come up annoying (whereas Sublime is supper snappy); c) if you’re in distraction-free mode the OS chrome is quite distracting. In this case, only © might apply to users in general; I think (a) & (b) are my own private peeves. Make what you will of this :smile:

0 Likes

#114

A screencast might help. I know it works on Mac and Windows. The things I am using in linux should work, but I haven’t tested everything there. If it is a simple misunderstanding on your part, a screencast will show me what you are doing wrong. If the plugin has a linux issue, then me playing around in linux might be the only way for me to figure out what is wrong. Make sure to let me know what flavor of Linux you are using etc.

[quote=“quodlibet”]
I like FuzzyNav because a) the default Linux open/save dialogs are crappy; b) all my computers are slow enough that I find the delay until the dialogs come up annoying (whereas Sublime is supper snappy); c) if you’re in distraction-free mode the OS chrome is quite distracting. In this case, only © might apply to users in general; I think (a) & (b) are my own private peeves. Make what you will of this :smile:[/quote]

No problem, I can give it a shot, it might work nicer. If enough people hate it, I can always role it back. Making it configurable might not happen because one method is synchronous and the other asynchronous, but we can see. I never use full screen because I always have other stuff I am referencing or doing etc, but the panel confirmation seems like it would be nice and quick.

0 Likes

#115

I’m on Ubuntu 12.04. I’ll have a look about the screencast tomorrow.

I never use fullscreen when coding (well, web designing) for the same reasons, but I switch to it when writing prose, especially on my netbook, which I basically use like a typewriter :smile:

0 Likes

#116

So. After modifying the keybinding that was hijacking Ctrl+V I’ve had the chance to test FuzzyNav’s cut/copy/paste functionality.

Generally, it works quite well.

I would really like a simpler way to rename a file; i.e., something that keeps the name intact during the process. I generally only change a few characters, and I almost always would like to reuse some part of the original filename.

A corollary to this: I would like the [tab] to be fuzzier; or at least an option to disable case sensitivity.

Sorry if this posting is a little abrupt :smile:

Alex

0 Likes

#117

I can easily store the original name, but if you have an idea for how to preserve and insert that for the user in the UI in an intuitive manner, let me know. I haven’t come up with anything yet.

I can make things fuzzier, but it would not play nice with the built in fuzzy results in the panel, and since I cannot access those results directly, I have know easy way of intuitively melding those together. This is a weakness with the API. Disabling case sensitivity is easy though (windows is not a case sensitive file system, so I disable it by default on Windows). I will add an option for nix systems.

By the way, I wanted to add the full path to always be showing in the status bar like you requested, but the API allows you to add a status to the window bar for only a short while. If you set a persistent one, it only shows on the current view, which means you have to add it to each view if the view changes, and you cannot add it when there is no view. And then you have to sweep all views in the window to clean up all the status bars to make sure you clean up well. A bit annoying. The only good option is to display it in the panel, but I am not sure how I want that to look. It is a bit excessive to add it to every item in the panel. And you don’t want to add it to the main row, because then it will affect the fuzzy results, and then if you add it to a secondary row of one item, ST2 creates an empty secondary row for every item which doesn’t look good. I don’t know still haven’t decided on this one.

I will see about adding in the confirmations for deletes and such in the panel; I have just been busy.

0 Likes

#118

[quote=“facelessuser”]
I can easily store the original name, but if you have an idea for how to preserve and insert that for the user in the UI in an intuitive manner, let me know. I haven’t come up with anything yet.[/quote]

Ctrl+R (or whatever) opens a panel at the bottom with the name of the currently selected file/folder filled-in. ESC to cancel or edit the name and ENTER to rename.

I think I suggested this or something like it in an earlier post. It doesn’t really fit in with the UI as you’ve built it, but it doesn’t break anything either and it’s fairly economical as a design.

What I’m basically looking for in terms of behavior is the FuzzyNav equivalent of pressing F2 in my file manager :smile:

It might be possible to do all of this in the Go To panel, but maybe breaking up the process in two panels would assist the user. Or maybe not.

One note, related to the fuzziness. Can you provide an option to use the currently selected file/folder, even if it’s not the only one? I suspect it might be a really bad idea, but I would like to try it out.

I think the case sensitivity might be sufficient coupled with the note above.

Thanks!

[quote]
By the way, I wanted to add the full path to always be showing in the status bar like you requested, but[/quote]

Thanks for trying :smile:

I’ve got rather used to the ambiguity. Using FuzzyNav is sometimes like taking a deep breath and going underwater.

(You should probably skip this next paragraph.)

I discovered another file-mangerish plugin a few weeks ago. What that plugin did was to add a row at the top of the panel which indicated the current path. Would that be possible for FuzzyNav? Some creative typography will be required to distinguish it from the other rows, but I think that should be okay. It will deduct one row from what you readily see, but I think the improvement in usability would be worth it.

Damn. I hadn’t thought of this.

Don’t worry about it. I am very grateful for the time you’ve already spent on this plugin.

But, in terms of prioritising stuff, the next (and final) step would be to (somehow) hook FuzzyNav into the save process. (I recall you had told me to hold on with this request until your release FuzzyNav; I’m just being impatient. Sorry :smile: )

Alex

0 Likes

#119

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

:smile: . No biggie. I plan on adding the case sensitivity option. Then I plan on releasing it.

After that, I will probably take a look at the renaming functionality and the save process (not sure how I want to approach it, haven’t put much thought into it).

0 Likes

#120

Case sensitivity option is now in the settings file.

0 Likes

#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