Skip to content

Feature/gomate #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions Commands/Gomate getdoc.tmCommand
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>#!/usr/bin/env bash
. "${TM_BUNDLE_SUPPORT}/go_setup.sh"

$GOPATH/bin/gomate getdoc
</string>
<key>input</key>
<string>selection</string>
<key>inputFormat</key>
<string>text</string>
<key>keyEquivalent</key>
<string>@d</string>
<key>name</key>
<string>Gomate getdoc</string>
<key>outputCaret</key>
<string>afterOutput</string>
<key>outputFormat</key>
<string>html</string>
<key>outputLocation</key>
<string>newWindow</string>
<key>scope</key>
<string>source.go</string>
<key>uuid</key>
<string>5CAB3BF3-E841-43DB-9A5E-B1BA61B2604E</string>
<key>version</key>
<integer>2</integer>
</dict>
</plist>
33 changes: 33 additions & 0 deletions Commands/Gomate install.tmCommand
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>#!/usr/bin/env bash
. "${TM_BUNDLE_SUPPORT}/go_setup.sh"

${GOROOT}/bin/go get -u github.com/pokstad/gomate/cmd/gomate
${GOPATH}/bin/gomate install
</string>
<key>input</key>
<string>none</string>
<key>inputFormat</key>
<string>text</string>
<key>name</key>
<string>Gomate install/update</string>
<key>outputCaret</key>
<string>afterOutput</string>
<key>outputFormat</key>
<string>html</string>
<key>outputLocation</key>
<string>newWindow</string>
<key>scope</key>
<string>source.go</string>
<key>uuid</key>
<string>36773731-D5AC-49F4-938C-08EFC7C042D8</string>
<key>version</key>
<integer>2</integer>
</dict>
</plist>
34 changes: 34 additions & 0 deletions Commands/Gomate notes.tmCommand
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>#!/usr/bin/env bash
. "${TM_BUNDLE_SUPPORT}/go_setup.sh"

$GOPATH/bin/gomate notes
</string>
<key>input</key>
<string>none</string>
<key>inputFormat</key>
<string>text</string>
<key>keyEquivalent</key>
<string>~N</string>
<key>name</key>
<string>Gomate notes</string>
<key>outputCaret</key>
<string>afterOutput</string>
<key>outputFormat</key>
<string>html</string>
<key>outputLocation</key>
<string>newWindow</string>
<key>scope</key>
<string>source.go</string>
<key>uuid</key>
<string>96924418-0F77-4085-BBA1-194A51EC2880</string>
<key>version</key>
<integer>2</integer>
</dict>
</plist>
34 changes: 34 additions & 0 deletions Commands/Gomate outline.tmCommand
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>#!/usr/bin/env bash
. "${TM_BUNDLE_SUPPORT}/go_setup.sh"

$GOPATH/bin/gomate outline
</string>
<key>input</key>
<string>selection</string>
<key>inputFormat</key>
<string>text</string>
<key>keyEquivalent</key>
<string>~O</string>
<key>name</key>
<string>Gomate outline</string>
<key>outputCaret</key>
<string>afterOutput</string>
<key>outputFormat</key>
<string>html</string>
<key>outputLocation</key>
<string>newWindow</string>
<key>scope</key>
<string>source.go</string>
<key>uuid</key>
<string>3EA461FE-2FDE-43EF-86DE-F11258319F4E</string>
<key>version</key>
<integer>2</integer>
</dict>
</plist>
34 changes: 34 additions & 0 deletions Commands/Gomate references.tmCommand
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>#!/usr/bin/env bash
. "${TM_BUNDLE_SUPPORT}/go_setup.sh"

$GOPATH/bin/gomate references
</string>
<key>input</key>
<string>none</string>
<key>inputFormat</key>
<string>text</string>
<key>keyEquivalent</key>
<string>@r</string>
<key>name</key>
<string>Gomate references</string>
<key>outputCaret</key>
<string>afterOutput</string>
<key>outputFormat</key>
<string>html</string>
<key>outputLocation</key>
<string>newWindow</string>
<key>scope</key>
<string>source.go</string>
<key>uuid</key>
<string>639324A9-89F9-414A-9340-3316966D87A5</string>
<key>version</key>
<integer>2</integer>
</dict>
</plist>
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ go get -u github.com/golang/lint/golint | Standard linter
go get -u github.com/alecthomas/gometalinter | Combination of multiple linters
go get -u github.com/rogpeppe/godef | goto definition
go get -u golang.org/x/tools/cmd/gorename | Rename go identifiers
go get -u github.com/pokstad/gomate | Various uses: symbol documentation, references, outline

### TextMate Variables
TextMate does not inherit the users environment unless it is launched from the command line.
Expand Down
14 changes: 13 additions & 1 deletion Support/go_setup.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
#!/usr/bin/env bash
if [ -z "${GOPATH}" ]; then
export GOPATH="${TM_GOPATH}"
if [ -z "${TM_GOPATH}" ]; then
export GOPATH="${HOME}/go"
else
export GOPATH="${TM_GOPATH}"
fi
fi

if [ -z "${GOROOT}" ]; then
if [ -z "${TM_GOROOT}" ]; then
export GOROOT="/usr/local/go"
else
export GOROOT="${TM_GOROOT}"
fi
fi
6 changes: 6 additions & 0 deletions info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@
<string>25CE5652-3DF2-478F-820B-965F6F7F57A4</string>
<string>C2D3D065-3434-4AC0-BB50-5D8676052D1F</string>
<string>------------------------------------</string>
<string>36773731-D5AC-49F4-938C-08EFC7C042D8</string>
<string>5CAB3BF3-E841-43DB-9A5E-B1BA61B2604E</string>
<string>639324A9-89F9-414A-9340-3316966D87A5</string>
<string>96924418-0F77-4085-BBA1-194A51EC2880</string>
<string>3EA461FE-2FDE-43EF-86DE-F11258319F4E</string>
<string>------------------------------------</string>
<string>98F0F28C-3B03-4792-AF44-24E2C4327EED</string>
</array>
<key>submenus</key>
Expand Down