sponsor Vim development Vim logo Vim Book Ad

vimrc.tcl : Adds a SQLWorksheet type interface to Oracle SQL*Plus

 script karma  Rating 4/1, Downloaded by 793  Comments, bugs, improvements  Vim wiki

created by
Jeremy Collins
 
script type
utility
 
description
This small hack requires Tcl to be compiled into your
copy of Vim.

The default settings will allow this hack to work on
the default SQL*Plus temp file, afiedt.buf, only.

To use simply highlight the query you would like to
run and press Enter.  You should drop back down to
SQL*Plus.  Do the usual '/' and your good to go.

Have not tried this hack with PL/SQL or multiple
Query's but I cannot see why it won't work, or why it
would for that matter.

BUGS
----
1) :wq causes an error message about writing the file.
   Safe to ignore but would be nice to get rid of this.

2) No checks to make sure you have highlighted a valid
   Query.  Hence all hell breaks loose if you don't.

3) You *HAVE* to have a trailing ';' on your Query for
   this hack to work.  Would be nice if you didn't have
   to have that.  Would also be nice if you could run
   a group of statements.
 
install details
Copy the script to ~/.vimrc.tcl then add this to your ~/.vimrc

au BufNewFile,BufRead afiedt.buf tc sqlplus_reload
au BufNewFile,BufRead afiedt.buf set ft=sql
au VimLeave           afiedt.buf tc sqlplus_force_save
map  <F11> :tc sqlplus_force_save<cr>
vmap ^M    :tc sqlplus<cr>

if has("tcl")
  tclfile ~/.vimrc.tcl
endif
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vimrc.tcl 0.1 2001-07-13 6.0 Jeremy Collins Initial upload
ip used for rating: 18.190.217.134

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github