The EDIT Command
You don't like line-editing? SQL*Plus does not have a built-in full-screen editor, but it does have the EDIT command. The SQL*Plus EDIT command allows you to invoke the text editor of your choice to use in editing SQL statements and PL/SQL blocks.
Choosing Your Editor
Although you issue the EDIT command, SQL*Plus invokes the editor
named in a SQL*Plus user variable named _EDITOR. You can view the current editor
choice by issuing the command DEFINE
_EDITOR, as follows:
SQL> DEFINE _EDITOR
DEFINE _EDITOR = "ed" (CHAR)If you don't like the default choice (and I'm reasonably certain you won't), you can change the editor, but only for the duration of your current session, using another variation of the DEFINE command:
DEFINE _editor = "vi"
Now, SQL*Plus will invoke the vi editor in response to the EDIT command.
If you're using the Windows version of SQL*Plus, you can change
the value of EDITOR from the GUI,
using Edit → EditorDefine
→ Editor, as shown in
Figures Figure 2-6 and
Figure 2-7. The default
editor choice under Windows is Notepad.

Figure 2-6. The Define Editor menu option

Figure 2-7. Specifying the executable to invoke in response to the EDIT command
To make an editor choice permanent, you can place a DEFINE _EDITOR command in either your global or local login file. SQL*Plus ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access