Post

Hey Evgeni! Thank you for the article. I'm curious about this bit: > consider doing some simple lazy loading (like after first screen draw or on InsertEnter/CmdlineEnter events) I understand the event part: you use autocmds for those. But how do you run something "after first screen redraw"?

The way I do it is with `vim.schedule(function() ... end)`. When inside config file, it will be executed after first draw. A more convenient solution is to use `later()` from 'mini.deps'. I also plan to add a more involved function to 'mini.misc', since 'mini.deps' will retire eventually.

0 reposts1 like

No replies yet.