Set editor to VIM. Bind edit command for shells.
--- a/.bashrc Sun Aug 14 22:15:22 2011 +0300
+++ b/.bashrc Sun Aug 14 22:18:39 2011 +0300
@@ -5,7 +5,7 @@
[ -d ~/usr/bin ] && export PATH="$PATH":~/usr/bin || :
# XXX for mc, cvs, svn, ...
-# export EDITOR=vim
+export EDITOR=vim
# XXX vim and gnome-terminal have support for 256 colours in fedora 8 at least
# Note debian/ubuntu users should install the ncurses-term package to support this
@@ -145,6 +145,7 @@
set -o emacs
bind '"\e/": dabbrev-expand'
+bind '"\ee": edit-and-execute-command'
################################################################
# Completion.
--- a/.zshrc Sun Aug 14 22:15:22 2011 +0300
+++ b/.zshrc Sun Aug 14 22:18:39 2011 +0300
@@ -1,3 +1,5 @@
+
+EDITOR=vim
HISTFILE=~/.histfile
HISTSIZE=1000
@@ -10,6 +12,10 @@
setopt hist_ignore_space
setopt hist_no_functions
+autoload -U edit-command-line
+zle -N edit-command-line
+bindkey '\ee' edit-command-line
+
# Emacs like editing.
bindkey -e