On 12/9/08, Mansour Al Akeel <[EMAIL PROTECTED]> wrote: > > I am trying to run vim as mysql client as I had enough with the query > browser. things are not going very well and not a lot of resources on > the net. The tutorial that comes with it, is long and tends to show the > features more than showing how to use them.
That is true, the idea with the tutorial is to take you through some of the more common features so that you are aware of them. Then you simply adopt the ones that will be most useful to you. The tutorial also does not cover all the features of the plugin. > If some one on this list > have had any luck with this plugin, please let me know how to choose a > profile when you start vim. You didn't specify which version of the plugin you have installed, but the tutorial (which has been updated recently) has the following information. If for a specific file, you want it to use a predefined profile: *** let g:dbext_default_profile_usual = 'type=ASA:user=DBA:passwd=SQL' Then in your SQL files, you can add the following line where "//" is simply a comment line marker for SQL files. Comment indicators change by filetype. // dbext:profile=usual *** And more specifically to your question about specifying a default profile to be used unless overridden: *** If you always want dbext to use a specific profile for every new buffer (unless overriden in your modelines) you can add the following to your vimrc (using the profile created above): let g:dbext_default_profile = 'usual' *** > So, If there's a link to a tutorial that gives > step-by-step guide to this plugin, it will be a great help. That is really what the tutorial is designed to do. If you are finding it is not providing enough of what you need, _please_ point out the sections where you think it can be improved. Indicate what information you were looking for and what was not clear enough. I am very happy to update the tutorial to make it better. >From the perspective of what I use daily with it, or perhaps "how" I use it. 1. I have about 60 different profiles defined (different projects and customers). 2. I am always Visually highlighting text and hitting <Leader>se to execute it. 3. In the result window, I often hit "R" to refresh (ie re-run the last query). 4. I either Visually select a table name or (if a simple word) hit <Leader>st to select from that table. 5. I often use <Leader>slt to List Tables to remember how to spell something. So the above 5 I do about 10,000 times a day. But there are many, many other features I use during development like generating a column list (for an INSERT or UPDATE statement <Leader>slc). I also use it with the OMNI code completion for column and table name completion which saves a lot of typing and typos. :h omni-sql-completion Please feel free to send me questions. Dave --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---