~~ guess you are looking for live code reloading like this ~~
~~ https://github.com/codegangsta/gin ~~
1 if you are looking to debug without exiting vim then:
:new | 0read ! dlv debug #
will do.
2 if you are looking to load the dlv mode constantly you can probably use tmux with split-pane. With one pane having vim and your file open and the other running dlv. When you change your file in vim(in a pane) delve(in the companion pane) reloads this file for debugging.
3 if you just want to run debug at the time of saving the file, prefix the first command with autocmd BufWritePre Filetype go
and add that to your virmc
.
If you are looking for some command that rebuilds your executable each time you make a change, I think you are in the wrong place, debugging is not meant to rebuild the executable. After you are done debugging, you can check your application and run the command(some variation of go build
or some wrapper that calls it). To build your executable.