Permalink
Browse files

default editor to vim

  • Loading branch information...
1 parent e404add commit deb671478c99bca69a4b1b903891b4763e9a8b4c @weikinhuang committed Mar 7, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 .bashrc
View
@@ -69,6 +69,9 @@ unset file
# include utility settings file (git PS1, solarized, mysql, etc...)
[[ -r "${HOME}/.dotenv/.utility" ]] && source "${HOME}/.dotenv/.utility"
+# set $EDITOR to vi(m) if not already set
+[[ -z $EDITOR ]] && EDITOR=$(type vim &> /dev/null && echo vim || echo vi)
+
# write to .bash_history after each command
__push_prompt_command 'history -a'

0 comments on commit deb6714

Please sign in to comment.