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

How about to add option not to jump to the first error or quickfix when build or linting? #2204

Closed
pankona opened this issue Mar 29, 2019 · 1 comment

Comments

@pankona
Copy link
Contributor

pankona commented Mar 29, 2019

What did you do? (required. The issue will be closed when not provided.)

I called :GoBuild or :GoMetaLinter commands that will open quickfix on error.

What did you expect to happen?

I don't want to lose focus from editing buffer.

What happened instead?

Cursor moves on first error (without bang) or moves to quickfix window (with bang).

Configuration (MUST fill this out):

  • vim-go version:

17d4c08 (From master's latest at Mar 29, 2019)

  • vimrc you used to reproduce (use a minimal vimrc with other plugins disabled; do not link to a 2,000 line vimrc):

I use dein to manage plugin.
I'm sorry to say that this vimrc doesn't include installation of dein itself.

set nocp

set runtimepath+=/home/pankona/.dein/repos/github.com/Shougo/dein.vim
call dein#begin('/home/pankona/.dein')
call dein#add('fatih/vim-go', { 'build': ':GoUpdateBinaries'})
call dein#end()

filetype plugin indent on
  • Vim version (first three lines from :version):
VIM - Vi IMproved 8.1 (2018 May 18, compiled Mar  6 2019 21:38:32)
Included patches: 1-996
Compiled by Arch Linux
  • Go version (go version):
$ go version
go version go1.11.6 linux/amd64
  • Go environment (go env):
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/pankona/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/pankona/go"
GOPROXY=""
GORACE=""
GOROOT="/home/pankona/sdk/go1.11.6"
GOTMPDIR=""
GOTOOLDIR="/home/pankona/sdk/go1.11.6/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/pankona/go/src/github.com/CPSPlatform/CoreService/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build754465207=/tmp/go-build -gno-record-gcc-switches"

Remarks

Please note that this is not bug reporting, but just a suggestion.

Currently, some commands that may open quickfix window, if there's some error, cursor must be moved to first error or quickfix window itself (behavior depends on with bang or not) .
How about to add option (or as default behavior) not to be stealed cursor even if such command occurs some error?
Accoding to #1293 , I guess such feature was implemented in the past but currently not. If it is making senses, I'll try to create patch.
Thanks!

bhcleek added a commit to bhcleek/vim-go that referenced this issue Mar 29, 2019
bhcleek added a commit to bhcleek/vim-go that referenced this issue Mar 29, 2019
bhcleek added a commit to bhcleek/vim-go that referenced this issue Mar 29, 2019
@pankona
Copy link
Contributor Author

pankona commented Mar 31, 2019

@bhcleek
Thank you for fixing! 🎉

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

No branches or pull requests

1 participant