zellij icon indicating copy to clipboard operation
zellij copied to clipboard

Feature: Improve session manager navigation

Open mo8it opened this issue 10 months ago • 5 comments

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.

mo8it avatar Aug 28 '23 16:08 mo8it

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.

imsnif avatar Aug 28 '23 16:08 imsnif

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 ❤️

mo8it avatar Aug 28 '23 16:08 mo8it

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?

imsnif avatar Aug 31 '23 13:08 imsnif

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.

danielyrovas avatar Sep 04 '23 00:09 danielyrovas

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.

nfvs avatar Feb 16 '24 12:02 nfvs