go.vim: update iabbrevs
This commit is contained in:
parent
86644d6d69
commit
3f49b0af6e
|
@ -51,10 +51,8 @@ let g:go_statusline_duration = 1000
|
||||||
|
|
||||||
autocmd BufNewFile,BufRead *.go nmap <silent> <leader>g6 :GoAlternate!<cr>
|
autocmd BufNewFile,BufRead *.go nmap <silent> <leader>g6 :GoAlternate!<cr>
|
||||||
|
|
||||||
iabbrev fmtpl fmt.Println("")<esc>hi
|
|
||||||
iabbrev fmtpf fmt.Printf("\n")<esc>3hi
|
|
||||||
iabbrev mk make([]MyType, 0)<esc>9h
|
iabbrev mk make([]MyType, 0)<esc>9h
|
||||||
iabbrev wr w http.ResponseWriter, r *http.Request
|
iabbrev wr w http.ResponseWriter, r *http.Request<c-r>=Eatchar('\s')<cr>
|
||||||
iabbrev ttt t *testing.T
|
iabbrev ttt t *testing.T
|
||||||
iabbrev errP <esc>ccif err != nil {<cr>panic(err)<cr>}
|
iabbrev errP <esc>ccif err != nil {<cr>panic(err)<cr>}
|
||||||
iabbrev errl <esc>ccif err != nil {<cr>log.Println(err)<cr>}
|
iabbrev errl <esc>ccif err != nil {<cr>log.Println(err)<cr>}
|
||||||
|
@ -62,10 +60,10 @@ iabbrev errf <esc>ccif err != nil {<cr>log.Fatal(err)<cr>}
|
||||||
iabbrev errp <esc>ccif err != nil {<cr>fmt.Println(err)<cr>}
|
iabbrev errp <esc>ccif err != nil {<cr>fmt.Println(err)<cr>}
|
||||||
iabbrev errr <esc>ccif err != nil {<cr>return err<cr>}
|
iabbrev errr <esc>ccif err != nil {<cr>return err<cr>}
|
||||||
iabbrev defr <esc>ccdefer func() {<cr><cr>}()<esc>ki
|
iabbrev defr <esc>ccdefer func() {<cr><cr>}()<esc>ki
|
||||||
iabbrev logd log.Debug().Msg("
|
iabbrev fmtpf log.Printf("")<esc>hi<c-r>=Eatchar('\s')<cr>
|
||||||
iabbrev logi log.Info().Msg("
|
iabbrev fmtpl log.Println("")<esc>hi<c-r>=Eatchar('\s')<cr>
|
||||||
iabbrev loge log.Error().Msg("
|
iabbrev logpf log.Printf("")<esc>hi<c-r>=Eatchar('\s')<cr>
|
||||||
iabbrev logf log.Fatal().Msg("
|
iabbrev logpl log.Println("")<esc>hi<c-r>=Eatchar('\s')<cr>
|
||||||
iabbrev ctxcc ctx context.Context
|
iabbrev ctxcc ctx context.Context
|
||||||
iabbrev err! err != nil {<cr><cr>}<esc>kcc<c-r>=Eatchar('\s')<cr>
|
iabbrev err! err != nil {<cr><cr>}<esc>kcc<c-r>=Eatchar('\s')<cr>
|
||||||
iabbrev ior io.Reader
|
iabbrev ior io.Reader
|
||||||
|
@ -74,3 +72,4 @@ iabbrev gof go func() {<cr><cr>}()<esc>kcc<c-r>=Eatchar('\s')<cr>
|
||||||
iabbrev fortc for _, tc := range testCases {<cr>t.Run(tc.name, func(t *testing.T) {<cr><cr>})<cr>}<esc>kkcc<c-r>=Eatchar('\s')<cr>
|
iabbrev fortc for _, tc := range testCases {<cr>t.Run(tc.name, func(t *testing.T) {<cr><cr>})<cr>}<esc>kkcc<c-r>=Eatchar('\s')<cr>
|
||||||
iabbrev mapss map[string]string
|
iabbrev mapss map[string]string
|
||||||
iabbrev mapsi map[string]int
|
iabbrev mapsi map[string]int
|
||||||
|
iabbrev mapsa map[string]any
|
||||||
|
|
Loading…
Reference in New Issue