twinpasob.blogg.se

Textmate golang
Textmate golang







  • Improved, expanded documentation coverage (thanks syscrusher).
  • Bug fixes and improvements (thanks msoap).
  • HiDPI completion icons (thanks nanoant).
  • added print, println, printf, and fprintf snippets improved struct snippet (thanks.
  • textmate golang

    run and build work on unsaved files (thanks tg).all non-run go commands operate on the current directory instead of per file if the package is not defined dynamically.The bundle will consult these commands if defined to dynamically change the gopath or package based on the current directory.

    textmate golang

  • Users can supply commands via ENV variables (TM_GO_DYNAMIC_GOPATH, TM_GO_DYNAMIC_PKG, TM_GO_DYNAMIC_PKG_PATH).
  • Support for goimports and golint (thanks fmccann).
  • Substantially improved syntax highlighting (thanks nanoant).
  • This repository is a fork from Jim Dovey's bundle with additional improvements merged from around the community.Ĭhanges from the original version (see git log for more details):

    #TEXTMATE GOLANG FULL#

    'var x int = 10').Ī block of long-form variable declarations.Ī deferred goroutine call (defines the function inline).Ī plain (global) function declaration, with tab stops for name, parameters, and a single optional result.Ī plain (global) function declaration, with tab stops for name, parameters, and multiple results.Īn immediate goroutine call (defines the function inline).Ī template for a module's +init()+ function, with a tab stop at its body.Ī template for a +main()+ function with a tab stop at its body.ĭeclares a function on a particular type, with additional tab stops for receiver name and type and a single optional result.ĭeclares a function on a particular type, with additional tab stops for receiver name and type and multiple results.Ī case clause, within a switch or select.Ī for loop with an index (similar to C for loops).Ī for loop iterating over a collection's full range.Īn if statement, properly formatted (Go requires the use of on ifs, unlike C this throws me sometimes).Ī select statement, for looping over channel conditions.Ī switch statement with an optional expression. 'name := value').Ī slice variable type expands to '+type+', so is usable inside other snippets.Īn interface definition with a single method.Ī make statement (used for creating & initializing channels, maps, etc.).Ī map variable type expands to 'map+valuetype+'.Ī new statement (used to create & initialize structure types).Ī struct definition with a single member.Ī type declaration, with name and variable type as tab-stops.ĭeclare a variable with an optional initial value (long form, i.e. matches anything).Īn import statement with optional alternative name.Ī package declaration including an optional comment block for packages other than 'main'.Ī return statement with optional return value.Ī short-form variable initializer (i.e. Provides tab stops for the value and the channel name.įmt.Printf with tab stops for string and interfaceĪn empty interface type (i.e. Run the default linters supplied by gometalinterĪ pair ('first, second'), suitable for declaring result variables from a multi-return-value function or a map range loop. Reformat the document according to the Go style guidelines, automatically resolve imports. Go to the original definition of the currently selected symbol. Show the Go HTML documentation for the currently-selected symbol. Open either a package listed in imports or a user-supplied package. Users/myuser/go/bin/gofmt OR TM_GOFMT=/Users/myuser/go/bin/goimports for automatic import resolution on file save You may override the following TextMate variables in the preferences, but most of these should be unnecessary (adjust paths to your own configuration): Variable You do not have to set GOROOT in most circumstances.

    textmate golang

    You do not have to set TM_GOPATH if your GOPATH is ~/go and you are running Go >1.8. You may have to set TM_GOPATH and GOROOT inside of TextMate for all functionality to work. TextMate does not inherit the users environment unless it is launched from the command line. These utilities can be installed with the following commands: Command This bundle relies on amazing open source tooling for some functionality. Syntax highlighting will work, but commands may not. go files and load this bundle automatically.

    textmate golang

  • Multiple linters supported with gometalinter.
  • View documentation with gogetdoc (Requires Go 1.6+).
  • (a TextMate 2 bundle for the go programming language) Features







    Textmate golang