--
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.
http://www.vim.org/scripts/script.php?script_id=848
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.
There is also this plugin:
SQLUtilities : SQL utilities - Formatting, generate - columns
lists,
procedures for databases
http://www.vim.org/scripts/script.php?script_id=492
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.
dbext.vim : Provides database access to many dbms (Oracle, Sybase,
Microsoft, MySQL, DBI,..)
http://www.vim.org/scripts/script.php?script_id=356
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
--
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