You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,16 @@ Planned:
2
2
- Rework some snippets, like a single import without an alias
3
3
- Add support for all go tools like fix, vet, lint, oracle
4
4
5
+
###3.2.0 / 2015-09-18
6
+
-[Support for dynamically determining gopath, package name, and package path @fmccann](https://github.com/syscrusher/golang.tmbundle/commit/49440460f058e80ccf0f2bd44891b48164091128)
7
+
-[Support for golint and goimports @fmccann](https://github.com/syscrusher/golang.tmbundle/commit/49440460f058e80ccf0f2bd44891b48164091128)
8
+
-[Display package name when running command against package name @fmccann](https://github.com/syscrusher/golang.tmbundle/commit/49440460f058e80ccf0f2bd44891b48164091128)
9
+
-[Allow run and build on unsaved files @tg](https://github.com/syscrusher/golang.tmbundle/commit/4809d74ea36654bdd9a2475ded6f729eb3082b65)
10
+
-[Fmt updates document without saving the current version @tg](https://github.com/syscrusher/golang.tmbundle/commit/998d17a9f8024b2c6571f242d2d93f44723c3e87)
11
+
-[Automatically format documents on save @tg](https://github.com/syscrusher/golang.tmbundle/commit/8e6a71b1f8e986b7644c3286c1f4c538dc1345ec)
-[Run all non-run commands against current directory @tg](https://github.com/syscrusher/golang.tmbundle/commit/d3f09ee3bbe5fba76964e1bdc23e7d7247b733ee)
7
17
-[Allow run and build on unsaved files @tg](https://github.com/syscrusher/golang.tmbundle/commit/4809d74ea36654bdd9a2475ded6f729eb3082b65)
@@ -106,6 +116,6 @@ Imported some community additions and bugfixes to bring compatibility with OS X
106
116
- Variable initialization is FINALLY matching correctly. Should work for every style & number of variables, even in-line in loop statements.
107
117
- Matches exported variable names correctly (i.e. those beginning with an uppercase letter).
108
118
- Dot-accessed variable match no longer consumes the preceding '.' character.
TextMate::UI.request_string :title =>"Open Package", :default => defaultText, :prompt =>"Which package do you wish to open?"
20
21
end
21
22
end
22
23
23
24
def go_path
24
-
env = %x{"${TM_GO:-go}" env}
25
+
env = %x{"${TM_GO:-go}" env}
25
26
if $? == 0
26
27
lcal, root = [], []
27
-
env.scan(/^GO(PATH|ROOT)="(.*)"/) do |key,value|
28
+
env.scan(/^GO(PATH|ROOT)="(.*)"/) do |key,value|
28
29
case key
29
-
when 'PATH': lcal = value.split(':').map { |dir| "#{dir}/src" }
30
-
when 'ROOT': root = value.split(':').map { |dir| "#{dir}/src/pkg" }
30
+
when 'PATH': lcal = value.split(':').map { |dir| "#{dir}/src" }
31
+
when 'ROOT': root = value.split(':').map { |dir| "#{dir}/src/pkg" }
Copy file name to clipboardExpand all lines: README.md
+21-6Lines changed: 21 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,23 @@
1
-
## golang.tmbundle v3.1.0
1
+
## golang.tmbundle v3.2.0
2
2
(a TextMate 2 bundle for the go programming language)
3
3
4
4
### Installation
5
5
TextMate by default will detect .go files and load [Jim Dovey's bundle](https://github.com/AlanQuatermain/go-tmbundle). This is a fork with additional improvements merged from around the community.
6
6
7
7
Big changes from the default version:
8
-
- all non-run go commands operate on the current directory instead of per file (thanks [tg](https://github.com/tg))
8
+
- Support for goimports (thanks [fmccann](https://github.com/fmccann))
9
+
- Support for golint (thanks [fmccann](https://github.com/fmccann))
10
+
- Users can supply commands via ENV variables (TM\_GO\_DYNAMIC\_GOPATH, TM\_GO\_DYNAMIC\_PKG, TM\_GO\_DYNAMIC\_PKG\_PATH). The bundle will consult these commands if defined to dynamically change the gopath or package based on the current directory. (thanks [fmccann](https://github.com/fmccann))
11
+
- all non-run go commands operate on the current directory instead of per file if the package is not defined dynamically. (thanks [tg](https://github.com/tg)).
9
12
- run and build work on unsaved files (thanks [tg](https://github.com/tg))
10
13
- added print, println, printf, and fprintf snippets (thanks [jish](https://github.com/jish))
11
14
- bugfixes
12
15
13
16
To install this bundle manually, open a Terminal window and do:
@@ -26,8 +29,20 @@ go get -u github.com/nsf/gocode
26
29
go get -u code.google.com/p/go.tools/cmd/godoc
27
30
```
28
31
32
+
This bundle uses goimports for cleaning up imports and reformatting code, which can be installed with:
33
+
34
+
```Shell
35
+
go get -u go get golang.org/x/tools/cmd/goimports
36
+
```
37
+
38
+
This bundle uses golint for linting code, which can be installed with:
39
+
40
+
```Shell
41
+
go get -u github.com/golang/lint/golint
42
+
```
43
+
29
44
### Features
30
-
The bundle implements language syntax, completion via gocode, some snippets, and some compile/format/documentation commands for the [Go language](http://golang.org/).
45
+
The bundle implements language syntax, completion via gocode, some snippets, and some compile/format/documentation commands for the [Go language](http://golang.org/).
31
46
32
47
### Snippets
33
48
@@ -113,4 +128,4 @@ This is a fork from [Jim Dovey](https://github.com/AlanQuatermain) who has done
113
128
>Thanks be to lasersox and Infininight over at the [#textmate room on IRC](irc://irc.freenode.net/textmate) for all their help in cleaning up this here bundle, and for helping me to optimize my regex use in the language grammar.
114
129
Thanks to Martin Kühl for his extensive additions to this project's snippets and commands. Also Infininight's work on updating the bundle to use the TextMate's new Ruby interface and Jeremy & Sylvain's work on supporting Go 1.0 has been invaluable. Their assistance and stewardship while I've been deep in the world of Objective-C is very much appreciated.
0 commit comments