Tabs shortcuts #1490
Replies: 5 comments
-
Hi, It seems that the plugin needs to implement a new API for WASM VMs in order to access the application's settings and the status of Tabs on runtime. It would be helpful if you refer to the |
Beta Was this translation helpful? Give feedback.
-
@cosminadrianpopescu - thank you for your patience. I'm back from vacation and can devote attention to this now. I'd recommend going about this a little differently. Implementing this in screen.rs and treating the plugin as a display layer. Then it can be pretty dumb and not know much about the config or make such decisions. Makes sense? |
Beta Was this translation helpful? Give feedback.
-
Yes, don't worry. I was also working on another project. That project is finished now, so I'm going to concentrate back on this one. I'm also leaving in holiday at the end of the week, but I will probably work here and there on holiday also.
Thank you. I'll have a look and let you know if I have questions. |
Beta Was this translation helpful? Give feedback.
-
What exactly does this mean? Which plugin? Is there an example in the code? |
Beta Was this translation helpful? Give feedback.
-
@cosminadrianpopescu @imsnif I would also love to be able to have persistent key bindings that don't change when I close a tab. Is there any progress on this? |
Beta Was this translation helpful? Give feedback.
-
I'm trying to implement a config option to handle the way tabs behave when closing one. By default, when having the tabs
"Tab #1"
,"Tab #2"
,"Tab #3"
and closing the second tab, we are left with"Tab #1"
and"Tab #3"
. The issue is that now the tab"Tab #3"
we access it using the shortcut2
, not the shortcut3
.This new option (for example
keep_tabs_shortcuts
) would be a boolean.false
(the default), the behavior would stay unchanged. The only change would be that the auto-named tabs would be renamed. So, after closing the second tab, we would be accessing remaining the tabs using the shortcuts1
and2
. The only change would be that the"Tab #3"
would be renamed to"Tab #2"
. Of course, if the tab has a custom name, then nothing is changed.true
(set in the config file), then after closing the second tab, the names stay the same (we would be left with"Tab #1"
and"Tab #3"
) but we would access the tabs with the same shortcuts (1
and3
). Selecting the shortcut2
(modifier and then2
) would produce no change. Further more, when inserting a new tab, it would be added to the second position and we would be left with"Tab #1"
,"Tab #2"
and"Tab #3"
.@imsnif The question that I have: since the change has to be done in the tab_line plugin, is there a way for the plugins to access the application config?
Beta Was this translation helpful? Give feedback.
All reactions