commands: use bang attribute to jump to errors #441
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously we were using a custom global variable to control the
behavior of jumpting to an error when we called any command in cmd.vim
(such as :GoInstall, :GoTest, etc..)
However we don't need this actually because the default :make command
in vim has the behavior of no jumping to the error when the
!
attributeis passed to the command, i.e:
:make!
. We have this feature alreadyfor
:GoBuild
and:GoRun
but those were also conflicting with ourmanual
g:go_jump_to_error
setting. Basically even if you call:GoBuild
(without!
) it would not jump ifg:go_jump_to_error
wasset to
0
.This PR adds the bang attribute, removes the
go_jump_to_error
settingfor the following commands:
:GoBuild
:GoRun
:GoInstall
:GoTest
:GoTestFunc
:GoTestCompile
:GoVet
:GoCoverage
Now basically the behavior is just like
:make
::GoBuild
jumps to the error:GoBuild!
does not jump to the errorRelates issue #440