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]: toggle term without putting focus on it. #169

Open
Looooopy opened this issue Mar 6, 2022 · 3 comments
Open

[Feature]: toggle term without putting focus on it. #169

Looooopy opened this issue Mar 6, 2022 · 3 comments

Comments

@Looooopy
Copy link

Looooopy commented Mar 6, 2022

My use case:

I have a command to toggle all TUI on and off but not the open text buffers.
So say I have Nvim-tree and ToggleTerm I hide both and show both when I toggle.

But when I toggle the terminal interface on it automatically take over focus and put it self in insert mode in the terminal.
That is ok if I start a terminal and know I need to do something in the terminal, but not in this use case I would rather stay on the last focused window and let the me decide what to do.

So is there a way of turn this off I have not found any solution but maybe I missed it?

@ryanmsnyder
Copy link

I would like to know if this is possible as well. @Looooopy did you ever find a solution?

@akinsho
Copy link
Owner

akinsho commented Oct 19, 2023

This currently doesn't exist. There is an option to do this using TermExec go_back=true currently this doesn't apply to opening a terminal as far as I can remember. I don't have any bandwidth to add new features like this so if someone will like to contribute it please go ahead. Otherwise please no plus ones on this issue

@akinsho akinsho changed the title [Question]: How to just toggle term without putting focus on it. [Feature]: toggle term without putting focus on it. Oct 19, 2023
@ryanmsnyder
Copy link

@Looooopy, I created a Telescope extension for managing Toggleterm terminals called toggleterm-manager. I also wanted the ability to toggle terminals open/closed (and other actions such as creating/renaming/deleting terminal buffers) without always focusing the terminal but in my case, I didn't want to necessarily leave the Telescope window. I know that's not exactly what you were looking for but you may be able to find a solution in one of the functions I wrote here.

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