Tuesday, September 29, 2015

Re: Capitalizing SQL keywords

Hey Guys,
 
Thanks for the multiple suggestions.  I particularly liked David Fishburn's suggestion; I am now motivated to learn Vimscript to hack his plugin to my particular formating fancy....

On Fri, Sep 25, 2015 at 4:48 PM, Josef Fortier <josef.fortier@gmail.com> wrote:
On Wednesday, September 23, 2015 at 2:09:51 PM UTC-5, Sonny Chee wrote:

> I've defined a bunch of (SQL) keywords I would like to capitalize
> using "abbreviate".

It's not your question, but you might like this approach I put together:

https://github.com/fourjay/upsql-vim

It has a (potential) advantage over the abbreviate approach, in that it uses syntax to determine SQL keywords. The consequences are minor, but are real, notably that a) It works on mixed case b) it's source is the syntax file, which means no having to worry about maintaining the keyword list.

I'm the only user. The basic approach comes from this group (Christian Brandt post from a long time a go that I found through google). It's put together with the assumption that a user will use a plugin manager to run it (that's how I use it and how I expect many others do).

That said, David's work is wonderful. I use his plugins all the time. His sqlutil formatter works very well (and is quite configurable). I've used it more then once to make sense out of of some unformatted glob of SQL. Likewise dbext is pretty wonderful.

--
--
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

---
You received this message because you are subscribed to a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/IRGHxgYbYCQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Sonny.
----------------------------------------------------------------------------
Be true to your work, your word, and your friend. Henry David Thoreau.

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: