From da64f7d6c081a7a951b734fa61fa74278b4cda0a Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Thu, 12 Aug 2010 14:09:49 -0700 Subject: [PATCH] updated zshrc to fallback to vi for VISUAL and EDITOR --- .gitignore | 1 + zsh/zshrc | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0824796..4d607bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ zsh/zhistory +zsh/.zcompdump emacs.d/auto-save-list/.saves* .DS_Store diff --git a/zsh/zshrc b/zsh/zshrc index 0100877..5db9651 100755 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -45,9 +45,12 @@ if mac; then } export EDITOR="vim" export VISUAL="vim" -elif linux; then +elif linux && which emacs >/dev/null 2>&1; then export EDITOR="emacs -nw" export VISUAL="emacs" +else + export EDITOR=vi + export VISUAL=vi fi