Skip to content

Commit f62b6ac

Browse files
committed
Add basic help command.
Recommended by StyleGuide. Doesn't include commands and snippets because the documentation currently uses GitHub syntax for tables, which TextMate doesn't render well.
1 parent 08b5dd8 commit f62b6ac

File tree

3 files changed

+61
-0
lines changed

3 files changed

+61
-0
lines changed

Commands/Help.tmCommand

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>beforeRunningCommand</key>
6+
<string>nop</string>
7+
<key>command</key>
8+
<string>#!/bin/bash
9+
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] &amp;&amp; . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
10+
11+
. "$TM_SUPPORT_PATH/lib/webpreview.sh"
12+
html_header "Go Bundle Help" "Go"
13+
"$TM_SUPPORT_PATH/lib/markdown_to_help.rb" "$TM_BUNDLE_SUPPORT/HELP.md"
14+
html_footer
15+
exit_show_html</string>
16+
<key>input</key>
17+
<string>none</string>
18+
<key>inputFormat</key>
19+
<string>text</string>
20+
<key>name</key>
21+
<string>Help</string>
22+
<key>outputCaret</key>
23+
<string>afterOutput</string>
24+
<key>outputFormat</key>
25+
<string>html</string>
26+
<key>outputLocation</key>
27+
<string>newWindow</string>
28+
<key>scope</key>
29+
<string>source.go</string>
30+
<key>uuid</key>
31+
<string>98F0F28C-3B03-4792-AF44-24E2C4327EED</string>
32+
<key>version</key>
33+
<integer>2</integer>
34+
</dict>
35+
</plist>

Support/HELP.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Setup
2+
This bundle relies on amazing open source tooling for some functionality. These utilities can be installed with the following commands:
3+
4+
go get -u github.com/nsf/gocode # completion
5+
go get -u github.com/zmb3/gogetdoc # documentation
6+
go get -u golang.org/x/tools/cmd/goimports # import resolution/rewriting
7+
go get -u github.com/golang/lint/golint # linting
8+
go get -u github.com/rogpeppe/godef # goto definition
9+
go get -u github.com/alecthomas/gometalinter # metalinting
10+
11+
You may override the following TextMate variables in the preferences (adjust paths to your own configuration). TextMate does not inherit the users environment unless it is launched from the command line. It may be necessary to set TM_GOPATH and GOROOT.
12+
13+
TM_GO=/usr/local/bin/go
14+
TM_GOPATH=/Users/myuser/go
15+
TM_GOCODE=/Users/myuser/bin/gocode
16+
TM_GOGETDOC=/Users/myuser/bin/gogetdoc
17+
TM_GOFMT=/Users/myuser/bin/gofmt # or /Users/myuser/bin/goimports
18+
TM_GOIMPORTS=/Users/myuser/bin/goimports
19+
TM_GOLINT=/Users/myuser/bin/golint
20+
TM_GODEF=/Users/myuser/bin/godef
21+
TM_GOMETALINTER=/Users/myuser/bin/gometalinter
22+
23+
# Further Help
24+
The full documentation is available on [GitHub](https://github.com/syscrusher/golang.tmbundle/blob/master/README.md), including commands and snippets.

info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
<string>4BE04FFA-DF1F-4A48-BAF6-6711544ECAC9</string>
3838
<string>25CE5652-3DF2-478F-820B-965F6F7F57A4</string>
3939
<string>C2D3D065-3434-4AC0-BB50-5D8676052D1F</string>
40+
<string>------------------------------------</string>
41+
<string>98F0F28C-3B03-4792-AF44-24E2C4327EED</string>
4042
</array>
4143
<key>submenus</key>
4244
<dict>

0 commit comments

Comments
 (0)