https://github.com/pokstad/gomate
Gomate is a set of TextMate CLI tools for working with Go code
https://github.com/pokstad/gomate
golang gomate textmate
Last synced: 6 months ago
JSON representation
Gomate is a set of TextMate CLI tools for working with Go code
- Host: GitHub
- URL: https://github.com/pokstad/gomate
- Owner: pokstad
- License: other
- Created: 2018-01-15T03:27:19.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-06-02T04:01:49.000Z (about 7 years ago)
- Last Synced: 2025-06-26T01:41:16.411Z (about 1 year ago)
- Topics: golang, gomate, textmate
- Language: Go
- Size: 1.7 MB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://circleci.com/gh/pokstad/gomate)
# Gomate
Gomate is a set of TextMate CLI tools for working with Go code. Inspired by
[syscrusher/golang.tmbundle](https://github.com/syscrusher/golang.tmbundle).
Gomate embraces the Unix philosophy adopted by Textmate by utilizing simple CLI tool constructs, such as:
- Command line arguments to indicate desired action
- Sourcing environment variable for context of operation
- Reading input from STDIN and producing desired output on STDOUT
Additionally, Gomate is comprised of many smaller packages with dedicated functions to allow for maximum reuse outside the scope of Textmate. For example, you may want to use the note parsing package and build your own extension to a different tool (e.g. VSCode or VIM).
The modular design also encouraged the development of some dedicated CLI tools:
- [notes](notes/notes) - provided a path, will scan recursively and return all godoc notes in all packages
- Installation: `go get github.com/pokstad/gomate/notes/notes`
- Usage: `$GOPATH/bin/notes [OPTIONS] PACKAGE_PATH`
## Install
To get the gomate CLI:
`go get -u github.com/pokstad/gomate`
Then, install the tool's dependencies:
`$GOPATH/bin/gomate install`
## Usage
Until the bundle install is automated, the following needs to be done manually for each bundle command script:
### References
To find references to the symbol under the cursor:
```
#!/bin/bash
gomate references
```
- `Output:` is set to `Show in New Window`
- `Format:` is `HTML`
External dependencies: [guru](https://golang.org/x/tools/cmd/guru)
### Outline
To generate an outline of the current source code file:
```
#!/bin/bash
gomate outline
```
- `Input:` is set to `Selection`
- `Format` is set to `Text`
- `Output:` is set to `Show in New Window`
- `Format:` is `HTML`
### Get Documentation
To view HTML documentation of the symbol under the cursor:
```
#!/bin/bash
gomate getdoc
```
- `Input:` is set to `Document`
- `Format` is set to `Text`
- `Output:` is set to `Show in New Window`
- `Format:` is `HTML`
External dependencies: [gogetdoc](https://github.com/zmb3/gogetdoc)
### Notes
To view a list of gonotes in the current project:
```
#!/bin/bash
gomate notes
```
- Input: Nothing
- Ouput: Show in New Window
- Format: HTML
### Rename
To rename an identifier:
```
#!/bin/bash
gomate rename
```
- Input: Nothing
- Output: Discard
External dependencies: [gorename](golang.org/x/tools/cmd/gorename)
## Roadmap
- Testing coverage and advanced options for individual test functions (similar to VSCode code lense)
- Reimplement all features of existing Textmate plugin
[syscrusher/golang.tmbundle](https://github.com/syscrusher/golang.tmbundle)
- Web service to support rich contexts that allow interactions via AJAX calls