From 06837b9c10fa362df952a992cb6792446e38faba Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Wed, 27 Jan 2021 15:32:26 +0100 Subject: [PATCH] Further vim updates --- vim/after/ftplugin/go.vim | 11 +++++++++++ vimrc | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 vim/after/ftplugin/go.vim diff --git a/vim/after/ftplugin/go.vim b/vim/after/ftplugin/go.vim new file mode 100644 index 0000000..4e41434 --- /dev/null +++ b/vim/after/ftplugin/go.vim @@ -0,0 +1,11 @@ +map gb :GoBuild +map i :GoImplements +map ^ :GoAlternate +map d :GoDoc + +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 fttt ccfunc TestSomething(t *testing.T) {}k9l +iabbrev ttt t *testing.T diff --git a/vimrc b/vimrc index 9406289..87538f5 100644 --- a/vimrc +++ b/vimrc @@ -92,7 +92,9 @@ nnoremap 0 `[v`] map m :marks map R :registers map v :vsplit -map h :splitfile browser +map s :split +map gv :vsplit:GoAlternate +map gs :split:GoAlternate map ! :only " ctrl-c to unload a buffer nnoremap :bp\|bd #