Boson Joe, some of the issues have already been brought up on GitHub: 2) WinClose event: https://github.com/vim/vim/issues/742 3) WinResize event: https://github.com/vim/vim/issues/3226
If you need to do something very often, you could use the SafeState or SafeStateAgain events. See ":help SafeState" for more details. Alternatively, add a custom function to your 'statusline' which monitors your window layout, or whatever you need. The statusline is updated very frequently, hence the function is called very often. Regards, Ben On 2021-07-13, 'boson_joe' via vim_dev wrote: > Hello everybody! > > Long story short - I`ve been working on my plugin that adds tabs into Vim, > and some things that I expected to be done with ease actually turned to be a > whole puzzle. I'm talking about the following events that cannot be caught: > > 1) Keystrokes - there is no uniform way to catch keystrokes. For example, at > one point I had to catch CTRL-W_r and other actions that move windows around > to redraw tab bars timely. There is no way known to me of doing it reliably. > The only way that seems legit to use for this purpose at the moment is > writing a custom processor for all keys typed by the user. > 2) Resize - no way to uniformly catch windows being resized. At the moment, a > combination of actions need to be used, like looking at commands a user > entered to catch ":resize", catching Vim resize, etc, etc. > 3) Window deletion - there is no event to catch window deletion. I personally > used a combination of WinEnter with checking if the previous window was > deleted, which is not 100% bug free. > > I am writing this mail because during discussion of this topics on the > Internet some people suggested to write about this features here in case > somebody finds these useful as well. So, I would like to ask if there is any > demand on these features to be added and if it is even possible? > > Thank you in advance for your time! > > Best, > boson joe > > PS. I am sorry if I am being too straight-ahead with the features. Don't want > to clutter the maillist up with the things that are not relevant. > > -- > -- > You received this message from the "vim_dev" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/vim_dev/QV0CnWWj3Gcjuq6iVmEULg2zqxaB_O4P_WnBK8gVrpJomCGNP0oC2JvnddKpjhzPbbfGKWscZE6uKE7g0JmaHPy4-qrcyQo-C78KQs-YXdo%3D%40protonmail.com. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/YPFla6FtWHjYsPNj%40laptop.homenetwork.
