Paul Jolly wrote:
> Hi all, > > I would like to kindly ask for some advice on how to do informational > logging in Vim. > > When govim (https://github.com/myitcv/govim) starts up, it checks > whether it needs to "go install" a new version of the Go part of the > plugin, as well as gopls (the LSP server). > > In order to keep the user informed (because otherwise things would > just appear to hang), I echom a message: > > :echom "Installing govim and gopls" > :call feedkeys(" ") " to prevent press ENTER to continue > > (source: > https://github.com/myitcv/govim/blob/c14a323551a641734eaef3c70cee9bd21e862d18/plugin/govim.vim#L298-L299) > > Notice the "hack" to prevent the "press ENTER to continue" prompt. I > did this because it seemed impossible/contradictory to me to use > :silent with :echom. > > I follow a similar approach for sharing the location of two key > logfiles (govim is still relatively immature, so referring to these > happens more often than is desirable). > > What's annoying about this approach (beyond the fact that it feels > like a hack) is that when I quit vim it leaves a couple of lines of > artefacts as output in terminal: > > $ vi > Vim channel logfile: /tmp/vim_channel_log_20190612_1700_11_poZWE0oDJxp3 > Press ENTER or type command to continue > > Does anyone have any pointers/advice on how to do this better? This is what popup_notification() is for. It's not implemented yet though. By default it shows a message for three seconds. Maybe I'll implement a way to close it, so you can keep it up longer. -- hundred-and-one symptoms of being an internet addict: 157. You fum through a magazine, you first check to see if it has a web address. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- 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/201906121706.x5CH67HS028578%40masaka.moolenaar.net. For more options, visit https://groups.google.com/d/optout.
