RE: sqlplus / quickfix
> -----Original Message-----Have you looked in my plugin:
> From: Wes Potts [mailto:wespotts@...]
> Sent: Friday, October 28, 2005 4:46 PM
> To: Vim Mailing List
> Subject: sqlplus / quickfix
> I've been using vim for a while now but, have never written
> any vimscript, functions, plugins, etc. I recently started
> using sqlplus a great deal with vim as my editor. However,
> sqlplus' lack of command/statement history is driving me
> nuts! So, after a bit of vim research, if it's not terribly
> difficult, I would like to develop a plugin/extension to
> allow me to save and browse my sqlplus command history via
> the quickfix utilities (similar to :helpgrep - :copen).
> What I have in mind at the moment is something like the following:
> 1. Save all commands in a file (or set of files) in a
> specific location.
> 2. Upon running "edit", load vim with a layout similar to:
> ====== afiedt.buf ====================== history statement ==========
> |-- the full statement
> selected below
> -- current buffer |update xzy set abc = 'blah'
> select * from gef |where this = that
> -- etc. |and a = b
> |and something in ( stuff )
> |order by x,y,z
> =========================== history list
> ============================ select * from xyz ...
> update xzy set abc = 'blah' ... (THIS LINE SELECTED) select
> a.abc, b.abc from abc a, bcd b ...
> Now, I'd like to have it work such that pressing enter on a
> line in the quickfix window (bottom) would load the full
> statement to the window on the right. Then, if I choose to,
> I may press some key to copy that statement to the current
> buffer window (left) for editing.
> Could someone point me in the right direction and/or give me
> an idea of how difficult (time consuming) this might be for
> me as I have never written a vim script or plugin?
dbext.vim : Provides database access to 10 databases (Oracle, Sybase, SQL
It is a popular plugin for databases. Please read the webpage for all the
As of writing this I realized I do not have a command history feature, so
thanks for the suggestion. I will at it in the future.
It is very easy to build your own command history though, simply by creating
a separate file and copying the commands into it.
I use it regularily against at least half of the supported databases.
Sybase ASA, ASE are near the top of that list.
Do you use Vim to edit SQL?
Check the description of these plugins:
dbext.vim - Provides database access to 10 databases (Oracle, Sybase, SQL
Server, MySQL,...) (http://www.vim.org/scripts/script.php?script_id=356)
SQLUtilities - Formatting SQL, generate - columns lists, procedures for
sql.vim - SQL indent file for Sybase ASA and Oracle (
Intellisense for Vim : SQL, C++, CSharp, Java, JSP, XML, HTML (