From 02abb0960c54bbe9ba45ff1ecd5c32e1ddb5e823 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Sun, 6 Nov 2022 22:05:49 +0000 Subject: [PATCH] Always use nvim for vimdebug command --- build/build.plugin.zsh | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/build/build.plugin.zsh b/build/build.plugin.zsh index 4abb0cd..a6bcda8 100644 --- a/build/build.plugin.zsh +++ b/build/build.plugin.zsh @@ -7,21 +7,17 @@ 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 [[ "`vim --version|head -1|cut -c 19-21`" =~ "^8\.[123456789]$" ]]; then - autoload -U regexp-replace - function vimdebug() { - # For each item in $* replace * and \* and then replace \ with \\ - local args=() - for arg in "$@"; do - regexp-replace arg '\*' '\\*' - args+=($arg) - done - vim "+packadd termdebug" "+TermdebugCommand $args" - } - alias debug='vimdebug' - elif which cgdb &> /dev/null; then - alias debug='cgdb --args' - elif which gdb &> /dev/null; then + autoload -U regexp-replace + function vimdebug() { + # For each item in $* replace * and \* and then replace \ with \\ + local args=() + for arg in "$@"; do + regexp-replace arg '\*' '\\*' + args+=($arg) + done + nvim "+packadd termdebug" "+TermdebugCommand $args" + } + if which gdb &> /dev/null; then alias debug='gdb --args' fi elif [ `uname` = Darwin ]; then