Skip to content

Commit 2ac3d9c

Browse files
author
Jim Dovey
committed
I hate tabs. And I hate RDoc being sensitive to different amounts of whitespace via tabs/spaces. Sigh.
1 parent 01afa49 commit 2ac3d9c

File tree

1 file changed

+46
-46
lines changed

1 file changed

+46
-46
lines changed

README.rdoc

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -16,54 +16,54 @@ Ensure you've got a recent copy of git installed, then copy this line to your Te
1616
The bundle here implements a language syntax, some snippets, and some compile/format/documentation commands for the Go language (http://golang.org/). Much of the current infrastructure was created by Martin Kühl (http://github.com/mkhl), who is a significantly more seasoned TextMate bundle developer than I, and to whom I am eternally grateful.
1717

1818
=== Snippets
19-
[pkg] A package declaration including an optional comment block for packages other than 'main'.
20-
[imp] An import statement with optional alternative name.
21-
[imps] A multiple-import statement.
22-
[type] A type declaration, with name and variable type as tab-stops.
23-
[types] A block with multiple type declarations.
24-
[con] A single constant declaration.
25-
[cons] A multiple constant declaration block.
26-
[var] Declare a variable with an optional initial value (long form, i.e. 'var x int = 10').
27-
[vars] A block of long-form variable declarations.
28-
[func] A plain (global) function declaration, with tab stops for name, parameters, and a single optional result.
29-
[funcv] A plain (global) function declaration, with tab stops for name, parameters, and multiple results.
30-
[meth] Declares a function on a particular type, with additional tab stops for receiver name and type and a single optional result.
31-
[meth] Declares a function on a particular type, with additional tab stops for receiver name and type and multiple results.
32-
[in] An empty interface declaration (i.e. matches anything).
33-
[int] An interface definition with a single method.
34-
[st] A struct definition with a single member.
35-
[\[\]] A slice variable type; expands to '[]+type+', so is usable inside other snippets.
36-
[map] A map variable type; works similar to the slice type above.
37-
[ch] A channel type.
38-
[fun] A function type definition statement.
39-
[:] A short-form variable initializer (i.e. 'name := value').
40-
[mk] A make statement (used for creating & initializing channels, maps, etc.).
41-
[new] A new statement (used to create & initialize structure types).
42-
[Cmd-i] '+iota+'
43-
[if] An if statement, properly formatted (Go requires the use of {} on ifs, unlike C; this throws me sometimes).
44-
[sw] A switch statement with an optional expression.
45-
[sel] A select statement, for looping over channel conditions.
46-
[case] A case clause, within a switch or select.
47-
[def] A default clause within a switch.
48-
[for] A for loop.
49-
[fori] A for loop with an index (similar to C for loops).
50-
[forr] A for loop iterating over a collection's full range.
51-
[go] An immediate goroutine call (defines the function inline).
52-
[de] A deferred goroutine call (defines the function inline).
53-
[def] A simple deferred function call (by default supplies '+defer file.Close()+').
54-
[main] A template for a +main()+ function with a tab stop at its body.
55-
[init] A template for a module's +init()+ function, with a tab stop at its body.
56-
[,] A pair ('first, second'), suitable for declaring result variables from a multi-return-value function or a map range loop.
57-
[<] Send/receive through a channel. Provides tab stops for the value and the channel name.
58-
[ret] A return statement with optional return value.
19+
[pkg] A package declaration including an optional comment block for packages other than 'main'.
20+
[imp] An import statement with optional alternative name.
21+
[imps] A multiple-import statement.
22+
[type] A type declaration, with name and variable type as tab-stops.
23+
[types] A block with multiple type declarations.
24+
[con] A single constant declaration.
25+
[cons] A multiple constant declaration block.
26+
[var] Declare a variable with an optional initial value (long form, i.e. 'var x int = 10').
27+
[vars] A block of long-form variable declarations.
28+
[func] A plain (global) function declaration, with tab stops for name, parameters, and a single optional result.
29+
[funcv] A plain (global) function declaration, with tab stops for name, parameters, and multiple results.
30+
[meth] Declares a function on a particular type, with additional tab stops for receiver name and type and a single optional result.
31+
[meth] Declares a function on a particular type, with additional tab stops for receiver name and type and multiple results.
32+
[in] An empty interface declaration (i.e. matches anything).
33+
[int] An interface definition with a single method.
34+
[st] A struct definition with a single member.
35+
[\[\]] A slice variable type; expands to '[]+type+', so is usable inside other snippets.
36+
[map] A map variable type; works similar to the slice type above.
37+
[ch] A channel type.
38+
[fun] A function type definition statement.
39+
[:] A short-form variable initializer (i.e. 'name := value').
40+
[mk] A make statement (used for creating & initializing channels, maps, etc.).
41+
[new] A new statement (used to create & initialize structure types).
42+
[Cmd-i] '+iota+'
43+
[if] An if statement, properly formatted (Go requires the use of {} on ifs, unlike C; this throws me sometimes).
44+
[sw] A switch statement with an optional expression.
45+
[sel] A select statement, for looping over channel conditions.
46+
[case] A case clause, within a switch or select.
47+
[def] A default clause within a switch.
48+
[for] A for loop.
49+
[fori] A for loop with an index (similar to C for loops).
50+
[forr] A for loop iterating over a collection's full range.
51+
[go] An immediate goroutine call (defines the function inline).
52+
[de] A deferred goroutine call (defines the function inline).
53+
[def] A simple deferred function call (by default supplies '+defer file.Close()+').
54+
[main] A template for a +main()+ function with a tab stop at its body.
55+
[init] A template for a module's +init()+ function, with a tab stop at its body.
56+
[,] A pair ('first, second'), suitable for declaring result variables from a multi-return-value function or a map range loop.
57+
[<] Send/receive through a channel. Provides tab stops for the value and the channel name.
58+
[ret] A return statement with optional return value.
5959

6060
=== Commands
61-
[Cmd-R] Compile and run the current file.
62-
[Cmd-B] Build the current project using gomake.
63-
[Cmd-Opt-B] Build the current project as a package using gomake & gopack.
64-
[Cmd-K] Compile the current file.
65-
[Ctrl-Shift-H] Reformat the document according to the Go style guidelines using gofmt.
66-
[Ctrl-H] Show the Go HTML documentation for the currently-selected symbol.
61+
[Cmd-R] Compile and run the current file.
62+
[Cmd-B] Build the current project using gomake.
63+
[Cmd-Opt-B] Build the current project as a package using gomake & gopack.
64+
[Cmd-K] Compile the current file.
65+
[Ctrl-Shift-H] Reformat the document according to the Go style guidelines using gofmt.
66+
[Ctrl-H] Show the Go HTML documentation for the currently-selected symbol.
6767

6868
=== Thanks
6969
Thanks be to lasersox and Infininight over at the #textmate room on IRC (irc://irc.freenode.net/textmate) for all their help in cleaning up this here bundle, and for helping me to optimize my regex use in the language grammar.

0 commit comments

Comments
 (0)