summaryrefslogtreecommitdiff
path: root/vim/pack/downloads/opt/snippets
diff options
context:
space:
mode:
authorMarc Coquand <marc@mccd.space>2024-07-13 15:16:54 -0500
committerMarc Coquand <marc@mccd.space>2024-07-13 15:16:54 -0500
commit3ab230400f77116de07f29e2e8536b623cce77bf (patch)
treede6209ede527321877e11cfe46c722700e172839 /vim/pack/downloads/opt/snippets
parent8a0b9593bf671c60cd242874798bd9f43be9e1a3 (diff)
downloadopenbsd-main.tar.gz
openbsd-main.tar.bz2
openbsd-main.zip
Vim updatesHEADmain
Diffstat (limited to '')
-rw-r--r--vim/pack/downloads/opt/snippets/snippets.vim15
1 files changed, 11 insertions, 4 deletions
diff --git a/vim/pack/downloads/opt/snippets/snippets.vim b/vim/pack/downloads/opt/snippets/snippets.vim
index 24d2ce3..92f0af7 100644
--- a/vim/pack/downloads/opt/snippets/snippets.vim
+++ b/vim/pack/downloads/opt/snippets/snippets.vim
@@ -1,17 +1,24 @@
autocmd FileType go
- \ :iabbrev <buffer> err@ if err != nil {}<Left><Enter><Left>
+ \ :iabbrev <buffer> err@ if err != nil {<CR><CR>}<Left><Up><Tab>
autocmd FileType go
- \ :iabbrev <buffer> hand@ <Backspace><Esc>^ifunc <Esc>A(c *gin.Context) {
+ \ :iabbrev <buffer> h@ <Backspace><Esc>^ifunc <Esc>A(c *gin.Context) {<CR><CR>}<Left><Up><Tab>
autocmd FileType go
- \ :iabbrev <buffer> test@ <Backspace><Esc>^ifunc <Esc>A(t *testing.T) {
+ \ :iabbrev <buffer> t@ <Backspace><Esc>^ifunc <Esc>A(t *testing.T) {<CR><CR>}<Left><Up><Tab>
+
+autocmd FileType go
+ \ :iabbrev <buffer> f@ <Backspace><Esc>^ifunc <Esc>A() {<CR><CR>}<Esc><Up><Up>f(li
autocmd FileType go
\ :iabbrev <buffer> fat@ log.Fatal(" %v", err)<Esc>F%i<Left>
-:autocmd FileType php,html.twig,html,javascript,typescript,vue,go
+:autocmd FileType go
+ \ :iabbrev <buffer> if@ if {<CR><CR>}<Esc>%<Left>i
+
+
+:autocmd FileType php,html.twig,html,javascript,typescript,vue
\ :iabbrev <buffer> if@ if() {<CR>}<Esc>%<Left><Left>i