From 63cfb9a8f5a0c9f1b9c433a0a535be309b268ea5 Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Mon, 15 Jul 2024 12:25:11 -0500 Subject: vim: updates --- vim/pack/downloads/opt/snippets/snippets.vim | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'vim/pack/downloads') diff --git a/vim/pack/downloads/opt/snippets/snippets.vim b/vim/pack/downloads/opt/snippets/snippets.vim index d4c6e4e..92f0af7 100644 --- a/vim/pack/downloads/opt/snippets/snippets.vim +++ b/vim/pack/downloads/opt/snippets/snippets.vim @@ -1,14 +1,24 @@ autocmd FileType go - \ :iabbrev err@ if err != nil {} + \ :iabbrev err@ if err != nil {} autocmd FileType go - \ :iabbrev hand@ ^ifunc A(c *gin.Context) { + \ :iabbrev h@ ^ifunc A(c *gin.Context) {} + +autocmd FileType go + \ :iabbrev t@ ^ifunc A(t *testing.T) {} + +autocmd FileType go + \ :iabbrev f@ ^ifunc A() {}f(li autocmd FileType go \ :iabbrev fat@ log.Fatal(" %v", err)F%i -:autocmd FileType php,html.twig,html,javascript,typescript,vue,go +:autocmd FileType go + \ :iabbrev if@ if {}%i + + +:autocmd FileType php,html.twig,html,javascript,typescript,vue \ :iabbrev if@ if() {}%i -- cgit v1.2.3