AlanQuatermain / go-tmbundle

A TextMate bundle for the Go programming language.
http://alanquatermain.net/
Other
127 stars 40 forks source link

Use goimports on save if available #59

Open magisterquis opened 8 years ago

magisterquis commented 8 years ago

Since goimports is a superset of gofmt functionality, (perhaps optionally) using it instead of gofmt on save not only formats code, but handles imports as well.

parkr commented 8 years ago

It may be helpful to know that simply putting goimports into TM_GOFMT doesn't work – goimports expects input from stdin and that's not how it works at the moment with gofmt in this bundle.