Sublime Forum

ST3: FuzzyFileNav

#8

Love it :smile:

0 Likes

#9

Having said that, FFS, all that should NOT be necessary!

And having said THAT, I guess we should be grateful for the highlight call back eh?

And having said ALL that, now I’m tired!

0 Likes

#10

I was waiting for you to port this before switching over to ST3 at work. Thank you!

(Oh, and support for saving . . . :unamused: )

0 Likes

#11

Yeah, savings been in there for a while. I even announced it. I figured you saw it, or would eventually stumble on it.

0 Likes

#12

I think I saw this back when, but it doesn’t do what I mean by saving, if memory serves. I’ll have a look at it when I get home.

Alex

0 Likes

#13

Yup. What I mean by ‘saving’ is replacing the functionality of Ctrl+S (Save) – i.e., saving the file if it already exists & otherwise popping open FFN*, preferably restricted so that I am forced to save the file before my ADD kicks in.

  • I am, slowly, learning Colemak, which has caused me to become very fond of logograms & abbrv. :smiley:

Alex

0 Likes

#14

I will look into a little later. I think it is probably doable, but you would have to override your save shortcut with a FFN entry point. I can’t just add it to “on_save”, it just wouldn’t work well there. When I get a bit more time, I will look into this.

0 Likes

#15

You could probably [ab]use view.retarget for fun and profit ?

0 Likes

#16

True :smile:. I feel bad enough for the abuse I have already committed.

0 Likes

#17

Forgive him father, for he knows what he does

0 Likes

#18

colemak ftw! I never learned qwerty so can’t compare it to anything but I never get sore hands :smile:

0 Likes

#19

Never heard of colemak. Doesn’t look to hard to learn; not a huge change like dvorak. I may give it a try.

0 Likes

#20

I would be very grateful! I’ve already mapped FFN to Ctrl+O, which is why its (short) absence from ST3 crippled me. I would have no problem doing the same for Ctrl+S, but you would need to provide an appropriate command. I looked into writing it myself, but it’s a little beyond my capabilities.

I can use the menu if I need to use my OS’s filesystem dialogs (or make appropriate commands for the palette).

FWIW, I started learning Colemak on Thanksgiving (you can imagine what fun I must have been having! :wink: ). I practiced for a couple dozen hours to get all the keys down and then it was a matter of training my muscle memory. I was doing around 20 WPM when I began confusing Colemak & Qwerty, thus necessitating switching 100%. (This was at the beginning of January. I should mention that I had a two-week hiatus from all keyboards just prior.) That was painful until I hit 30 WPM, which is about the minimum I can tolerate. I think I’m at about 40+ now (a far cry from the 90ish WPM I had originally), but I like Colemak thus far. I should also note that even though I was very fast, I did not know how to touch type.

Speaking of win, did you ever find a solution to using Colemak with Vim bindings in Sublime? I am a Vim virgin (or is that a vimgin?), but I don’t see how it would work with Colemak. Do you remap HJKL to HNEI? If, so, what do you do with N or I? Et cetera…

Alex

Edit: typos and silly things

0 Likes

#21

Nah, I still don’t use Vintage/Vintageous ( though use my own home row and modal bindings )

Apparently the creator of colemak actually uses Sublime Text these days.

Last time I tried to get in contact with him to get some tips was definitely not a win.

In other words, that reminds me

We should hunt him down and pick his brains :smile:

0 Likes

#22

Mind sharing? (Although I’m not sure what modal bindings are… they sound yummy.)

[quote]
Apparently the creator of colemak actually uses Sublime Text these days.

Last time I tried to get in contact with him to get some tips was definitely not a win.

In other words, that reminds me

We should hunt him down and pick his brains :smile:[/quote]

Is this the thread you are referring to? --> forum.colemak.com/viewtopic.php?id=50&p=1

I’ve looked at it, but not too closely.

Alex

0 Likes

#23

I have now removed the setting in ST3 “nix_style_path_complete” and replaced it with a new setting.

[pre=#2D2D2D] // (fuzzy/windows/nix)
// fuzzy - this will auto-complete with the selected index in the quick panel
// windows - this will complete like a windows terminal would complete paths
// nix - this will complete like a unix/linux terminal traditionally completes paths
“completion_style”: “fuzzy”,[/pre]

By default, “fuzzy” is used for a more natural quick panel feel. The current selected index in the quick panel will now be used. This is for ST3 only.

0 Likes

#24

Does FuzzyFileNav support recursive fuzzy finding?

0 Likes

#25

You have to drill down into folders. Deep recursive folder searches would be very slow; imagine starting in your root directory…

The only way to effectively allow FuzzyFileNav (FFN) to do this recursively, I would need to index your entire harddrive. Not really looking to have yet another process indexing my harddrive and slowing down my PC.

FFN allows you to quickly navigate relative files and folders to your current file or folders and files outside your project to view or apply file operations on them directly in FFN. This is not meant to index your entire terabyte harddrive to quickly find any file on your computer by using the fuzzy algorithm.

0 Likes

#26

Tried installing ST3 FFN by cloning the git project (is there a better way?). Some issues:

multiconf.py:44: Single instance of “\U” in C:\Users in docstring. Backslash needs to be doubled.

Two instances of isinstance(key, basestring). Basestring is gone now, should be str(?)

fuzzy_file_nav.py:29: Usage of “FuzzyFileNav: %s” % s. % operator appears to be gone, should be replaced with .format() call.

I’m not conversant with Python 3, so the above suggestions are just guesses from Googling.

And finally, after all that:

File “/Users/jsc/Library/Application Support/Sublime Text 3/Packages/FuzzyFileNav/fuzzy_file_nav.py”, line 13, in
from multiconf import get as qualify_settings
ImportError: No module named ‘multiconf’

It looks like it’s loading fuzzy_file_nav.py, and THEN trying to load multiconf.py as a plugin? Not sure what’s going on.

0 Likes

#27

Okay, figured out the multiconf issue. Need to import from FuzzyFileNav.multiconf instead of multiconf.

Then hit:
NameError: global name ‘unicode’ is not defined

Removing all the calls to unicode(xxx) and replacing with just straight xxx seems to have cleared that up. The panel appears. Actually trying to drill down into any directories immediately returns, however. There is an error:

File “/Users/jsc/Library/Application Support/Sublime Text 3/Packages/FuzzyFileNav/fuzzy_file_nav.py”, line 595, in run
edit = view.begin_edit()
TypeError: begin_edit() missing 2 required positional arguments: ‘edit_token’ and ‘cmd’

And this is where we start getting into API details, so I’m out of options.

0 Likes