Skip to content

Commit

Permalink
add fmt.Errorf() snippet in UltiSnips (#1677)
Browse files Browse the repository at this point in the history
* add  fmt.Errorf() snippet in UltiSnips

Use the 'fe' combination to autocomplete the fmt.Errorf(...) in UltiSnips.

* Also add "fe" to neosnippet
  • Loading branch information
dastergon authored and arp242 committed Mar 2, 2018
1 parent a7dd67d commit a9fed32
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gosnippets/UltiSnips/go.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,11 @@ snippet fn "fmt.Println(...)"
fmt.Println("${1:${VISUAL}}")
endsnippet

# Fmt Errorf debug
snippet fe "fmt.Errorf(...)"
fmt.Errorf("${1:${VISUAL}}")
endsnippet

# log printf
snippet lf "log.Printf(...)"
log.Printf("${1:${VISUAL}} = %+v\n", $1)
Expand Down
4 changes: 4 additions & 0 deletions gosnippets/snippets/go.snip
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ abbr fmt.Printf(...)
snippet fn
abbr fmt.Println(...)
fmt.Println("${1}")
# Fmt Errorf
snippet fe
abbr fmt.Errorf(...)
fmt.Errorf("${1}")
# log printf
snippet lf
abbr log.Printf(...)
Expand Down

0 comments on commit a9fed32

Please sign in to comment.