Automatically call nvim with vim command if installed

This commit is contained in:
Marty Oehme 2019-02-26 10:31:40 +01:00
parent f4b0d38148
commit 25d4f1df54
2 changed files with 7 additions and 1 deletions

View file

@ -8,7 +8,7 @@ if [[ "$(uname -s)" == "Linux" ]]; then
fi fi
# Show the top 5 commands used in recent history # Show the top 5 commands used in recent history
alias historysummary="history | awk '{a[\$2]++} END{for(i in a){printf \"%5d\t%s\n\",a[i],i}}' | sort -rn | head" alias zhtop="history | awk '{a[\$2]++} END{for(i in a){printf \"%5d\t%s\n\",a[i],i}}' | sort -rn | head"
# Display timestamped recent command history # Display timestamped recent command history
alias zh="fc -l -d -D" alias zh="fc -l -d -D"
@ -20,3 +20,5 @@ alias ..="cd .." # overwritten by enhancd config in .zshrc.d/
alias ...="cd ../.." alias ...="cd ../.."
alias ~="cd ~" alias ~="cd ~"
# make v call vim
alias v="vim"

View file

@ -0,0 +1,4 @@
#!/bin/sh
# Check for existence of nvim command. If found, substitute vim with it.
type nvim >/dev/null 2>&1 && alias vim=nvim