From a714fb6097aa86bcd16bc2ffa6b05b641591c0e4 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sat, 14 Jul 2018 14:20:30 +0200 Subject: [PATCH] vim: xptemplate: add more go snippets --- vim/vim/ftplugin/go/go.xpt.vim | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/vim/vim/ftplugin/go/go.xpt.vim b/vim/vim/ftplugin/go/go.xpt.vim index b3af56c..50d8e69 100644 --- a/vim/vim/ftplugin/go/go.xpt.vim +++ b/vim/vim/ftplugin/go/go.xpt.vim @@ -59,14 +59,28 @@ func main() { `cursor^ } +XPT ie "if err != nil { ... } +if err != nil { + `cursor^ +} XPT ier " if err != nil { return err } if err != nil { return ``ret?`, ^err } `cursor^ - XPT iel " if err != nil { log.Fatal\(err) } if err != nil { log.Fatal(err) } `cursor^ + + +XPT p +fmt.Println(`cursor^) +XPT pf +fmt.Printf(`cursor^) + +XPT l +log.Print(`cursor^) +XPT lf +log.Printf(`cursor^) -- 2.45.2