Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: VI in SQLPLUS: still the same mess.
On Mon, 23 Jan 2006 17:03:43 +0100, Matthias Hoys wrote:
> I don't think this is what the OP wants - he wants the vi commands available
> from the sql*plus commandline, to be able to scroll back/forward in the list
> of executed commands (like with the keyboard arrows in Windows sql*plus).
> Vigi98 this is what you want, no ?
>
I agree.
It was early when I answered, I was grumpy (still am since coffee's not kicked in yet), and was deliberately being obtuse, as OP did not provide the environment. (Which seems to be a growing epidemic - again.)
Of course, to answer the OP's question, there are a number of ways, but some are OS dependent. Howard has shown a beauty at dizwell.com, but (iirc) it's for command-line Sqlplus in Windows.
And, of course, there is the little known (and very limited) native editor. I'm always amused at the reaction ("I didn't know you could do that") when I correct my sql directly like
pop2_at_fuzzy:~> sqlplus hr/hr
SQL*Plus: Release 10.2.0.1.0 - Beta on Mon Jan 23 09:26:35 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Beta
SQL> select usernm
2 from user_objects
3
SQL> i
3 wherte object_name like 'C%'
4
SQL> 1
1* select usernm
SQL> c/nm/name, object_name
1* select username, object_name
SQL> l
1 select username, object_name
2 from user_objects
3* wherte object_name like 'C%'
SQL> c/rt/r
3* where object_name like 'C%'
SQL> l
1 select username, object_name
2 from user_objects
3* where object_name like 'C%'
SQL> c/username
1* select , object_name
SQL> c/,
1* select object_name
SQL> l
1 select object_name
2 from user_objects
3* where object_name like 'C%'
SQL> /
OBJECT_NAME
Then there are tips like http://vim.sourceforge.net/tips/tip.php?tip_id=41
And iSQLPlus.
And, of course, Raptor - which pretty much nullifies the question entirely. I can't wait until it's production.
-- Hans Forbrich Canada-wide Oracle training and consulting mailto: Fuzzy.GreyBeard_at_gmail.com *** Top posting [replies] guarantees I won't respond. ***Received on Mon Jan 23 2006 - 10:47:27 CST