Autocomplete only on Tab press

Sysprogs forums Forums VisualGDB Autocomplete only on Tab press

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #35622
    Nakame
    Participant

    Hello !

    quite often, my code is wrongly autocompleted when i press the spacebar . This is sometime driving me insane. There was an option in visual c++ ( edit->intelisence->switch between automatic and tab only completion ) but it doesnt seem to work with visualGDB.

     

    Does visualGDB have a similar option that i couldnt find ? How can i make autocompletion work only when i press tab ?

     

    Thank you in advance !

    #35623
    support
    Keymaster

    Hi,

    VisualGDB’s code completion has 2 levels of confidence:

    • If the string you typed exactly matches the beginning of a suggestion, (e.g. you typed “print” and it found “printf”), typing any non-identifier character (space, opening bracket, comma, etc) will trigger a completion and will insert the character you typed.
    • If the string loosely matches the suggestion (e.g. you typed “ncmp” and if found “wcsncmp” or you typed “pascope” and it found “pthread_attr_getscope), it is considered a low-confidence match, so it will only get completed if you press tab. Otherwise it will insert what you typed as if there was no completion popup.

    Normally, this should avoid inserting the wrong suggestions, while still giving you the possibility to find functions or variables if you don’t know the exact name. If you keep getting incorrect completions, feel free to share more details with an exact example of what you are typing and what VisualGDB suggests, and we will look further into it.

    #35625
    Nakame
    Participant

    Hello !

     

    I don’t have an exemple right now ( and i am working on some electronic stuff for now ) but i will post one as soon as i stumble accross one.

    In the meantime you can imagine that i am not taking the time to post here if it wasnt a frustrating problem for me. When i press the space bar, i expect the end of the word. Period. If i want an autocompletion, i would usually press the “Enter” or “Tab” key. I assume from your response that this is not possible using visualGDB ?

    I will post an exemple as soon as possible.

    #35651
    Nakame
    Participant

    Allright i have the first good exemple that is very easy to reproduce here.

     

    In my norm, there is a rule that say that inside preprocessor conditions i am supposed to put a space between the ‘#’ and the rest. For exemple :

    #ifdef __GNU_C__

    # define className __PRETTY_FUNCTION__

    #endif

    Notice the space between ‘#’ and ‘define’ . With visualGDB , when i press the space after the #, it autocomplete to “#assert”. Again, this is an exemple, it happens on a lot of other things. It is rare enought that i don’t desactivate autocomplete alltogether but it is still annoying when it happen. An easy fix to that is to have an option to disable autocomplete on space and instead use tab . or even better, set the key yourself.

    #35661
    support
    Keymaster

    Hi,

    Thanks, this is indeed a bug in the completion system, although it looks like a very rare scenario.

    We have added special handling for spaces in preprocessor directives to this build: VisualGDB-6.0.103.5192.msi

    If you encounter other cases where spaces break completion logic, feel free to share the repro steps and we will look into it.

     

    Attachments:
    You must be logged in to view attached files.
    #35683
    Nakame
    Participant

    In the linked screenshot, i am trying to type in a variable nammed X, as in

    int ( &X )[ 100] )

     

    However, pressing spacebar after the “X”  here will autocomplete to X_OK . I just want a space.

    Attachments:
    You must be logged in to view attached files.
    #35685
    bflannery
    Participant

    I would like to second having this be a setting. I would like to disable:

    • If the string you typed exactly matches the beginning of a suggestion, (e.g. you typed “print” and it found “printf”), typing any non-identifier character (space, opening bracket, comma, etc) will trigger a completion and will insert the character you typed.

    Honestly this functionality gets in the way more than it speeds up my programming. I would much rather have autocomplete only complete what I am typing when I press tab.

    Here I am trying to create a local variable named, alarm. The sensible thing for me to do would be to type space to continue this line of code or end it with semicolon if it was simply a definition.

    However, that would autocomplete to a macro. Instead I need to hit escape and I don’t like reaching for that key because it interrupts my typing flow/train of thought.

     

    • This reply was modified 3 weeks, 2 days ago by bflannery.
    #35695
    Nakame
    Participant

    Another insanely annoying behavior that come from this is when i use multi-line edit. In the screenshot, i am trying to add the keyword “static” before 3 different lines, using the multi line edit tool ( shift + alt ). The autocomplete corretly assume that i want to use “static”. I press the spacebar and it autocomplete corretly but it cancel my multi line edit , and only the first line get edited, completly defeating the purpose.

    • This reply was modified 2 weeks, 5 days ago by Nakame.
    Attachments:
    You must be logged in to view attached files.
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.