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
VimSuspend, VimResume autocmds #3648
Comments
I'm not sure how many use cases there are for it, but then again it should only take a few lines to add these autocmds. Opinions? |
What about rasiing FocusGained/FocusLost for resume/suspend? |
@justinmk This is logical, but it needs a way to distinguish between “suspend” and “A-Tab” cases since there are different consequences: e.g. with “A-Tab” plugin may start doing some hard job even in a blocking fashion because it knows it has time. With “suspend” it cannot do anything blocking. |
Ok. I suggest names like VimSuspend/VimResume, for parallel form with VimEnter/VimLeave. All of these states are nearly literal equivalents to OS scheduler states. |
👍 |
Roger that. |
I like Just like when I FYI, for now I am using this workaround:
|
When using neomake cargo maker, suspending while a maker is running causes cargo to be unusable outside of vim, since cargo uses a lock to serialize work. It would be nice to be able to kill or otherwise interrupt the process when suspending. |
@tomprince |
Adding this autocmd should be easy, if anyone wants to send a PR. |
@jeromedalbert thank you for the snippet, works like a charm :) The silent! does not seem to work though. |
Please provide some pointers as to where get started with this. |
I guess though that it makes sense for Vim also, so should likely come in through a patch from there - even if it is likely being done in a different way. |
Posted at vim_dev about it: https://groups.google.com/d/msg/vim_dev/Gb3D0LCaJrI/Rscj4O9CAgAJ |
Brief question: how would I check if the current vim instance has support for VimSuspend and VimResume? |
@felipesere See
(Note the double For questions about usage/configuration, try https://vi.stackexchange.com and the resources listed at https://neovim.io/community/. The issue tracker is for bugs and feature requests. Thanks. |
I think it would be useful to have autocommand events for suspending and resuming Neovim (
Ctrl-Z
, but might be remapped).This would be useful to indicate to tmux / https://github.com/christoomey/vim-tmux-navigator that the current pane is not controlled by Vim anymore (and restore it).
Ref: christoomey/vim-tmux-navigator#37.
The text was updated successfully, but these errors were encountered: