change vim as default editor

 add the following to your shell configuration (probably `~/.bashrc`):

    export VISUAL=vim
    export EDITOR="$VISUAL"

or

sudo update-alternatives --config editor

link:  https://unix.stackexchange.com/questions/73484/how-can-i-set-vi-as-my-default-editor-in-unix