vim9script compiler go setl shiftwidth=0 setl noexpandtab setl formatprg=gofmt if executable("goimports") # go install golang.org/x/tools/cmd/goimports@latest command! -buffer Fmt :%!goimports else command! -buffer Fmt :%!gofmt endif nnoremap :botright term ++rows=10 go run % import autoload 'popup.vim' def PopupHelp(symbol: string) popup.ShowAtCursor(systemlist("go doc " .. symbol)) enddef nnoremap K PopupHelp(expand("")) xnoremap K yPopupHelp(getreg('"'))