From 3f49b0af6e186b533a54b2c7d694a639dae93993 Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Thu, 9 Jun 2022 05:49:33 +0200 Subject: [PATCH] go.vim: update iabbrevs --- vim/after/ftplugin/go.vim | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/vim/after/ftplugin/go.vim b/vim/after/ftplugin/go.vim index 70fff07..b1b6f26 100644 --- a/vim/after/ftplugin/go.vim +++ b/vim/after/ftplugin/go.vim @@ -51,10 +51,8 @@ let g:go_statusline_duration = 1000 autocmd BufNewFile,BufRead *.go nmap g6 :GoAlternate! -iabbrev fmtpl fmt.Println("")hi -iabbrev fmtpf fmt.Printf("\n")3hi iabbrev mk make([]MyType, 0)9h -iabbrev wr w http.ResponseWriter, r *http.Request +iabbrev wr w http.ResponseWriter, r *http.Request=Eatchar('\s') iabbrev ttt t *testing.T iabbrev errP ccif err != nil {panic(err)} iabbrev errl ccif err != nil {log.Println(err)} @@ -62,10 +60,10 @@ iabbrev errf ccif err != nil {log.Fatal(err)} iabbrev errp ccif err != nil {fmt.Println(err)} iabbrev errr ccif err != nil {return err} iabbrev defr ccdefer func() {}()ki -iabbrev logd log.Debug().Msg(" -iabbrev logi log.Info().Msg(" -iabbrev loge log.Error().Msg(" -iabbrev logf log.Fatal().Msg(" +iabbrev fmtpf log.Printf("")hi=Eatchar('\s') +iabbrev fmtpl log.Println("")hi=Eatchar('\s') +iabbrev logpf log.Printf("")hi=Eatchar('\s') +iabbrev logpl log.Println("")hi=Eatchar('\s') iabbrev ctxcc ctx context.Context iabbrev err! err != nil {}kcc=Eatchar('\s') iabbrev ior io.Reader @@ -74,3 +72,4 @@ iabbrev gof go func() {}()kcc=Eatchar('\s') iabbrev fortc for _, tc := range testCases {t.Run(tc.name, func(t *testing.T) {})}kkcc=Eatchar('\s') iabbrev mapss map[string]string iabbrev mapsi map[string]int +iabbrev mapsa map[string]any