Great idea implementing (and the original idea from biermeester and matthjes) os/host specific settings. I hope you donât mind if I apply it to another plugin. One more thing (feel free to ignore this as it isnât plugin related if you would like). I have written a plugin to help identify key conflicts. Though to me you fall into the category of âIf it doesnât exists and I want it, Iâll build itâ, I was wondering if there was anything you could think of as a Sublime Text user or developer, that you feel would be helpful to know with regards to key bindings. Anyways, obviously not related to your plugin, so feel free to ignore.
Thanks for all the hard work. I really do like a number of the plugins you have written.
Doesnât it already, to an extent via the âFuzzy Make Fileâ and âFuzzy Make Folderâ commands?
[/quote]
Kind of, and you can use the âFuzzy Copyâ and âFuzzy Pasteâ command to effectively âSave Asâ, but I know what he means. He would like to take an unsaved buffer with content and turn it into a file, but pass it through ST2âs save function to save it in a consistent way. Also the same with save as with unsaved content.
Great idea implementing (and the original idea from biermeester and matthjes) os/host specific settings. I hope you donât mind if I apply it to another plugin.[/quote]
I donât mind at all. That is what it is there for. As long as you include the license, it is fine. I plan to integrate it into a couple more of my plugins to abstract some settings that make sense to be abstracted.
Off the top of my head, the only things I can think of that I miss in regards to key bindings I have solved in two scripts:
Find and open any keymap file or other package files (PackageFileSearch): gist.github.com/4072884
Neither plugins above are formal Package Control releases. Sometimes I post scripts and see if people actually care about them to see if it is a waste of time creating a formal Package Control repo. Sometimes I donât release them at all because of laziness, or they just arenât polished enough, or I donât think anyone will care.
The ability to fairly quickly pull up a plugins keymap file (without having it in a project) to disable something is nice. I donât recall releasing PackageFileSearch which can pop up a menu to show a list of all files of X type found in packages on your computer, but I find it very useful, and it applies to key map files as well.
What might be nice from your plugin, is when you show the key maps you create invisible regions with keys (âkeyconflict=filepathâ or something) around each keymap. When you click or maybe double click (heck even a shortcut), your plugin would look at the region and determine which key map file to open. Just an idea.
Thanks. I saw your post of the shortcut profiles. I book marked the Gist, but havenât had a chance to use it much (granted I donât have a ton of plugins installed/keybindings). I had thought about creating âlinksâ to the actual key maps files. Thanks for the ideas!
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 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.
Another question for you (well about your plugin this time ). 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.
[quote=âquodlibetâ]
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 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[/quote]
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 .
[quote=âskurodaâ]Another question for you (well about your plugin this time ). 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.[/quote]
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.
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.
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
[pre=#272822]WIN_DRIVE =* r*"(^A-Za-z]{1}:\)"[/pre]
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.
[quote=âskurodaâ]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
[pre=#272822]WIN_DRIVE =* r*"(^A-Za-z]{1}:\)"[/pre]
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.[/quote]
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.
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)
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.
[pre=#2D2D2D]def get_drives():
# Search through valid drive names and see if they exist.
return unicode(d + â:â) for d in âABCDEFGHIJKLMNOPQRSTUVWXYZâ if path.exists(d + â:â)][/pre]
I figured it was something like that, as you are very consistent in that regard. Iâve done a quick trace of the methods (because Iâm curious too and giving you the most information will probably make the bug, if it exists, easier to fix).
I think the path getting passed to get_files(), well initially the âfuzzy_file_navâ command, is âC:â. os.listdir() is then called on this, which is where things donât happen like one would expect. When you enter âC:â as the path, the âstartâ variable already contains the slash (âC:â)
Well with that, I donât think there is any more information I can think of off the top of my head to help reproduce the issue. Iâll check back tomorrow though, so let me know if thereâs anything I can clarify.
My notes say slash should show all drives not the root of the drive. You were correct in your assessment that I access the root of the drive via (c:\ or c:/ not / or ); I didnât realize that .
Never mind, it was only supposed to show all drives when the root drive could not be found. I updated the branch to fix this issue. It should now accept / or \ like the windows cmd prompt does. Thanks for reporting this issue @skuroda. get_drives was a different part of the code that generates drives right before I append slashes to all folders/drives. FuzzyFileNav should of accepted the drive with the slash not without.
Nix style path complete is in. To get true nix style path complete, also enable case-sensitivityâŚbut if you are on windows, probably leave that out.
It still isnât quite there. It only matches a file when only one file matches instead of updating the string with the max shared chars. I will add that later.
Glad you could reproduce the bug. Also, wow that was faster than I expected. Guess I donât have to use my hack-y implementation of nix file completion. Thanks for the update. Have fun with your real work!