1
0
Fork 0

bashrc: add conditional aliases for [n]vi[m], add alias "e" for the same

This commit is contained in:
Pratham Patel 2024-01-12 18:35:37 +05:30
parent 1962a7410c
commit c2dcbb87aa
Signed by: thefossguy
SSH Key Fingerprint: SHA256:/B3wAg7jnMEBQ2JwkebbS/eXVZANDmqRfnd9QkIhxMI
1 changed files with 11 additions and 1 deletions

12
.bashrc
View File

@ -119,8 +119,18 @@ if command -v batcat > /dev/null; then
fi
if command -v nvim > /dev/null; then
alias vvim="$(command -v vim)"
alias e="$(command -v nvim)"
if command -v vim > /dev/null; then
alias vvim="$(command -v vim)"
else
alias vvim="$(command -v vi)"
fi
alias vim="$(command -v nvim)"
elif command -v vim > /dev/null; then
alias e="$(command -v vim)"
elif command -v vi > /dev/null; then
alias e="$(command -v vi)"
alias vim="$(command -v vi)"
fi
# PS1 setup