1
0
mirror of https://github.com/golang/go synced 2024-10-04 19:31:21 -06:00
go/misc/vim/ftplugin
David Symonds 3294404900 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
https://golang.org/cl/6445043
2012-07-30 08:48:51 +10:00
..
go misc/vim: fix :Import insertion heuristic. 2012-07-30 08:48:51 +10:00