Add snippet to create test boilerplate (test⇥)

Use this in a new empty test file to get started.

This goes well together with the new behavior of “Go to Counterpart” (alpha.9447) which allow ⌥⌘↑ to be used to create new test files.
Enable folding for case/default (switch blocks)
Improve indentation rules

For the code I tested, TextMate’s applied indentation is now identical to what you get from ‘gofmt’.
Fix links in potential output from ‘Reformat Document’ (⌃⇧H)

When there are errors we re-run the command via TextMate::Executor, which then takes care of hyperlinking errors in the output.
Remove erroneous escapes in package snippet (pkg⇥)

These were required in TextMate 1.x but are inserted as literal backslashes in 2.0.
Add “Open Package” (⇧⌘D), uses current line’s import path

If the current line is not an import statement then it will prompt the user for the package to open. Default dialog text is the contents of the search clipboard.

The package is located via ‘GOPATH’ and ‘GOROOT’ (obtained via ‘go env’).

If the package contains a single go file (excluding tests) then that file will be opened, otherwise the package is opened as a new project.
Lines with an initial closing brace now always decrease indent

The issue is when code has been partially typed, e.g.:

    } e‸

Here the added ‘e’ (as in ‘else’) would previously cause the line to no longer be matched as decreasing the indent, which lead to suboptimal user experience.
Keys in map literals no longer matched as having zero indent

The rule was intended to match labels, which look the same as key literals.

Now ‘foo:’ is only matched as a label if it has no leading whitespace.

Given the simplicity of the Go grammar, we could actually match map literals and give them a different scope, and thus have different indent patterns for when we are inside a map literal.
Merge pull request #41 from sorbits/master

Improve indentation and folding rules, add test⇥ snippet and “open package” command