vimrc.tcl : Adds a SQLWorksheet type interface to Oracle SQL*Plus
| script karma
Downloaded by 539
Comments, bugs, improvements
script versions (upload new version)
|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.
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.
|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>
Click on the package to download.
ip used for rating: 188.8.131.52