Further vim updates

This commit is contained in:
Rob Watson 2021-01-27 15:32:26 +01:00
parent 6c2765d3d5
commit 06837b9c10
2 changed files with 14 additions and 1 deletions

11
vim/after/ftplugin/go.vim Normal file
View File

@ -0,0 +1,11 @@
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

4
vimrc
View File

@ -92,7 +92,9 @@ nnoremap <Leader>0 `[v`]
map <leader>m :marks<cr> map <leader>m :marks<cr>
map <leader>R :registers<cr> map <leader>R :registers<cr>
map <leader>v :vsplit<cr> map <leader>v :vsplit<cr>
map <leader>h :split<cr>file browser map <leader>s :split<cr>
map <leader>gv <esc>:vsplit<bar>:GoAlternate<cr>
map <leader>gs <esc>:split<bar>:GoAlternate<cr>
map <leader>! <esc>:only<cr> map <leader>! <esc>:only<cr>
" ctrl-c to unload a buffer " ctrl-c to unload a buffer
nnoremap <silent> <c-q> :bp\|bd #<cr> nnoremap <silent> <c-q> :bp\|bd #<cr>