[This topic is migrated from our old forums. The original author name has been removed]
Just because I'm a bit of a (lazy) keyboard junkie when it comes to writing SQL, it would be useful to have some kind of type-ahead and/or auto-complete for SQL keywords.
So, if I start to type "SEL" the SQL editor anticipates that I'm going to type "SELECT" and completes the word for me. It would probably place the insertion over the "ECT" so I can keep typing or, if I press enter/tab or some other special key accept the suggested word and inserts a space after ready for me to type my next word.
Granted, most SQL keywords are only a few keystroks long (I'm sure I can complete "IN" or "ON" before the type-ahead kicks in) but for some words it would just be a convenience to have the option of accepting the suggestion or typing my own. But it would be useful for the editor to suggest "LEFT OUTER JOIN" if it sees me typing "LEFT". That would make things a little quicker. You could be even more fancy and complete "LEFT OUTER JOIN", then add a carriage return and "ON" before returning the caret to the the appropriate place ready for me to type my table name.
I wouldn't go for a drop-down list of options, as in the auto-complete system, rather I'd pick the longest word/known phrase that matches the stub I've just typed. I guess it's a little like the predictive text system on some mobile phones; have a guess at the likely word but let the user accept it or keep typing.
I'd anticipate each DB profile having its own set of keywords (as the supported keywords may differ).
I'd think something like this could be quite responsive and could even be expanded to take in new "keywords" for the current session, learning that if I'm working with vw_mybaseview_b during this session, I might like it added to my type-ahead list.
almost 14 years ago
[This reply is migrated from our old forums.]
Re: Auto-complete SQL keywords
We primarily use IntelliJ IDEA during development of our products and their great code completion support in combination with "Live Templates" and other editing features are really powerful tools.
Ultimately we would like to offer something similar in DbVisualizer.
I'll add your request to the RFE list.