Community
    • Login

    Can I see a preview for the result of the "replace" form?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    14 Posts 4 Posters 638 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.
    • Alan KilbornA
      Alan Kilborn @Aliaksandr3by
      last edited by

      @Aliaksandr3by

      What version of Notepad++ has a Find All in Current Document on the Replace tab ??

      I was going to elaborate on an idea to use the Compare plugin as a solution to the original query, but I looked at the plugin’s website ( apparently https://github.com/jsleroy/compare-plugin ) and the most-recent change is 3.5 years or so ago.

      I’m sure there has to be more-recent changes to this plugin?
      Anyone know?

      1 Reply Last reply Reply Quote 0
      • EkopalypseE
        Ekopalypse
        last edited by Ekopalypse

        I think the that the picture is a mock up.
        Install compare from plugin manager then you get the most current/actual version provided by @pnedev. Here is his repo.

        Alan KilbornA 1 Reply Last reply Reply Quote 1
        • Alan KilbornA
          Alan Kilborn @Ekopalypse
          last edited by

          @Ekopalypse said in Can I see a preview for the result of the "replace" form?:

          I think the that the picture is a mock up.

          Then, a confusing mock up! :-)

          Install compare from plugin manager

          Of course you mean Plugins Admin

          But yes…
          Usually when I’m looking at a new plugin to install, or to give advice concerning a plugin, I’ll first go to check out latest developments on that plugin.

          I was surprised to see the site listed in Plugins Admin for the Compare plugin was one that had 3.5 year old code, and is different from the one you provided:

          https://github.com/jsleroy/compare-plugin

          EkopalypseE 1 Reply Last reply Reply Quote 1
          • EkopalypseE
            Ekopalypse @Alan Kilborn
            last edited by Ekopalypse

            @Alan-Kilborn

            Yes , of course admin :-D

            Never noticed that the homepage listed in the plugin description is the old one. @pnedev - something you want to change??

            EDIT: The about page contains both.

            1 Reply Last reply Reply Quote 1
            • Alan KilbornA
              Alan Kilborn
              last edited by

              @Aliaksandr3by

              This may work for your original query:

              • get the Compare plugin
              • when you want to do this type of preview, first save your file
              • do your replacement operation (Replace All is probably most effective for this “demo”)
              • run Plugins > Compare > Diff since last Save

              This will give you a “preview” of your replacement action.
              If you don’t like what was replaced, simply Undo the replacement.

              1 Reply Last reply Reply Quote 2
              • Alan KilbornA
                Alan Kilborn
                last edited by

                Here’s an example of what such a “preview” could look like:

                Imgur

                1 Reply Last reply Reply Quote 0
                • Alan KilbornA
                  Alan Kilborn
                  last edited by

                  It looks like this POSTING is where I “stole” this idea from. Cred where cred is due.

                  1 Reply Last reply Reply Quote 0
                  • pnedevP
                    pnedev
                    last edited by

                    Hi @Ekopalypse ,

                    Never noticed that the homepage listed in the plugin description is the old one. @pnedev - something you want to change??

                    I started working on Compare as a contributor because I wanted to fix its long-standing instabilities. When I released v2.0 I kept the original plugin project page link - it is the official home of Compare plugin anyway. Sadly, no one maintains it anymore.

                    I separated my own clone of the project and started working on a new compare plugin with many new features. It is based on the original Compare but actually differs a lot. I didn’t want to mess the original plugin further but leave its fate to its authors. This way the users could use it as it is now if they prefer it over the new plugin I’m working on.

                    So yes, https://github.com/pnedev/compare-plugin is the source of the latest Compare v2.0 because I supported it but Compare plugin’s official project page is still https://github.com/jsleroy/compare-plugin. I am not supporting Compare anymore.
                    https://github.com/pnedev/compare-plugin is the home of the new compare plugin I’m working on. It is not released yet.

                    Hi @Alan-Kilborn ,

                    If you don’t like what was replaced, simply Undo the replacement.

                    Unfortunatelly Compare plugin (v2.0 and all prior versions) clears the Undo history due to its internal alignment implementation. Do not rely on Undo after compare with Compare plugin.
                    In the steps you mention (if the file is not saved) the user will need to reload the file from disk to get the state before the replacement.

                    BR

                    Alan KilbornA 1 Reply Last reply Reply Quote 3
                    • Alan KilbornA
                      Alan Kilborn @pnedev
                      last edited by

                      @pnedev said in Can I see a preview for the result of the "replace" form?:

                      Unfortunatelly Compare plugin (v2.0 and all prior versions) clears the Undo history due to its internal alignment implementation. Do not rely on Undo after compare with Compare plugin.
                      In the steps you mention (if the file is not saved) the user will need to reload the file from disk to get the state before the replacement.

                      Ah, I did not know that.
                      It makes the technique a little less useful, but it still has value.

                      Isn’t there another way for the plugin to do what it needs to without messing with the undo history?

                      If you release your version of the plugin, maybe give it a slightly different name to prevent confusion.

                      1 Reply Last reply Reply Quote 2
                      • pnedevP
                        pnedev
                        last edited by

                        @Alan-Kilborn said in Can I see a preview for the result of the "replace" form?:

                        Isn’t there another way for the plugin to do what it needs to without messing with the undo history?
                        If you release your version of the plugin, maybe give it a slightly different name to prevent confusion.

                        Unfortunately Compare plugin cannot circumvent the Undo history clean-up.

                        The new plugin will be called ComparePlus, it has completely new alignment approach and keeps the Undo intact.
                        It is almost finished but sadly that’s its state for about 8 months now. I’m not sure when exactly it will be ready.

                        BR

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