Vim Tips Wiki
(Uploaded by JohnBot from a locally edited file)
(Adjust previous/next navigation)
(3 intermediate revisions by 2 users not shown)
Line 9: Line 9:
 
|version=5.7
 
|version=5.7
 
|rating=13/4
 
|rating=13/4
  +
|category1=
  +
|category2=
 
}}
 
}}
 
DBI::Shell is a Perl module that is used as a shell interface to Perl's popular DBI (database interface) package. Forget your favorite SQL navigation gui and give this method a shot. This has only been tested in Unix.
 
DBI::Shell is a Perl module that is used as a shell interface to Perl's popular DBI (database interface) package. Forget your favorite SQL navigation gui and give this method a shot. This has only been tested in Unix.
Line 27: Line 29:
   
 
==Comments==
 
==Comments==
  +
Note that if your are using MySQL cli, you can type : "pager vim -" (without the quotes indeed).
  +
  +
Then every select, desc, show, etc. will be opened in Vim.
  +
  +
----

Revision as of 03:05, 29 September 2008

Tip 104 Printable Monobook Previous Next

created September 3, 2001 · complexity advanced · author meonkeys · version 5.7


DBI::Shell is a Perl module that is used as a shell interface to Perl's popular DBI (database interface) package. Forget your favorite SQL navigation gui and give this method a shot. This has only been tested in Unix.

1. Run dbish (runs DBI::Shell; installed with DBI::Shell) and connect to any database.

2. In dbish, set /format box.

3. Enter your query.

4. To execute query, type "/ | vim -"

This runs the query and pipes the output to the standard input of Vim.

Here are some follow-up tips:

  • Use gvim instead of Vim so a new window will pop up.
  • Set nowrap once in Vim.

Comments

Note that if your are using MySQL cli, you can type : "pager vim -" (without the quotes indeed).

Then every select, desc, show, etc. will be opened in Vim.