Automatically call nvim with vim command if installed
This commit is contained in:
parent
f4b0d38148
commit
25d4f1df54
2 changed files with 7 additions and 1 deletions
|
@ -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"
|
||||||
|
|
4
.config/zsh/6-nvim-to-vim-if-installed
Normal file
4
.config/zsh/6-nvim-to-vim-if-installed
Normal 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
|
Loading…
Reference in a new issue