Why does vi display command terminated?

Asked by cmnorton

I am trying to figure out why the following is happening.

I launch a database admin tool in an x-term. This product lets me write SQL scripts in an editor. When I choose vi as the editor. I get this message:

Command terminated
Press ENTER or type command to continue

When I press Enter, I get the full vi screen, and I can proceed with my task.

This behavior does not occur on Red Hat/rpm based systems. I am trying to figure out how to avoid this problem. BTW, emacs does not have this problem.

Any pointers or ideas would be very much appreciated.
Thank you.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
cmnorton
Solved:
Last query:
Last reply:
Revision history for this message
Randy LeJeune (lejeunerandy-fastmail) said :
#1

What database admin tool are you using?

Revision history for this message
cmnorton (octopusgrabbus) said :
#2

Informix's dbaccess. This does not happen on the X-term command line.

Revision history for this message
Randy LeJeune (lejeunerandy-fastmail) said :
#3

Try to set the environment variable DBEDITOR=vi and dbaccess and tell me if that helps. This should run vi without promtping you.

Revision history for this message
cmnorton (octopusgrabbus) said :
#4

Thank you, but this did not solve the problem. I just checked.

Revision history for this message
Randy LeJeune (lejeunerandy-fastmail) said :
#5

Sorry, the docs say the environment variable is DBEDIT not DBEDITOR, so try adding:

export DBEDIT=vi

to your .bachrc file and see if that helps.

The docs are here: http://www.dbcenter.cise.ufl.edu/triggerman/InfoShelf/sqlr/03.fm7.html but the example they give is for the tcsh shell. Let me know if this doesn't work.

Revision history for this message
cmnorton (octopusgrabbus) said :
#6

Thanks for the additional information. I tried export DBEDIT=vi. This still did not work.

Revision history for this message
Randy LeJeune (lejeunerandy-fastmail) said :
#7

Sorry tof the late reply. It seems the DBEDIT command only works wwhen you are accessing the machine using Exceed. Setting the default editor by export EDITOR=vi is the only other thing that I can think of.

Revision history for this message
cmnorton (octopusgrabbus) said :
#8

This turned out to be the version of VIM. I'm better off with the minimal version of it, because there are other curses-related problems with the full version.