• Login
Community
  • Login

Auto insert broken?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
5 Posts 3 Posters 3.5k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    Steve Johnson
    last edited by Feb 22, 2016, 7:42 PM

    I’m sorry if this has been addressed already, but I can’t seem to find anything on it.

    In previous versions prior to 6.8.3 or so, typing a left-hand character included in the Settings>Auto-insert section ALWAYS added the right-hand closing character (braces, quotes, parentheses, etc.). Now it doesn’t under certain circumstances, such as when there are characters to the right of the cursor.

    This change in behavior has caused no end of problems for me as I’ve been ‘trained’ that when I type an opening brace, the closing one automatically appears. I’ve had to revert to 6.8.3 to restore expected behavior.

    Is this a bug, or new improved (not, imho) behavior?

    C 1 Reply Last reply Feb 22, 2016, 11:56 PM Reply Quote 0
    • C
      Claudia Frank @Steve Johnson
      last edited by Feb 22, 2016, 11:56 PM

      Hello @Steve-Johnson,

      you are right, this has been introduced with npp6.8.4.
      It was aksed to enhance this to prevent deleting unecessary chars.
      Let’s assume there is text like

      some text and we want to encase it by brackets
      

      prior to 6.8.4 inserting a bracket would result in

      some text and we want to []encase[] it by brackets
      

      when only

      some text and we want to [encase] it by brackets
      

      was wanted.
      But this resulted in behaviour like

      cstr(int()
      

      whereas

      cstr(int())
      

      is wanted.

      I guess this is one of those decisions which needs to be made, support either this or that. And if it could be solved
      to make you and the requestors of this enhancment happy, I’m pretty sure another party comes up and wants something different.

      But, the beauty is, npp is open source and you can download the source and modify it to your needs or, as you already did,
      use 6.8.3 from the archive.

      Cheers
      Claudia

      1 Reply Last reply Reply Quote 0
      • S
        Steve Johnson
        last edited by Feb 23, 2016, 5:05 PM

        Thank you for the explanation, Claudia.

        As modifying the source code to my needs is beyond my capabilities, I guess I am stuck with 6.8.3 for the time being while looking around for another code editor.

        C 1 Reply Last reply Feb 23, 2016, 7:42 PM Reply Quote 0
        • C
          Claudia Frank @Steve Johnson
          last edited by Feb 23, 2016, 7:42 PM

          Hello Steve,

          there is another way to do it but this involves python script plugin.
          You can read here what needs to be done.

          Cheers
          Claudia

          1 Reply Last reply Reply Quote 0
          • G
            guy038
            last edited by Feb 23, 2016, 8:07 PM

            Hello Steve, Claudia and All,

            May be an option to enable/disable the “intelligent” auto-insert feature ( introduced since N++ 6.8.4 ) would be judicious, in the Settings - Preferences - Auto-Completion - Auto-Insert area ?

            So, when this option is UNCHECKED, we would find, again, the old auto-insert behaviour !

            I suppose that, by-passing the part of code that produces the new behaviour, in order to get the old automatic auto-insert behaviour, shouldn’t be too difficult to code, anyway !

            Of course, it’s up to Don Ho and/or the devs, which coded the auto-insert feature

            Best Regards,

            guy038

            1 Reply Last reply Reply Quote 0
            4 out of 5
            • First post
              4/5
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors