Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features I'd Like to See #13

Open
laluxx opened this issue Jun 26, 2023 · 2 comments
Open

Features I'd Like to See #13

laluxx opened this issue Jun 26, 2023 · 2 comments

Comments

@laluxx
Copy link

laluxx commented Jun 26, 2023

Hello @dzfrias,

I hope you're doing well! I've been using Projectable and really enjoy it. It's a great tool and I believe it has even more potential.

I wanted to share some feature suggestions that I think could further improve the user experience:

  1. Automatic Cursor Movement for Marking: After marking a file, having the cursor automatically move down to the next file would make marking multiple files more efficient.

  2. 'l' Key for Opening Files: At the moment, the 'l' key expands directories. I suggest using 'l' for opening files, and allowing it to toggle between expanding and collapsing directories.

  3. 'Tab' Key for Marking: Using the 'Tab' key as an alternative for marking files could be convenient.

  4. Syntax Highlighting in Preview with bat: Enabling syntax highlighting in the preview pane, possibly with integration of bat, would be fantastic.

  5. Support for Custom Aliases and Functions in zsh: It would be helpful if custom aliases and functions were recognized when executing commands with zsh.

  6. Consistent Keybindings for File Deletion: Making the 'l' key perform the same action as 'Enter' when deleting, and 'h' to go back and toggle off the popup (similar to 'Escape') would be more intuitive.

  7. Scrolling Through Preview with Ctrl+J and Ctrl+K: Allowing users to scroll through the preview using Ctrl+J and Ctrl+K would add fluidity to navigation.

I appreciate that these suggestions are based on my own preferences, and I'm interested in your thoughts. Thanks for all the work you put into Projectable!

@dzfrias
Copy link
Owner

dzfrias commented Jun 26, 2023

Thanks for these suggestions, they're great! 3, 4, and 7 are possible with the config file! Here's a configuration that would implement these suggestions:

[filetree]
mark_selected = ["m", "tab"]

[preview]
preview_cmd = "bat --force-colorization --line-range 0:1000 {}"
down_key = "ctrl-j"
up_key = "ctrl-k"

As for number 1, I could add a setting to enable this type of behavior, but I'm a bit hesitant as I feel like I would need something more general then just a boolean toggle. Like a plugin/hook system (which is possible given how the app is structured but still would be a far-future goal).

Number 2 is also interesting, and giving l "toggle behavior" is a good idea for when everything under a certain directory is already open. I think I'll implement that!

Number 5 is something I want too! I did some research and found that zsh -ci COMMAND allows this to work, because by default, subshells don't inherit aliases. This should work in bash, too. I'm not sure if I should make this the default behavior yet, as I don't see it in many other programs, but I'll definitely add an option for users who want it.

Number 6 is also a good idea, but would require a solid amount of extra config settings to get completely right. Right now, there is one keybind that defines a bunch of things relating to "confirming the selected item", like unfolding a directory, opening a file, or confirming a deletion. I think this is pretty nice, so users don't have to look in multiple places around the configuration to rebind a general behavior that's shared between multiple systems of the app. Because of this, I feel like I might keep it as it is, unless you have a good idea how to strike a balance between ease-of-use and configurability relating to this topic.

Big thanks for the suggestions and help with making projectable better! You'll probably see some of the things you mentioned in an upcoming release!

@snippins
Copy link

snippins commented Aug 28, 2023

Since this thread exists, I would like to suggest a few more features:

  1. Focus a file in project given a path: This helps interoperability with text editors and IDEs. For example, you do "jump to definition" in your text editor/IDE, and want to view where the current file placed in the project. This probably needs to be exposed as command line options and also some server-client architecture as we probably have more than one project open.
  2. Remembering folded/unfolded subdirectories: this would help continue working on a project without setting things up again.
  3. Fuzzy search only the files under unfolded directories: This helps to strike a balance between two most used ways to access files in a project. The first way is to fuzzy search for the file under the whole project - this has the disadvantage of picking the wrong file if the project has files with similar names, which would also destroy a carefully unfolded project tree. The second way is to unfold just the directories that are related to a feature we're developing and looking at the files with our eyes - which is very taxing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants