FuzzyFileNav icon indicating copy to clipboard operation
FuzzyFileNav copied to clipboard

Implementing some convenience suggestions

Open GuyShane opened this issue 1 year ago • 4 comments

I just started tetsing out ST as a replacement for emacs, and this package is awesome! Thanks for all the work you've put into it.

I just have a few updates that I've been playing with to more closely replicate the experience I'm used to and I thought I'd see if you'd like to incorporate them.

Here's a summary of the changes:

  • Add an option to remove the .. option from the list
    • I find it enough to be able to type it out, and would prefer for the first item in the list to be a file option
  • Sort the options by last access date if possible, and then alphabetically
    • I often find myself opening the same few files in a project, so it's nice if they always appear closer to the top of the list
  • Pressing backspace when the input is empty goes up a drectory
    • This is taken from emacs ido-mode behaviour, where you can travel up the directory tree by deleting the previous segment
  • Show the current directory as a placeholder
    • I found it kind of hard to see both the options and the status bar at the same time, but I do like to see which directory I'm currently looking at. This hopefully just makes that a little easier
    • It also attempts to keep the name short enough to read by replacing directories with their first letter inspired by fish shell

Feel free to make any changes, or reject them if you don't think they make sense to include.

Thanks again!

GuyShane avatar Oct 15 '24 06:10 GuyShane

Show the current directory as a placeholder

  • I found it kind of hard to see both the options and the status bar at the same time, but I do like to see which directory I'm currently looking at. This hopefully just makes that a little easier
  • It also attempts to keep the name short enough to read by replacing directories with their first letter inspired by fish shell

I'm not sure what this means, can you provide a screenshot showing what this actually does?

Sort the options by last access date if possible, and then alphabetically

  • I often find myself opening the same few files in a project, so it's nice if they always appear closer to the top of the list

If we are going to do this, please add settings that exposes the previous behavior. Previous behavior should be the default. Too many people rely on previous behavior.

  1. Provide a sort setting that can be used to specify the old alphabetical or access time approach.
  2. You've slipped in an additional change where you are mixing folders with documents when sorting. Please sort documents and files separately. If you'd like to expose sorting them all together, please add a setting to enable this behavior. I'm not sure I'm sold on this, but I don't want this as the default behavior and it may not be something all people want.

Add an option to remove the .. option from the list

  • I find it enough to be able to type it out, and would prefer for the first item in the list to be a file option

This is obviously subjective. If this is accepted, the backspace addition is required. This is more for my own notes. backspace change could be accepted independent of whether .. change is accepted.

Lastly, please follow the convention of the project and add docstrings to any new functions providing the basic description of the function's behavior.

facelessuser avatar Oct 15 '24 13:10 facelessuser

Thanks for checking this out so quick! I added some changes which hopefully address your concerns, but I'm happy to make more if necessary. Here are some screenshots of what the placeholder directory looks like. I also put this behind a setting keeping the current behavior as default.

placeholder placeholder_shortened

GuyShane avatar Oct 15 '24 15:10 GuyShane

You will need to address lint and spelling issues. For spelling issue, just wrap the offending CWD in with backticks `CWD`.

Once completed, I will need time to consider the features and whether we want all of them. I think I'm probably okay with the placeholder and sorting. I'm not sure if I like folders mixed with documents, but I'll think about it. I might be okay with backspace but I'd need to make sure it works as expected on various platforms. Some of these keybindings can be tricky on some platforms. If we cannot allow that, we won't allow removal of ...

facelessuser avatar Oct 15 '24 16:10 facelessuser

Awesome, sounds good! Thanks so much

GuyShane avatar Oct 15 '24 16:10 GuyShane