diff options
author | Marc Coquand <marc@mccd.space> | 2024-07-15 12:25:11 -0500 |
---|---|---|
committer | Marc Coquand <marc@mccd.space> | 2024-07-15 12:25:11 -0500 |
commit | 63cfb9a8f5a0c9f1b9c433a0a535be309b268ea5 (patch) | |
tree | 51d148d4b8cec48794f71959c8632ed60273e8f3 /vim/pack/downloads | |
parent | 9053e1033e69f71389cc24196c6c588f8c35a683 (diff) | |
download | bsd-63cfb9a8f5a0c9f1b9c433a0a535be309b268ea5.tar.gz bsd-63cfb9a8f5a0c9f1b9c433a0a535be309b268ea5.tar.bz2 bsd-63cfb9a8f5a0c9f1b9c433a0a535be309b268ea5.zip |
vim: updates
Diffstat (limited to 'vim/pack/downloads')
-rw-r--r-- | vim/pack/downloads/opt/snippets/snippets.vim | 16 |
1 files changed, 13 insertions, 3 deletions
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 <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> 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 |