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

Feature: Improve session manager navigation #2740

Open
mo8it opened this issue Aug 28, 2023 · 5 comments
Open

Feature: Improve session manager navigation #2740

mo8it opened this issue Aug 28, 2023 · 5 comments

Comments

@mo8it
Copy link

mo8it commented Aug 28, 2023

The session manager is awesome as I already said on Mastodon. Thank you very much for working on it ❤️

But the navigation could be improved though.

Currently, the search mode is activated by default and navigation is only possible using the arrow keys.
But because of my Vim/Helix nature, I don't personally like navigating using the arrow keys. Supporting navigation using j,k,l,m would be an awesome addition to the arrow keys (not replacement).

Should the search mode be activated by default? I would much rather prefer if you could start the search using something like /. The default should be plain navigation because I don't think that people would have many named sessions to navigate through with search. I could be wrong though.

I also can not stop expecting to be able to navigate down after the end of a nesting. For example, if I expand a session, then I can navigate its tabs with the up and down arrows, but I would expect the down arrow to bring me to the next session after the last tab. This should also work with going up.

@imsnif
Copy link
Member

imsnif commented Aug 28, 2023

Hey @mo8it - thanks for the great comments and I'm very happy you like the session manager!

One of the reasons behind implementing this as a plugin is so that people can roll their own behavior if they don't like the default one. Zellij is becoming large and hard to maintain, and while I want to provide sane defaults, allowing for particulars inside those defaults is a bit much for the current maintaining power we have. How about forking the plugin and making it behave as you will? Wdyt?

The rationale for the way things are btw is: most users are not h/j/k/l people. I'm one myself and this pains me, but that's the world we live in. The fuzzy finding is also for panes/tabs (using the titles provided by the applications running inside panes), and so is a very powerful way to navigate through the entire zellij-scape of the machine you're on. And so it is the default option.

@mo8it
Copy link
Author

mo8it commented Aug 28, 2023

It is not that "annoying" to fork the plugin. I just wanted to suggest these changes but you don't have to implement them. Think about it more like a feedback, but I wanted to have it structured using an issue instead of sending it on Mastodon. Feel free to close the issue if you want :D

I know that h/j/k/l navigation is not what the majority of people would use. Therefore I suggested that navigation as an addition, not a replacement to arrow keys :)

It would be an awesome first contribution for me to implement parts of my suggestions that you agree on myself. Would you be open to that? I wanted to contribute to Zellij some day and this sounds like a very good opportunity for the next week. If you are open for it, please tell me which suggestions you would agree on ❤️

@imsnif
Copy link
Member

imsnif commented Aug 31, 2023

Mate, I very much appreciate your offer of help - but I realistically do not see myself finding the time to review this. The main reason it was so important to me to devote time to the plugin system is so that people will be able to configure custom things like these for themselves - without me needing to review their code or maintain it later.

I think you don't need any special APIs to make this happen, right?

@danielyrovas
Copy link

I think Tab and S-Tab are often used to select menu items in a context like this, and coming from vim (and nvim-cmp) I would also like Ctrl n and Ctrl p to cycle forward/back through the list.

@nfvs
Copy link

nfvs commented Feb 16, 2024

Another alternative would be to use Ctrl jh/j/k/l as navigation in the session manager. I just tried to add such a key binding but seems like navigation is not one of the possible actions, so we can't make eg. Ctrl j work as Down.

anopheles added a commit to anopheles/zellij that referenced this issue May 3, 2024
addresses zellij-org#2740

Unfortunately, ctrl+hjkl doesn't seem to work in this context.
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

4 participants