diff --git a/build/build.plugin.zsh b/build/build.plugin.zsh index 86e4e46..f2487da 100644 --- a/build/build.plugin.zsh +++ b/build/build.plugin.zsh @@ -7,7 +7,10 @@ alias build="build-dir --build" # Detect installed debugger and set the `debug` alias to debug a program with # command line arguments. if [ `uname` = Linux ]; then - if which cgdb &> /dev/null; then + if [[ "`vim --version`" =~ "^VIM - Vi IMproved 8\.1.*$" ]]; then + function vimdebug() { vim "+packadd termdebug" "+TermdebugCommand $*" } + alias debug='vimdebug' + elif which cgdb &> /dev/null; then alias debug='cgdb --args' elif which gdb &> /dev/null; then alias debug='gdb --args'