Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commands: use bang attribute to jump to errors #441

Merged
merged 3 commits into from
May 26, 2015
Merged

commands: use bang attribute to jump to errors #441

merged 3 commits into from
May 26, 2015

Conversation

fatih
Copy link
Owner

@fatih fatih commented May 25, 2015

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 ! attribute
is passed to the command, i.e: :make!. We have this feature already
for :GoBuild and :GoRun but those were also conflicting with our
manual g:go_jump_to_error setting. Basically even if you call
:GoBuild (without !) it would not jump if g:go_jump_to_error was
set to 0.

This PR adds the bang attribute, removes the go_jump_to_error setting
for 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 error

Relates issue #440

fatih added 3 commits May 25, 2015 14:17
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 `!` attribute
is passed to the command, i.e: `:make!`. We have this feature already
for `:GoBuild` and `:GoRun` but those were also conflicting with out
manual `g:go_jump_to_error` setting. Basically even if you call
`:GoBuild` (without `!`) it would not jump if `g:go_jump_to_error` was
set to `0`.

This PR adds the bang attribute, removes the `go_jump_to_error` setting
for 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 error
@fatih
Copy link
Owner Author

fatih commented May 26, 2015

This is good to go.

fatih added a commit that referenced this pull request May 26, 2015
commands: use bang attribute to jump to errors
@fatih fatih merged commit 299f440 into master May 26, 2015
@fatih fatih deleted the error-jumping branch May 26, 2015 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant