Set your favorite CLI text editor in Linux

vi/vim

export EDITOR=$(which vim)
export VISUAL=$(which vim)
nano
export EDITOR=$(which nano)
export VISUAL=$(which nano)
You can add this in your .bashrc file to make changes permanent

The EDITOR editor should be able to work without use of "advanced" terminal functionality (like old ed or ex mode of vi). It was used on teletype terminals.
A VISUAL editor could be a full screen editor as vi or emacs.