Home Download Buy Blog Forum Support

FuzzyFileNav Plugin (on package control...finally)

Re: FuzzyFileNav Plugin (on package control...finally)

Postby jbrooksuk on Wed Nov 14, 2012 5:53 pm

PERFECT!
jbrooksuk
 
Posts: 754
Joined: Sun Apr 11, 2010 10:37 am
Location: England

Re: FuzzyFileNav Plugin (on package control...finally)

Postby quodlibet on Wed Nov 14, 2012 9:38 pm

facelessuser wrote:
quodlibet wrote:@facelessuser Is there any chance that you will need to extend FuzzyNav so that it can be used as a dialog for saving files? :D

Yeah, it is still on my list. I have a habit of taking on too much, but I will get to it.


Thanks for keeping it mind. You had asked that I don't pester you about this until an official release. So, here I am!

In other news . . . I have gotten so used to FuzzyNav -- and I spend so much time in Sublime -- that I am only aware of it when I'm in Excel or something and I hit Ctrl+O, Ctrl+B, db <enter> and stare at my screen wondering why I am not looking at the contents of my Dropbox folder. In case it's not clear, this is a compliment.

Alex
quodlibet
 
Posts: 498
Joined: Sat Jun 18, 2011 5:53 pm

Re: FuzzyFileNav Plugin (on package control...finally)

Postby skuroda on Thu Nov 15, 2012 1:11 am

Another question for you (well about your plugin this time :D ). I was curious to why you chose to implement the more MS-DOS style auto completes (where you cycle though the options) rather than the more Unix (or at least what I have experienced) auto completes (where tab fills in the longest prefix). Again, if you don't feel like answering, that's fine, I was just curious.

Thanks.
skuroda
 
Posts: 676
Joined: Fri Oct 05, 2012 8:11 am

Re: FuzzyFileNav Plugin (on package control...finally)

Postby facelessuser on Thu Nov 15, 2012 3:59 am

quodlibet wrote:Thanks for keeping it mind. You had asked that I don't pester you about this until an official release. So, here I am!

In other news . . . I have gotten so used to FuzzyNav -- and I spend so much time in Sublime -- that I am only aware of it when I'm in Excel or something and I hit Ctrl+O, Ctrl+B, db <enter> and stare at my screen wondering why I am not looking at the contents of my Dropbox folder. In case it's not clear, this is a compliment.

Alex

I appreciate the kind words.

Oh, and "save as" functionality is in :). Just open the Fuzzy File Nav Panel as usual and type in a file name and press ctrl+s or super+s for Mac, and it will save your file as the name you entered. You will be prompted to approve overwrites. I am not responsible if you file explodes into a million tiny pieces...but it should work based on the little testing I did ;).

skuroda wrote:Another question for you (well about your plugin this time :D ). I was curious to why you chose to implement the more MS-DOS style auto completes (where you cycle though the options) rather than the more Unix (or at least what I have experienced) auto completes (where tab fills in the longest prefix). Again, if you don't feel like answering, that's fine, I was just curious.

Thanks.

Honestly, some times I feel like MS-DOS, sometimes I don't. I guess I was feeling MS-DOS. I can do either way...I want to say I started with UNIX style (or close to), but people didn't quite like it. I use MS-DOS at work, and UNIX at home, so they all bleed together for me.
facelessuser
 
Posts: 1543
Joined: Tue Apr 05, 2011 7:38 pm

Re: FuzzyFileNav Plugin (on package control...finally)

Postby skuroda on Thu Nov 15, 2012 4:37 am

That was my guess, but thought, hmm maybe there's some deep philosophical reason that I don't yet understand. Also, the windows key binding for save is set to "super+s" (which works too) rather than "ctrl+s" like I think you meant.
skuroda
 
Posts: 676
Joined: Fri Oct 05, 2012 8:11 am

Re: FuzzyFileNav Plugin (on package control...finally)

Postby facelessuser on Thu Nov 15, 2012 4:56 am

skuroda wrote:That was my guess, but thought, hmm maybe there's some deep philosophical reason that I don't yet understand. Also, the windows key binding for save is set to "super+s" (which works too) rather than "ctrl+s" like I think you meant.

Thanks, I was working on a Mac at home...like I said it all blurs together sometimes. I fixed the windows and linux keybinding for saving.

I go back and forth sometimes on which path completion style I like better. Maybe I will add back UNIX style and make it an option if enough people care. I can go either way with path completions.
facelessuser
 
Posts: 1543
Joined: Tue Apr 05, 2011 7:38 pm

Re: FuzzyFileNav Plugin (on package control...finally)

Postby skuroda on Thu Nov 15, 2012 5:24 am

No problem. I agree I have to switch back and forth between the two systems, so it's not a huge deal. That being said, I've added the Unix style auto complete for me. I think I prefer because I can actually see the files that match the pattern. Where as, for example, the AdvancedNewFile plugin you can't so the Windows style works fine.

So this isn't quite worth making a pull request either, but I found another bug for you. I believe you WIN_DRIVE regex should be
WIN_DRIVE = r"(^[A-Za-z]{1}\:\\)"


The missing "\\" from the group causes the issue. Granted I only tested it when "back_to_root" is called, so you may want to double check it doesn't break anything else. The problem is the group returns something like "C:" which isn't resolved as a path on windows. So, when I type "/" in the quick panel, and it took me to the sublime packages directory rather than the root.
skuroda
 
Posts: 676
Joined: Fri Oct 05, 2012 8:11 am

Re: FuzzyFileNav Plugin (on package control...finally)

Postby facelessuser on Thu Nov 15, 2012 6:01 am

skuroda wrote:No problem. I agree I have to switch back and forth between the two systems, so it's not a huge deal. That being said, I've added the Unix style auto complete for me. I think I prefer because I can actually see the files that match the pattern. Where as, for example, the AdvancedNewFile plugin you can't so the Windows style works fine.

So this isn't quite worth making a pull request either, but I found another bug for you. I believe you WIN_DRIVE regex should be
WIN_DRIVE = r"(^[A-Za-z]{1}\:\\)"


The missing "\\" from the group causes the issue. Granted I only tested it when "back_to_root" is called, so you may want to double check it doesn't break anything else. The problem is the group returns something like "C:" which isn't resolved as a path on windows. So, when I type "/" in the quick panel, and it took me to the sublime packages directory rather than the root.


I am not sure I understand. You have an issue going back to root after you made changes to the code or before? I use the slash to go back to root of drive on windows quite often, so I am not sure if you are describing an issue that is brought on by changes you made or that are inherent in the code. I will check again tomorrow on windows, but as far as I know, no issues exists with going to root of drive on windows.
facelessuser
 
Posts: 1543
Joined: Tue Apr 05, 2011 7:38 pm

Re: FuzzyFileNav Plugin (on package control...finally)

Postby skuroda on Thu Nov 15, 2012 6:35 am

So I just did a clean install of the plugin and I still have the issue. Out of curiousity, when you go to the root at work, do you type something like "C:/" or "/"? I'm seeing the incorrect behavior when I do "/". This machine only has 1 drive, so I have no reason to explicitly choose the drive (also kind of the back and forth between linux and windows). Hopefully you can reproduce it...or there's just something really odd on my machine (which I suppose is possible too).

So all I've added to the code are those two print statements that I boxed in the image (did a clone and diffed to make sure).
http://i.imgur.com/ogcA2.png
skuroda
 
Posts: 676
Joined: Fri Oct 05, 2012 8:11 am

Re: FuzzyFileNav Plugin (on package control...finally)

Postby facelessuser on Thu Nov 15, 2012 7:05 am

I will check tomorrow. I am not saying there isn't a bug, just that I would be surprised. FuzzyFileNav has actually been used by people for months now (it just recently went on Package Control though), so I imagine I would have gotten a bug filed by now for something like this, but you never know.I will double check my system on windows tomorrow and let you know what I find.

I just want to illustrate that the missing slash was intentional and gets added back later. You can see here the get_drive function returns them without slash on purpose. The algorithm expects drives to not have the slash. Hopefully we can get to the bottom of this though.
def get_drives():
# Search through valid drive names and see if they exist.
return [unicode(d + ":") for d in "ABCDEFGHIJKLMNOPQRSTUVWXYZ" if path.exists(d + ":")]
facelessuser
 
Posts: 1543
Joined: Tue Apr 05, 2011 7:38 pm

PreviousNext

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 9 guests