diff --git a/commonsh/10_alias b/commonsh/10_alias index 3035b4e..83bd181 100755 --- a/commonsh/10_alias +++ b/commonsh/10_alias @@ -9,7 +9,7 @@ for dircolors in gdircolors dircolors ; do done # gimmie an editor, make it a nice vi clone -for EDITOR in vim elvis vile nvi vi ; do +for EDITOR in vimx vim elvis vile nvi vi ; do ( command -v $EDITOR >/dev/null 2>&1 ) && break done export EDITOR @@ -18,6 +18,11 @@ export EDITOR FCEDIT=$EDITOR export FCEDIT +# vimx -> vim +if [ "${EDITOR}" = vimx ] ; then + alias vim=vimx +fi + # aliases alias cd..='cd ..' diff --git a/vimrc b/vimrc index 2671363..89cae40 100644 --- a/vimrc +++ b/vimrc @@ -249,10 +249,12 @@ map Y y$ vmap K k " :W and :Q are annoying -command! -nargs=0 -bang Q q -command! -nargs=0 -bang W w -command! -nargs=0 -bang WQ wq -command! -nargs=0 -bang Wq wq +if has('user_commands') + command! -nargs=0 -bang Q q + command! -nargs=0 -bang W w + command! -nargs=0 -bang WQ wq + command! -nargs=0 -bang Wq wq +endif " just continue nmap K K diff --git a/zsh/bindkey b/zsh/bindkey index d2933d9..7edaea5 100755 --- a/zsh/bindkey +++ b/zsh/bindkey @@ -41,8 +41,6 @@ case $TERM in bindkey '\e[1~' beginning-of-line bindkey '\e[4~' end-of-line bindkey '\e[3~' delete-char - bindkey '\eOC' emacs-forward-word - bindkey '\eOD' emacs-backward-word ;; *rxvt*|Eterm|aterm) bindkey '\e[c' emacs-forward-word