misc/vim: fix :Import insertion heuristic.

If a factored import group has a blank line, assume it is dividing
separate groups of imports (e.g. standard library vs. site-specific).
        import (
                "bytes"
                "io"

                "mycorp/package"
        )

The most common case is inserting new standard library imports,
which are usually (stylistically) the first group, so we should drop
"net" in the above example immediately after "io".

Since this logic is getting non-trivial, add a test.

R=golang-dev, minux.ma, franciscossouza
CC=golang-dev
http://codereview.appspot.com/6445043
misc/vim: fix for autocompletion

    Vim autocompletion respects the $GOPATH variable and does not
    ignore dashes ('-'), dots ('.') and underscores ('_') like found
    in many remote packages.
    Environment variable $GOROOT is determined by calling
    'go env GOROOT' instead of relying on the user's environment
    variables.

    Fixes issue 3876
    Fixes issue 3882

R=golang-dev, franciscossouza, dsymonds, minux.ma
CC=golang-dev
http://codereview.appspot.com/6443151

Committer: Shenghou Ma <minux.ma@gmail.com>
misc/vim: fix Drop for imports after the first group.

Previously, an import block such as
	import (
        	"net"

                "stack"
        )
would not permit ":Drop stack" to work because we were aborting
the scan early, which is only correct when Import is in operation.

R=golang-dev, franciscossouza
CC=golang-dev
http://codereview.appspot.com/6532053
misc/vim: fix reimport guard and remove K mapping.

The "did_ftplugin" lines were ineffective and the "K" mapping was too
invasive, which is why it was removed.

R=golang-dev, dsymonds, minux.ma
CC=golang-dev
http://codereview.appspot.com/6823044

Committer: David Symonds <dsymonds@golang.org>
misc/vim: update installation instructions to work better with some Linux distributions.

Fixes issue 3308.

R=golang-dev, minux.ma
CC=golang-dev
https://codereview.appspot.com/7301086
misc/vim: make Godoc command work with "log.Print".

R=dsymonds
CC=golang-dev
https://codereview.appspot.com/7757043

Committer: David Symonds <dsymonds@golang.org>
misc/vim: test.sh seems to only work on Mac OS X.

cmp(1) on FreeBSD requires two file arguments.  grep -P on Linux (at least
Ubuntu 12.04) is described in the man page as "This is highly
experimental" and doesn't seem to work. On FreeBSD the man page states
"This option  is not supported in FreeBSD."  Needed this to work while
debugging some funky behavior of 'Import' in my local vim setup.

R=golang-dev, dsymonds
CC=golang-dev
https://codereview.appspot.com/7675043

Committer: David Symonds <dsymonds@golang.org>
misc/vim: Adding flag-guarding for Vim commands

Default behavior is the same as before, but now a user may selectively disable some commands.

Also: deleted the mappings for import.vim.

Tested: by trying the commands for fmt, import and godoc in succession to make sure they still work. Also, ran test.sh in ftplugin/go.

R=golang-dev, dsymonds
CC=golang-dev
https://codereview.appspot.com/10124043

Committer: David Symonds <dsymonds@golang.org>
misc/vim: Added filetype settings for comments.

This basic Vim ftplugin sets the 'comments' and 'commentstring'
settings to sensible values. Future filetype settings for Go
would go in the same file.
The ftplugin was added as misc/vim/ftplugin/go/go.vim, this way
the installation instructions in readme.txt remain valid.
Fixes issue 5715.

R=dsymonds
CC=gobot, golang-dev
https://codereview.appspot.com/10323043

Committer: David Symonds <dsymonds@golang.org>
misc/vim: Add compiler plugin for Go

This change adds a basic compiler plugin for Go. The plugin
integrates "go build" with Vim's ":make" command and the
quickfix list.

Fixes issue 5751.

R=golang-dev, dsymonds, niklas.schnelle, 0xjnml
CC=golang-dev
https://codereview.appspot.com/10466043

Committer: David Symonds <dsymonds@golang.org>
misc/vim: Allow multiple GOOS/GOARCH.

R=golang-dev, dsymonds, dominik.honnef
CC=golang-dev
https://codereview.appspot.com/9293043

Committer: David Symonds <dsymonds@golang.org>
update tags