akinsho / akinsho/toggleterm.nvim
[Feature idea]: Context-based toggling
- Lingua principale
- Lua
- Stelle
- 5.6k
- Fork
- 206
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Hi there! I've been using this plugin for quite a while (it finally got me off of tmux!), and wanted to ask for your opinion on this idea for a new configuration option + set of external utility functions. Currently, when using `:ToggleTerm` without a count, it defaults to "smart-toggling", which has the effect of opening the first unhidden terminal if none are open, and closing open terminals one by one otherwise. However, being a frequent user of `:tcd [directory]`, I would find it more useful for terminals to be opened on a per-tab basis, rather than per-session, and there are probably `:lcd [directory]` users out there who would like to have this effect per-window.
~~So, I'm proposing that we add a new config option `toggle_strategy` that can be set to `"first"`, `"by_tab"`, or `"by_window"` that lets the user select their preference. And we could expose the utility functions that work under the hood to find the correct terminal to toggle (based on context) so it is easy for the user to define additional commands if they want to toggle sometimes by tab, sometimes by window, sometimes globally, etc.~~ Edit: change of plans, see #290.
Of course, this is possible already with some amount of configuration work by the user, but I think explicitly supporting this could make things much easier on their end. And we can take the opportunity to generalize/unify some of the logic in the current implementation.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.