Skip to content

Commit

Permalink
Refactor variable snippets
Browse files Browse the repository at this point in the history
* "v" is for shorthand variable declaration
* "vr" is for variable initialization
* "var" is for longhand variable declaration
* "vars" is for multiple variable declarations
  • Loading branch information
Simeon F. Willbanks committed Oct 27, 2013
1 parent deffc63 commit 54ca21a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion snippets/go.snippets
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
# variables
# shorthand variable declaration
snippet v
${1} := ${2}
# variable initialization
snippet vr
var ${1:t} ${0:string}
# variable declaration
snippet var
var ${1} ${2} = ${3}
# variables declaration
snippet vars
var (
${1} ${2} = ${3}
)
# append
snippet ap
append(${1:slice}, ${0:value})
Expand Down

0 comments on commit 54ca21a

Please sign in to comment.