dotfiles/vim/after/ftplugin/go.vim

12 lines
372 B
VimL

map <Leader>gb :GoBuild<CR>
map <Leader>i :GoImplements<CR>
map <Leader>^ :GoAlternate<CR>
map <Leader>d :GoDoc<CR>
iabbrev fmtpl fmt.Println("")<esc>hi
iabbrev fmtpf fmt.Printf("\n")<esc>3hi
iabbrev mk make([]MyType, 0)<esc>9h
iabbrev wr w http.ResponseWriter, r *http.Request
iabbrev fttt <ESC>ccfunc TestSomething(t *testing.T) {<cr>}<esc>k9l
iabbrev ttt t *testing.T