Auto-completion of brackets only works when text is isolated?



  • Hello everyone! I hope you’re having a good day.

    I am having some issues with Notepad++ v7.8.4 on Win10.
    Auto closing of brackets works perfect when the bracket is isolated, but as soon as it’s next to another delimitor, it seems to not recognise it.
    Same scenario works ok on Atom.
    Maybe a bug? Or it’s just the way it’s intended to work?

    Thanks in advance for your opinion!

    Notepad++
    alt text

    Atom
    alt text



  • Hello, @marianogedisman and All,

    I did some tests, regarding the auto-completion feature and here are the present main rules of this mechanism :

    • If the box " or ' is ticked then, when pressing the " or ' key, the auto-completion occurs :

      • If the character before the caret belongs to class [\t\r\n\x20] and the character after the caret belongs to class [\t\r\n\x20)\]}]

      • If the character before the caret belongs to class [(\[{] and the character after the caret belongs to class [\t\r\n\x20]

      • If the caret is within the () or [] or {} string

    • If the box { or [ or { is ticked then, when pressing the ( or [ or { key, the auto-completion occurs :

      • Whatever the character before the caret

      • If the character after the caret belongs to the class [\t\r\n\x20)\]}]

    • If a matched pair is ticked, then the auto-completion occurs :

      • Whatever the character before the caret

      • If the character after the caret belongs to the class [\t\r\n\x20]

      • Note that the opening and closing user boundaries, of any matched pair, must belong to the range [\x1E-\x7F] !


    Now, it seems reasonable to allow the auto-completion feature regardless of the characters before and after the caret position ! If the present behavior bothers you, I advice you to create a new issue, following these recommendations

    Best Regards

    guy038


Log in to reply