Can't exit out of afiedt.buf

13,233

Solution 1

You can configure vi as SQLPlus editor with the statement DEFINE _EDITOR=vi (see the SQL*Plus User's Guide and Reference).

If you get back just a ? you are probably using the old ed editor which you can quit by entering the q command (see its guide with man ed).

Solution 2

To come out of sqlplus when any text editor 'vi' or notepad is not configured is by pressing Shift + q and Enter, you will be back into SQL> prompt.

Once you have come out of blank/stuck session back to SQL prompt, you can follow above mentioned suggestions to define an editor.

Try and enjoy!

Share:
13,233
sowens
Author by

sowens

Updated on June 18, 2022

Comments

  • sowens
    sowens almost 2 years

    This is a very simple question that I can't find the answer to. I am in sqlplus (Oracle) and I made a typo and typed "edit" which opens up "afiedt.buf" which I understand will open my default editor which is "vi". Once I am in the editor I get "Wrote file afiedt.buf". Then I would like to see what the contents of the file is. When I type anything, I get a "?". Once I get the "?" I can not ctrl c, ctrl z or anything to get out. How can I exit out and see the contents of the file. I also tried "wq" and "!q". Neither of these commands worked. I would like to be able to edit the file once I have made an error and not type it over. Any help would be appreciated.