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?
Many thanks,
Paul