Use the envrionement variable EDITOR if it's defined.