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
Automatically hide terminal on exiting terminal mode #4
Comments
Can you clarify exactly what you mean? Do you mean that once the command you sent with |
When neoterm is toggled, nvim will go into terminal mode (basically insert mode for terminals). If the user goes back to normal mode, the buffer will stay visible. My suggestion is that the buffer will be hidden instead. |
So you're in terminal mode and you hit |
Exactly! |
OK, I've just pushed a commit that triggers custom autocommands which you should be able to use to achieve what you want! You should just need to add something like this: autocmd User NeotermTermLeave NeotermClose or vim.api.nvim_create_autocmd("User", {
pattern = "NeotermTermLeave",
callback = require('neoterm').close,
}) Let me know if that works! |
Works perfectly! |
I think it would be really handy to have the option to make a terminal close automatically once the terminal mode is exited. That way, if only one command should be ran, there'd be no need to manually toggle the terminal again, and it will simply hide once terminal mode is exited.
The text was updated successfully, but these errors were encountered: