From b992f9251663c627e59b0ea9bb9efa4e2be21138 Mon Sep 17 00:00:00 2001 From: Von Random Date: Wed, 4 Jul 2018 20:01:34 +0300 Subject: [PATCH] fix vim alias --- zshrc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/zshrc b/zshrc index a856b52..0c40983 100644 --- a/zshrc +++ b/zshrc @@ -153,7 +153,6 @@ alias rgrep='command grep --exclude-dir=\.git -R' alias ggrep='command git grep' alias tailf='command less -R +F' alias diff='command diff --color' -alias vi='command vim' # ls alias ls='command ls --color=auto --group-directories-first ' @@ -174,6 +173,10 @@ alias atmux='command tmux -2 attach' # screen alias rscreen='command screen -Dr' alias scr='command screen sudo -Es' + +# neovim over vim +[[ -x $(whence nvim) ]] && alias vim='command nvim' +alias vi='vim' # }}} # {{{ plugins # colors @@ -239,10 +242,4 @@ s() { tempterm=${TERM%%-256color} TERM=${TERMS[$tempterm]-$tempterm} $ssh "$@" } -# prefer neovim over vim -vim() { - local vim - vim=$(whence nvim) || vim=$(whence vim) - $vim "$@" -} # }}}