SQL> editwrote file afiedt. buf40
As shown in the preceding figure,
After setting VI as the default editor, there is no problem:
SQL> SET _ editor = vi
SQL> ed
However, in this case, the settings are only session settings, which will expire after re-login. If you want to save the configuration, you can save the editor settings to the configuration file and use the configuration automatically each time.
modify $ ORACLE_HOME/sqlplus/admin/glogin. in the SQL configuration file, add DEFINE _ editor = VI. When sqlplus is started, it reads glogin. SQL script.
in Linux sqlplus, if you use Edit to edit the current script, the default editor Ed is called, if you want to use VI as the default editor, you can edit the file $ ORACLE_HOME/sqlplus/admin/glogin. SQL, add the following line
DEFINE _ editor = VI
after restarting sqlplus, when you run the edit command, VI is called as the editor. When sqlplus is started, $ ORACLE_HOME/sqlplus/admin/glogin is run first. SQL, so we can also set other variables in this file