Descriptionmisc/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.
Patch Set 1 #Patch Set 2 : diff -r a0aa11b6c6cb https://go.googlecode.com/hg/ #Patch Set 3 : diff -r a0aa11b6c6cb https://go.googlecode.com/hg/ #Patch Set 4 : diff -r a0aa11b6c6cb https://go.googlecode.com/hg/ #
Total comments: 2
Patch Set 5 : diff -r a39aacb5077d https://go.googlecode.com/hg/ #MessagesTotal messages: 8
|