aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJagua <jagualitol@gmail.com>2019-03-07 00:45:08 +0900
committerJagua <jagualitol@gmail.com>2019-03-07 00:45:08 +0900
commit9398eed651172bd681ff47b1695288e54dd4ed89 (patch)
treeb68c9ec4cd00e43cd52ca01ff829aa8652f8e05d
parentb597d858785e933b00e1abc0f004be58cab24520 (diff)
downloadvim-sonictemplate-9398eed651172bd681ff47b1695288e54dd4ed89.tar.gz
vim-sonictemplate-9398eed651172bd681ff47b1695288e54dd4ed89.tar.bz2
vim-sonictemplate-9398eed651172bd681ff47b1695288e54dd4ed89.zip
Add some postfix patterns in Go
-rw-r--r--template/go/pattern.stpl33
1 files changed, 33 insertions, 0 deletions
diff --git a/template/go/pattern.stpl b/template/go/pattern.stpl
index db46c5d..1fe0989 100644
--- a/template/go/pattern.stpl
+++ b/template/go/pattern.stpl
@@ -23,3 +23,36 @@
\(\S\+\)\.query$
{{$1}}.Query("{{_cursor_}}")
+
+\(\S.*\)\.pr\%[int]$
+ fmt.Print({{$1}})
+ {{_cursor_}}
+
+\(\S.*\)\.pr\%[int]f$
+ fmt.Printf({{$1}})
+ {{_cursor_}}
+
+\(\S.*\)\.pr\%[int]l\%[n]$
+ fmt.Println({{$1}})
+ {{_cursor_}}
+
+\(\S.*\)\.fpr\%[int]$
+ fmt.Fprint({{$1}})
+ {{_cursor_}}
+
+\(\S.*\)\.fpr\%[int]f$
+ fmt.Fprintf({{$1}})
+ {{_cursor_}}
+
+\(\S.*\)\.fpr\%[int]l\%[n]$
+ fmt.Fprintln({{$1}})
+ {{_cursor_}}
+
+\(\S.*\)\.spr\%[int]$
+ {{_cursor_}} fmt.Sprint({{$1}})
+
+\(\S.*\)\.spr\%[int]f$
+ {{_cursor_}} fmt.Sprintf({{$1}})
+
+\(\S.*\)\.spr\%[int]l\%[n]$
+ {{_cursor_}} fmt.Sprintln({{$1}})