From 7420370db487426412191688db6155b7e5c3c7c0 Mon Sep 17 00:00:00 2001 From: Faerbit Date: Tue, 17 Nov 2015 12:23:53 +0100 Subject: [PATCH] Improving v alias. --- zshrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 5371b8f..5421ab9 100644 --- a/zshrc +++ b/zshrc @@ -45,7 +45,12 @@ alias poweroff='sudo poweroff' alias reboot='sudo reboot' alias n='ninja' alias cmake='cmake -G Ninja' -alias v='vim' +if test -f $(which nvim) +then + alias v='nvim' +else + alias v='vim' +fi if [ -f .zsh_environment ] then source ~/.zsh_environment