just use vim or vi for EDITOR and VISUAL

This commit is contained in:
Sami Samhuri 2012-04-28 09:10:29 -07:00
parent a403a83334
commit 5a01029d03

View file

@ -53,29 +53,12 @@ if [[ -d /usr/local/lib/python ]]; then
export PYTHONPATH="/usr/local/lib/python"
fi
# default editors
if mac; then
# wtf, you must be kidding, doesn't even work in many cases. really fucking lame!
function emacsclient() {
/Users/sjs/Applications/Emacs.app/Contents/MacOS/bin/emacsclient -s $(find /var/folders -name server -type s -uid $(id -u) 2>| /dev/null | grep emacs) $*
}
if command_exists vim; then
export EDITOR="vim"
if command_exists mate; then
export EDITOR="mate -w"
export VISUAL="mate -w"
else
export VISUAL="vim"
fi
elif linux && command_exists emacs; then
export EDITOR="emacs -nw"
export VISUAL="emacs"
else
export EDITOR=vi
export VISUAL=vi
fi
if command_exists rmate; then
export RMATE_HOST="h.samhuri.net"
export EDITOR="vi"
export VISUAL="vi"
fi