On Sat, Jan 10, 2009 at 5:06 PM, krzysztof cierpisz <[email protected]> wrote: > > Just pulled the new version and it rocks.
Excellent. > One question to the completion feature. > After pulling all column names into vim dictionary with <leader>slc > is it possible to use them in SELECT (or other) part for columns > completion? > Or the only way is to paste all of them, and delete the ones you don't > need? Yes and no. When you run a <Leader>slc (SQL List Columns), it fills the @" register with the column list. Then you just hit p to paste it into the buffer. That is using pure dbext. But, Vim also ships with autoload/sqlcomplete.vim. It is a filetype based SQL omni completion plugin (which I also wrote). It has it's own features outside of dbext. BUT If you have dbext installed, it uses dbext to retrieve database information and it provides the completion you are looking for in this case. First step: :h sql-completion or :h omni-sql-completion Without dbext, sqlcomplete can complete everything that Vim knows how to syntax highlight. So keywords, datatypes and so on. If you have dbext installed, then it can complete: Tables Procedures Views Columns It is triggered by <C-C> and a letter. <C-C>t - tables <C-C>p - procedures <C-C>v - views <C-C>c - columns There are a few more features to it on the Windows platform <C-LEFT>, <C-RIGHT> when the completions are displayed. It allows you to drill in and out of tables and columns. Great for trying to find the column you were looking for. This feature is only available on Windows since you cannot map <C-LEFT> and <C-Right> on *nix. There are many other features to it. But specific to your question, you may also want to look at <C-C>l and <C-C>L. So anyway, start with the tutorial and see what it can do for you. Dave --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
