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.
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.
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.
These were required in TextMate 1.x but are inserted as literal backslashes in 2.0.
When there are errors we re-run the command via TextMate::Executor, which then takes care of hyperlinking errors in the output.
Also rename “Go → Test” to “Go → Run Tests” and move it up below the “Go → Run” action.
We now use the default auto-linking of ‘«file»:«line»[:«column»]’ as it handles the case where we are executing a temporary file due to the source document being untitled.
The current file can either be a regular source file (“foo.go”) or the test file (“foo_test.go”). In both cases though, the test/non-test counterpart must exist for this command to work. Previously we would run ‘go test «path»’ which fails since ‘go test’ expects a package. Run ‘go help packages’ for how a package is defined.
…rbits-master * 'master' of git://github.com/sorbits/go.tmbundle: Exclude whitespace in function declarations from variable scope Do not scope whitespace as a variable Enable auto-scroll for command output (run/compile/test) Implementation tweaks Change (advanced) completion command’s key equivalent to ⌥⎋ Require ‘gocode’ via TextMate 2’s required command system
This improves word movement, though ideally we would match the content correctly, as we presently do scope asterisk, braces, and similar, as variable, not to mention that only part of the content is actually variables, the rest are type info.
Ask TextMate to “save modified files” and use TextMate.save_if_untitled in the command, which will create a temporary file for untitled documents. The advantage is that whenever there is a file, TextMate will handle saving it, rather than delegate this to the command. Limit TextMate.make_project_master_current_document and the ‘:use_hashbang’ argument to the commands that call TextMate.executor. The method will check if the user has setup a different master file, and if so, change TM_FILEPATH to point to the master file, which isn’t relevant for Run (⌘R) and documentation lookups. Likewise, the ‘:use_hashbang’ argument is only relevant for TextMate.executor. The ‘:interactive_input’ argument is no longer supported and has been removed.
Previously this command eclipsed the simple buffer completion, of which it is not a superset, so we should keep both actions around, especially since this command does not work before the user has installed ‘gocode’.
This leads to a better user experience and allow the user to set TM_GOCODE instead of updating PATH.