About: Command-history facilities for Oracle/sqlplus user   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

Below is my Vim solution for sqlplus, to record the command history when you use edit (sqlplus builtin command) to open the editor specified by the EDITOR environment variable. It saves the SQL statements into a standalone file such as .sqlplus.history. Every time you open the file afiedt.buf (sqlplus's default command-buffer file), you get two split windows: the buffer above is afiedt.buf, the buffer below is .sqlplus.history, and you can see every SQL statement in the windows. It can't process multi-line SQL statements conveniently. To do this, just use your favorite vim trick for that:

AttributesValues
rdfs:label
  • Command-history facilities for Oracle/sqlplus user
rdfs:comment
  • Below is my Vim solution for sqlplus, to record the command history when you use edit (sqlplus builtin command) to open the editor specified by the EDITOR environment variable. It saves the SQL statements into a standalone file such as .sqlplus.history. Every time you open the file afiedt.buf (sqlplus's default command-buffer file), you get two split windows: the buffer above is afiedt.buf, the buffer below is .sqlplus.history, and you can see every SQL statement in the windows. It can't process multi-line SQL statements conveniently. To do this, just use your favorite vim trick for that:
Version
  • 5(xsd:double)
dbkwik:vim/property/wikiPageUsesTemplate
Previous
  • 40(xsd:integer)
Category
  • SQL
Author
  • vimer
Complexity
  • advanced
Created
  • 2001(xsd:integer)
ID
  • 41(xsd:integer)
NEXT
  • 42(xsd:integer)
Rating
  • 13(xsd:integer)
abstract
  • Below is my Vim solution for sqlplus, to record the command history when you use edit (sqlplus builtin command) to open the editor specified by the EDITOR environment variable. It saves the SQL statements into a standalone file such as .sqlplus.history. Every time you open the file afiedt.buf (sqlplus's default command-buffer file), you get two split windows: the buffer above is afiedt.buf, the buffer below is .sqlplus.history, and you can see every SQL statement in the windows. If you want to use SQL statement in line 5 to replace the current command-buffer, just press 5K, then :xa to go back to sqlplus. and use / to repeat the command saved in command-buffer file called afiedt.buf by default. It can't process multi-line SQL statements conveniently. To do this, just use your favorite vim trick for that: fu! VimSQL() setf sql nnoremap : exe "let linenum=".v:count:1,$-1dj:exe lin enum."y"kP let linenum=line("$") 1,$-1w! >> ~/.sqlplus.history e ~/.sqlplus.history execute ":$-".(linenum-1).",$m0" %!uniq if line("$")>100 101,$d endif b# set splitbelow sp ~/.sqlplus.history au! BufEnter afiedt.buf endf au BufEnter afiedt.buf call VimSQL()
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software