sponsor Vim development Vim logo Vim Book Ad

advanced Tip #104: using vim to complement Perl's DBI::Shell

 tip karma   Rating 13/4, Viewed by 2193 

Read and edit this tip on the Vim tip wiki. The wiki may have a more recent version of this tip.

created:   September 3, 2001 10:02      complexity:   advanced
author:   meonkeys      as of Vim:   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
-make a syntax highlighting file for me!

-Adam Monsen

 rate this tip  Life Changing Helpful Unfulfilling 

<< Move to next/previous line with same indentation | combining move and scroll >>

Additional Notes

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo