Sublime Forum

ST3: FuzzyFileNav

#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

#28

@jsc

If you are using ST2, then you can use the main branch github.com/facelessuser/FuzzyFileNav

Don’t install the main branch on ST3 though. Only the ST3 branch works on ST3 github.com/facelessuser/FuzzyFileNav/tree/ST3

Conversely, do not use the ST3 branch on ST2.

You can see they are different.

0 Likes

#29

Oh man. Sorry, I should have figured I was doing something wrong. I just git cloned the URL on that page and didn’t switch branches. Everything works great.

0 Likes

#30

You can use Package Control to manage branches. I have described this here:

There may be more thorough write-ups available.

Hope this helps,
Alex

0 Likes

#31

Alex, that is a great suggestion. It doesn’t seem to work for me, though. I can’t figure out how to add a branch as a repository. When I add the tree/ST3 URL, I still only see the ST2 version. I think the main problem is the one I was experiencing earlier, where using the tree/ST3 URL shows you the branch, but the link to the repository is the main package and you have to switch branches manually. I am not super familiar with github, as I’ve demonstrated.

0 Likes

#32

What is the URL you are using when adding a repository? As far as I know, manually added repositories will override those in the main package repository.

0 Likes

#33

@jsc, the following should work:

  1. Use Remove Package to remove FuzzyFileNav (if installed)
  2. Use Add Repository to add the following URL: github.com/facelessuser/FuzzyFileNav/tree/ST3
    2a. make sure that’s the only “FuzzyFileNav” repository in Packages/User/Package Control.sublime-settings
  3. Use Install Package to add FuzzyFileNav

There’s no obvious indication as to which branch/version you’re installing/have currently installed. Except for the fact that it will work :smile:

Hope this helps,
Alex

0 Likes