define ur editor at os level.

ie, EDITOR=vi;export EDITOR

then it should work.