Vim Tips Wiki


Revision as of 13:34, October 15, 2012 by (Talk)

1,619pages on
this wiki

Use this page to discuss script 356 dbext: database access from Vim

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on
  • This page may be out of date: check the script's page above, and its release notes.


Thanks for this great plugin, use it almost everyday. Have one request, would be great if variable can be use instead of parameters prompting, i.e:

set opt1 = "somevalue"; opt2 = "somevalue2"
set opt1 = "othervalueset"; opt2 = "othervalueset2"

    SELECT * from imaginarytable
    WHERE field1 = :opt1 AND field2 = :opt2;

So one can select different value before executing above query. Thanks for great plugin. --JK October 27, 2011

Not sure which version of dbext you are using. By default, when executing the SELECT statement it will prompt you for :opt1 and :opt2. It will then also save these values (for this buffer) and the next time you execute the a query using :opt1 or :opt2, it will ask if you want to use your saved values. You can see the saved values (and delete them) using <Leader>slr (SQL - List - vaRiables). That feature was added in version 11.1, the current version is 14.0 Dfishburn 11:45, April 5, 2012 (UTC)


  • Syntax highlight got removed after some actions sequence if dbext plugin installed.
  • Steps to reproduce: open some file to edit. Enter :cope<CR><C-w>k<C-w>o

--January 25, 2012

I can't reproduce this. If you can using the current version 14.0 please email me, as it will involve some back and forths. Dfishburn 11:45, April 5, 2012 (UTC)
  • Using DBext from VIM on Microsoft Windows XP with Oracle Instant Client 11.2adds a single quote when it should add a double-quote. The command arguments sent to SQLPLUS do not get properly expanded and the command fails. Changing the code from
    # Single quote causing problem
    #          |
    #          *
    sqlplus -S 'my_user/my_password@oracle_server" @c:\temp/dbext.sql


    # Substituting double quote solves problem
    #          |
    #          *
    sqlplus -S "my_user/my_password@oracle_server" @c:\temp/dbext.sql

fixes the problem. Of course, this makes DBext useless unless there is a fix for this behavior. Elcidia 17:37, June 12, 2012 (UTC)

A fix (version 16.0) for this was posted last night, please upgrade to the most current release of dbext. Dfishburn 21:58, June 12, 2012 (UTC)
  • Update: Still not working for Windows command interpreter

I installed version 16.0 and I see that two single quotes are now issued to the command line. Unfortunately, on Windows, these should be double quotes and not single quotes. This is a limitation of the Windows as the command interpreter does not process single quotes (been that way since Windows 3.1 I think).

   #   What it should look like
   #     double quote                      double quote
   #          |                                 |
   #          +                                 +
   sqlplus -S "my_user/my_password@oracle_server" @c:\temp/dbext.sql

As another idea, it would be cool if Powershell could be invoked. Elcidia 13:30, June 13, 2012 (UTC)

  • Update: Version 17.0 is also not working for Windows command interpreter

Around Wikia's network

Random Wiki