How can we help you today? How can we help you today?

Disabling some standard completions

One of the standard completions in SQLPrompt is for "go", supplying "goto". I write lots of sql batches with a go statement; I almost never write a "goto". Is there a way of removing an entry from the list of prompts, so that "go" no longer has completion prompting?
twilson
0

Comments

5 comments

  • tanya
    Hello,

    There is no way to remove any entries from the candidate list but we have fixed this issue for our next version[v3.8] that is scheduled to release sometime around late April or early May.
    Until then to avoid the problem maybe you could remove the 'Spacebar' choice from your completion keys option (SQL Prompt menu – Options – Pop-up behaviour – Completion keys - Uncheck 'Spacebar' and use 'Tab'/'Enter'/or anything else that you are comfortable using as completion key) that would help you stop completing suggestions inadvertently?
    Sorry for any inconvenience this has caused.

    Thanks,
    Tanya
    tanya
    0
  • MikeONeill
    This is the same for Update , it gives you the UPDATE() function first rather than the the Normal UPDATE

    Also IN (INFORMATION_SCHEMA >>>) , and I am sure many more

    Will there be a means to disable unwated completions or to re order tehm to allow individual styles and usages ?

    Cheers

    Mike
    MikeONeill
    0
  • tanya
    Hi Mike,

    Unfortunately this release does not include any such feature. The only alternative to stop those automatic prompts is to enable manual triggering and then the CL will not come up unless you press CTRL+Space to bring it up.

    Thanks,
    Tanya
    tanya
    0
  • ChrisRickard
    I've run across the same thing, I tend to use a lot of GOs in my scripts and it's a big annoyance to type

    DROP PROC SomeProc
    GO{enter}

    expecting to drop to the next line and instead GOTO is inserted. The problem with the built in SQL Prompt GO keyword completion is that it isn't available in all contexts, usually I only see it after a USE statement.

    Here's a workaround for the GOTO problem:

    Create a snippet with the Shortcut = GO and the Code = GO. Snippets are always available in any context. So even if the GO snippet is invoked after typing GO{enter} the end result will still be a GO. At most the carriage return might be eaten but you can also embed the carriage return in the GO snippet if this is a problem.
    ChrisRickard
    0
  • MikeONeill
    Hi Chris

    Thanks for that , there are a couple of "completions" that you work around like this , for example the information_Schema one that intercepts IN ,these are in as snippets with shortcuts , eg make it infsc instead of in , I use that shortcut very infrequently so an extra few letters ....

    Some however aren't such as the Update() function.

    I have created a snippet <up = UPDATE> which now appears above the built in UPDATE() Function , so it fixes the problem , you just have to be carefult not to get carried away and type the UPD as this now goes to the UPDATE() Function.

    All in all you can normally get around most of the unwanted insert with an appropriate Snippet of your own .

    After all its a small price to pay for the massive typing saving that SQL Prompt gives us . I remain an "addict" , SQL without SQLPrompt would be unthinkable now.

    Cheers
    Mike
    MikeONeill
    0

Add comment

Please sign in to leave a comment.