I installed a Debian Linux OS today, but found that the default text editor is nano, which I am not familiar with. After searching how to set text editor using google, I got the solution. Two environment variables can be set to specify the default text editor, which are EDITOR and VISUAL. For example,
export EDITOR=vi
export VISUAL=vi
The EDITOR variable is for non-GUI command line mode, while the VISUAL variable is for GUI terminal mode.