Closed winkee01 closed 4 years ago
thanks for the work, but the problem is still there
I get a prompt for to hit Enter, and then the message disappears. The vimrc you provided seems incomplete. Do you have other options set?
I've removed the previous fix for this in #2649, because it doesn't work well and causes the user to have to unnecessarily hit enter when there are errors and g:go_echo_command_info
is set.
Since you're using Vim 8.2, I think you may generally prefer to use go#statusline#Show
and to add let g:go_echo_command_info=0
to your vimrc. It will provide for a nicer experience.
Here's an example of using go#statusline#Show
from my vimrc: https://github.com/bhcleek/vim/blob/master/vimrc#L90-L106
disable echo go command info works, but now :GoVet won't dissappear, I think it might be a bug of VIM.
I suspect you can duplicate this by running executing :echom test
; under what conditions will the test
disappear?
So all I test is a file has a minor syntax error.
Here is what I get 1) GoVet won't automatically execute, which means I cannot get the error info in the quickfix window.
2) When I execute :GoVet manually, error information is correctly shown but the display of ":GoVet" won't disappear, which is annoying because it takes a line height of the display area.
3) When I execute :echom test, an error shows "E121: Undefined variable: test". an acceptable behavior.
4) When I execute :GoErrorCheck, the window will load a new file(template go file) to replace my original file(buffer). I can only ctrl + o to get back to my original file which has syntax error.
When I execute :GoVet manually, error information is correctly shown but the display of ":GoVet" won't disappear, which is annoying because it takes a line height of the display area.
Your cmdheight
value may be relevant. What is it?
When I execute :echom test, an error shows "E121: Undefined variable: test". an acceptable behavior.
That should be :echom "test"
Without a more complete vimrc, it's difficult for me to tell what may be the cause of some of these issues. Have you actually tried duplicating this issue with the vimrc you provided in the original report?
ok, "test" will not disappear until the screen is redrawn, for example, ctrl-f to scroll down the page to forcibly redraw the screen.
This isn't a bug, it's by design in Vim. Messages are not cleared until the screen is redrawn.
since you closed this issue, do I need to open a new issue in regard to the problem 4? which is:
Yes, please; that's a completely separate issue from this issue's intent.
What did you do? (required: The issue will be closed when not provided)
hello.go is opened, vim does not display syntax error, so I type :GoVet to run the syntax check, it says "vim-go: calling vet...", and stuck there(maybe not because syntax messages are displayed correctly, but this message never updates).
vim open hello.go, then do
:GoVet
, the calling message "vim-go: calling vet..." is never redrawn or updated.What did you expect to happen?
"vim-go: calling vet..." be updated to things like "Succeed", or cleared screen.
What happened instead?
no redraw, no refresh
Configuration (MUST fill this out):
default configuration
vim-go version:
latest
vimrc
you used to reproduce (use a minimal vimrc with other plugins disabled; do not link to a 2,000 line vimrc):vimrc
Vim version (first three lines from
:version
):vim8.2
Go version (
go version
):go version go1.13.3 darwin/amd64
Go environment
go env
Output:gopls version
gopls version
Output: