I am an enthusiastic vim fan but never used it much .I use sqldeveloper
for db related tasks.Due you guys really feel comfortable in vim to write
pl/sql and also can you guys also query the db and see the resutlset
through vim.
Yes to both questions. If you download the dbext script from the vim.org
site you can access and view the data on any db. I use it in my
day-to-day work...
The instructions are pretty straightforward on the script, so have a
look and let me know if you have questions.
> I am an enthusiastic vim fan but never used it much .I use
> sqldeveloper for db related tasks.Due you guys really feel comfortable
> in vim to write pl/sql and also can you guys also query the db and see
> the resutlset through vim.
> -- > /*Thanks & Regards
> Vickyb*
> /
> -- > You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
> I am an enthusiastic vim fan but never used it much .I use sqldeveloper
> for db related tasks.Due you guys really feel comfortable in vim to write
> pl/sql and also can you guys also query the db and see the resutlset
> through vim.
While I don't use it regularly for Oracle/pl/sql, I do use it for
T-SQL on SQL-Server for my day job. I don't use the dbext script
that Paul mentions, but I don't usually use *any* scripts, so don't
take it as a negative mark :-)
I usually just use vim for easy formatting, and the power of :g and
:s commands. I usually keep the master SQL in vim and copy into
Query Analyzer to test.
Thanks for the replies guys but in the present world where we leave with so
much of ide and code completion and so many features what is that makes you
guys stick to vim .. does it make your job simpler or features are great or
your use to it.
On Mon, Sep 24, 2012 at 10:47 PM, Tim Chase <v...@tim.thechases.com> wrote:
> On 09/24/12 11:54, vicky b wrote:
> > I am an enthusiastic vim fan but never used it much .I use sqldeveloper
> > for db related tasks.Due you guys really feel comfortable in vim to write
> > pl/sql and also can you guys also query the db and see the resutlset
> > through vim.
> While I don't use it regularly for Oracle/pl/sql, I do use it for
> T-SQL on SQL-Server for my day job. I don't use the dbext script
> that Paul mentions, but I don't usually use *any* scripts, so don't
> take it as a negative mark :-)
> I usually just use vim for easy formatting, and the power of :g and
> :s commands. I usually keep the master SQL in vim and copy into
> Query Analyzer to test.
Actually, I do that too, I should've mentioned...I think the thing that
I like about the dbext script is that I can do quick data validation
before I cut and paste into other functions etc (if I'm embedding in a
c# program or something similar)...I do like that with the script I can
do all my work however without the need for any other editor...
Paul
> On 09/24/12 11:54, vicky b wrote:
>> I am an enthusiastic vim fan but never used it much .I use sqldeveloper
>> for db related tasks.Due you guys really feel comfortable in vim to write
>> pl/sql and also can you guys also query the db and see the resutlset
>> through vim.
> While I don't use it regularly for Oracle/pl/sql, I do use it for
> T-SQL on SQL-Server for my day job. I don't use the dbext script
> that Paul mentions, but I don't usually use *any* scripts, so don't
> take it as a negative mark :-)
> I usually just use vim for easy formatting, and the power of :g and
> :s commands. I usually keep the master SQL in vim and copy into
> Query Analyzer to test.
> On 09/24/12 11:54, vicky b wrote:
>> I am an enthusiastic vim fan but never used it much .I use sqldeveloper
>> for db related tasks.Due you guys really feel comfortable in vim to write
>> pl/sql and also can you guys also query the db and see the resutlset
>> through vim.
> While I don't use it regularly for Oracle/pl/sql, I do use it for
> T-SQL on SQL-Server for my day job. I don't use the dbext script
> that Paul mentions, but I don't usually use *any* scripts, so don't
> take it as a negative mark :-)
> I usually just use vim for easy formatting, and the power of :g and
> :s commands. I usually keep the master SQL in vim and copy into
> Query Analyzer to test.
For me personally, number of reasons, but probably the main ones:
--it is so small
--it's fast
--it's totally customizable (you can pretty much set it up exactly as
you need/want it)
--it works on pretty much every OS
--once you get used to it is it incredibly fast to use...it's so much
quicker than if you have to use the mouse...it frees your mind to
concentrate on the code, not the editor
--it's free!!
There are many many other reasons, these are just a few of my own ones.
Hope that helps...I would say give it a try....personally, I don't think
you'll go back to another editor once you get proficient on vim
> Thanks for the replies guys but in the present world where we leave
> with so much of ide and code completion and so many features what is
> that makes you guys stick to vim .. does it make your job simpler or
> features are great or your use to it.
> On Mon, Sep 24, 2012 at 10:47 PM, Tim Chase <v...@tim.thechases.com
> <mailto:v...@tim.thechases.com>> wrote:
> On 09/24/12 11:54, vicky b wrote:
> > I am an enthusiastic vim fan but never used it much .I use
> sqldeveloper
> > for db related tasks.Due you guys really feel comfortable in vim
> to write
> > pl/sql and also can you guys also query the db and see the resutlset
> > through vim.
> While I don't use it regularly for Oracle/pl/sql, I do use it for
> T-SQL on SQL-Server for my day job. I don't use the dbext script
> that Paul mentions, but I don't usually use *any* scripts, so don't
> take it as a negative mark :-)
> I usually just use vim for easy formatting, and the power of :g and
> :s commands. I usually keep the master SQL in vim and copy into
> Query Analyzer to test.
> -tim
> -- > /*Thanks & Regards
> Vickyb*
> /
> -- > You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
> Thanks for the replies guys but in the present world where we
> leave with so much of ide and code completion and so many
> features what is that makes you guys stick to vim .. does it make
> your job simpler or features are great or your use to it.
First, I've used Vim for so long that I now find things like ":w"
appearing in my other editing tools (Query Analyzer, Word, etc), so
using Vim is habit.
Also, the power of Vim makes it very easy to perform quick
transformations on text/queries which I regularly do. For DB work,
one I frequently do is a
SELECT TOP 1 * FROM SomeTable
and run it in text-mode (rather than grid-mode). I then copy out
the headers in the results, paste them into Vim and issue a
:s/\t/,\r/g
to turn them into named columns that I can order as I see fit,
without hand-entering them all. That often makes the foundation of
a SELECT clause for me.
Matching parens/braces, syntax highlighting, batch transforms,
macros, etc. are all reasons I have trouble stepping away from Vim.
> On 09/24/12 12:19, vicky b wrote:
>> Thanks for the replies guys but in the present world where we
>> leave with so much of ide and code completion and so many
>> features what is that makes you guys stick to vim .. does it make
>> your job simpler or features are great or your use to it.
> First, I've used Vim for so long that I now find things like ":w"
> appearing in my other editing tools (Query Analyzer, Word, etc), so
> using Vim is habit.
> Also, the power of Vim makes it very easy to perform quick
> transformations on text/queries which I regularly do. For DB work,
> one I frequently do is a
> SELECT TOP 1 * FROM SomeTable
> and run it in text-mode (rather than grid-mode). I then copy out
> the headers in the results, paste them into Vim and issue a
> :s/\t/,\r/g
> to turn them into named columns that I can order as I see fit,
> without hand-entering them all. That often makes the foundation of
> a SELECT clause for me.
> Matching parens/braces, syntax highlighting, batch transforms,
> macros, etc. are all reasons I have trouble stepping away from Vim.
> Thanks for the replies guys but in the present world where we leave > with so much of ide and code completion and so many features what is > that makes you guys stick to vim .. does it make your job simpler or > features are great or your use to it.
I am the maintainer of dbext and a host of other related SQL support in Vim.
IDE features provided by other software are great and a number of them have been added to Vim via plugins.
SrchRplcHiGrp.vim : Search and/or replace based on a syntax highlight group
Since I work with SQL all day, I primarily created it to UPPER CASE
keywords (SELECT, UPDATE, FROM, WHERE, ...) in SQL. But, it has nothing to do with SQL.
Basically, if Vim can colour highlight text in a file, then you can
choose to search and replace on those colour highlights. I justchoose sqlKeyword highlighting keywords and then to do a search and replace to transform those words into UPPER CASE strings.
The main purpose of this plugin is it will reformat SQL queries into a
nice readable format. But it has another option which will allow you
to UPPER CASE your keywords as well.
Tim, I noticed you mentioned you format SQL, have a look at the web page for this plugin it shows a few formatting examples.
This one was mentioned by Paul. It can do far more than simply execute SQL.
One of the most useful features I find is the ability to execute SQL and prompt you for input parameters. It can also do this for many different fileformats. For example assume you had the following Java code:
String mySQL =
"SELECT s.script, ts.event, t.name " +
" , s.script_language, sv.name " +
" FROM ml_script s, ml_table_script ts, ml_table t " +
" , ml_script_version sv " +
" WHERE s.script_id = " + script_version +
" AND ts.version = "+obj.method() +
" AND ts.table_id = t.table_id ";
If you visually select from the "SELECT ... to the "; and ran
:'<,'>DBExecSQL
The Java filetype support would concatenate each individual string into
one single string. In this case it removed the " + " and concatenated
the lines to result in the following (assuming this is on one line):
SELECT s.script, ts.event, t.name , s.script_language, sv.name
FROM ml_script s, ml_table_script ts, ml_table t
, ml_script_version sv
WHERE s.script_id = " + script_version + "
AND ts.version = "+obj.method() +"
AND ts.table_id = t.table_id
It will then prompt you for values for "script_version" and "obj.method()".
This allows you to execute the query and test it without having you to modify your code at all.
A number of different filetypes are supported, Java, Perl, PHP, VB, Vim, SQL. More can be added.
Included with Vim 7.3 is the SQL Complete plugin. It uses the OMNI completion built into Vim (CTRL-X CTRL-O) and will complete using SQL syntax keywords.
If you have the dbext plugin installed, it will also complete, tables, columns, stored procedures and other items. It will dynamically pull these from whatever database you have it connect. See the help file :h omni-sql-completion or :h ft_sql.txt
Tim, you also showed an example of how create a select column list by grabbing the headers (from a different program) and running a search and replace on it.
SQLComplete.vim has provisions for doing just that. When on a table name, a key stroke will replace the table name with a comma separated list of columns from that table.
Anyway, there is a bunch more to the SQL support I have added in Vim, but that should give people a fairly good overview.
> On 24/09/2012 1:19 PM, vicky b wrote:
>> Thanks for the replies guys but in the present world where we leave
>> with so much of ide and code completion and so many features what is
>> that makes you guys stick to vim .. does it make your job simpler or
>> features are great or your use to it.
> I am the maintainer of dbext and a host of other related SQL support
> in Vim.
> IDE features provided by other software are great and a number of them
> have been added to Vim via plugins.
> SrchRplcHiGrp.vim : Search and/or replace based on a syntax highlight
> group
> Since I work with SQL all day, I primarily created it to UPPER CASE
> keywords (SELECT, UPDATE, FROM, WHERE, ...) in SQL. But, it has
> nothing to do with SQL.
> Basically, if Vim can colour highlight text in a file, then you can
> choose to search and replace on those colour highlights. I justchoose
> sqlKeyword highlighting keywords and then to do a search and replace
> to transform those words into UPPER CASE strings.
> The main purpose of this plugin is it will reformat SQL queries into a
> nice readable format. But it has another option which will allow you
> to UPPER CASE your keywords as well.
> Tim, I noticed you mentioned you format SQL, have a look at the web
> page for this plugin it shows a few formatting examples.
> This one was mentioned by Paul. It can do far more than simply
> execute SQL.
> One of the most useful features I find is the ability to execute SQL
> and prompt you for input parameters. It can also do this for many
> different fileformats. For example assume you had the following Java
> code:
> String mySQL =
> "SELECT s.script, ts.event, t.name " +
> " , s.script_language, sv.name " +
> " FROM ml_script s, ml_table_script ts, ml_table t " +
> " , ml_script_version sv " +
> " WHERE s.script_id = " + script_version +
> " AND ts.version = "+obj.method() +
> " AND ts.table_id = t.table_id ";
> If you visually select from the "SELECT ... to the "; and ran
> :'<,'>DBExecSQL
> The Java filetype support would concatenate each individual string into
> one single string. In this case it removed the " + " and concatenated
> the lines to result in the following (assuming this is on one line):
> SELECT s.script, ts.event, t.name , s.script_language, sv.name
> FROM ml_script s, ml_table_script ts, ml_table t
> , ml_script_version sv
> WHERE s.script_id = " + script_version + "
> AND ts.version = "+obj.method() +"
> AND ts.table_id = t.table_id
> It will then prompt you for values for "script_version" and
> "obj.method()".
> This allows you to execute the query and test it without having you to
> modify your code at all.
> A number of different filetypes are supported, Java, Perl, PHP, VB,
> Vim, SQL. More can be added.
> Included with Vim 7.3 is the SQL Complete plugin. It uses the OMNI
> completion built into Vim (CTRL-X CTRL-O) and will complete using SQL
> syntax keywords.
> If you have the dbext plugin installed, it will also complete, tables,
> columns, stored procedures and other items. It will dynamically pull
> these from whatever database you have it connect. See the help file
> :h omni-sql-completion or :h ft_sql.txt
> Tim, you also showed an example of how create a select column list by
> grabbing the headers (from a different program) and running a search
> and replace on it.
> SQLComplete.vim has provisions for doing just that. When on a table
> name, a key stroke will replace the table name with a comma separated
> list of columns from that table.
> Anyway, there is a bunch more to the SQL support I have added in Vim,
> but that should give people a fairly good overview.
> David.
> -- > You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
On Monday, September 24, 2012 7:55:11 PM UTC+3, vicky b wrote:
> HI All,
> I am an enthusiastic vim fan but never used it much .I use sqldeveloper for db related tasks.Due you guys really feel comfortable in vim to write pl/sql and also can you guys also query the db and see the resutlset through vim.
On Thu, Sep 27, 2012 at 4:12 PM, talek <alexandru.t...@gmail.com> wrote:
> On Monday, September 24, 2012 7:55:11 PM UTC+3, vicky b wrote:
> > HI All,
> > I am an enthusiastic vim fan but never used it much .I use
> sqldeveloper for db related tasks.Due you guys really feel comfortable in
> vim to write pl/sql and also can you guys also query the db and see the
> resutlset through vim.
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
> On Thu, Sep 27, 2012 at 4:12 PM, talek <alexandru.t...@gmail.com
> <mailto:alexandru.t...@gmail.com>> wrote:
> On Monday, September 24, 2012 7:55:11 PM UTC+3, vicky b wrote:
> > HI All,
> > I am an enthusiastic vim fan but never used it much .I use
> sqldeveloper for db related tasks.Due you guys really feel
> comfortable in vim to write pl/sql and also can you guys also
> query the db and see the resutlset through vim.
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
> -- > /*Thanks & Regards
> Vickyb*
> /
> -- > You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
Yes everything I outlined in my email is for all databases supported by the dbext plugin. That is around 14 databases plus ODBC and Perl's DBI interface.
--
David Fishburn
On Oct 4, 2012, at 10:28 AM, Paul Stewart <paulbrianstew...@gmail.com> wrote:
> On 10/03/2012 11:40 PM, vicky b wrote:
>> do we have anything for mysql
>> On Thu, Sep 27, 2012 at 4:12 PM, talek <alexandru.t...@gmail.com> wrote:
>> On Monday, September 24, 2012 7:55:11 PM UTC+3, vicky b wrote:
>> > HI All,
>> > I am an enthusiastic vim fan but never used it much .I use sqldeveloper for db related tasks.Due you guys really feel comfortable in vim to write pl/sql and also can you guys also query the db and see the resutlset through vim.
>> --
>> You received this message from the "vim_use" maillist.
>> Do not top-post! Type your reply below the text you are replying to.
>> For more information, visit http://www.vim.org/maillist.php
>> -- >> Thanks & Regards
>> Vickyb
>> -- >> You received this message from the "vim_use" maillist.
>> Do not top-post! Type your reply below the text you are replying to.
>> For more information, visit http://www.vim.org/maillist.php
> -- > You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php