Always use nvim for vimdebug command

This commit is contained in:
Kenneth Benzie 2022-11-06 22:05:49 +00:00
parent a81465daad
commit 02abb0960c

View File

@ -7,7 +7,6 @@ alias build="build-dir --build"
# Detect installed debugger and set the `debug` alias to debug a program with # Detect installed debugger and set the `debug` alias to debug a program with
# command line arguments. # command line arguments.
if [ `uname` = Linux ]; then if [ `uname` = Linux ]; then
if [[ "`vim --version|head -1|cut -c 19-21`" =~ "^8\.[123456789]$" ]]; then
autoload -U regexp-replace autoload -U regexp-replace
function vimdebug() { function vimdebug() {
# For each item in $* replace * and \* and then replace \ with \\ # For each item in $* replace * and \* and then replace \ with \\
@ -16,12 +15,9 @@ if [ `uname` = Linux ]; then
regexp-replace arg '\*' '\\*' regexp-replace arg '\*' '\\*'
args+=($arg) args+=($arg)
done done
vim "+packadd termdebug" "+TermdebugCommand $args" nvim "+packadd termdebug" "+TermdebugCommand $args"
} }
alias debug='vimdebug' if which gdb &> /dev/null; then
elif which cgdb &> /dev/null; then
alias debug='cgdb --args'
elif which gdb &> /dev/null; then
alias debug='gdb --args' alias debug='gdb --args'
fi fi
elif [ `uname` = Darwin ]; then elif [ `uname` = Darwin ]; then