• Login
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.
  • A
    Alan Kilborn @Aliaksandr3by
    last edited by Oct 5, 2020, 11:55 AM

    @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
    • E
      Ekopalypse
      last edited by Ekopalypse Oct 5, 2020, 12:01 PM Oct 5, 2020, 12:01 PM

      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.

      A 1 Reply Last reply Oct 5, 2020, 12:36 PM Reply Quote 1
      • A
        Alan Kilborn @Ekopalypse
        last edited by Oct 5, 2020, 12:36 PM

        @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

        E 1 Reply Last reply Oct 5, 2020, 12:40 PM Reply Quote 1
        • E
          Ekopalypse @Alan Kilborn
          last edited by Ekopalypse Oct 5, 2020, 12:41 PM Oct 5, 2020, 12:40 PM

          @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
          • A
            Alan Kilborn
            last edited by Oct 5, 2020, 12:46 PM

            @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
            • A
              Alan Kilborn
              last edited by Oct 5, 2020, 1:19 PM

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

              Imgur

              1 Reply Last reply Reply Quote 0
              • A
                Alan Kilborn
                last edited by Oct 5, 2020, 1:23 PM

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

                1 Reply Last reply Reply Quote 0
                • P
                  pnedev
                  last edited by Oct 6, 2020, 9:05 AM

                  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

                  A 1 Reply Last reply Oct 6, 2020, 12:04 PM Reply Quote 3
                  • A
                    Alan Kilborn @pnedev
                    last edited by Oct 6, 2020, 12:04 PM

                    @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
                    • P
                      pnedev
                      last edited by Oct 6, 2020, 2:28 PM

                      @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
                      14 out of 14
                      • First post
                        14/14
                        Last post
                      The Community of users of the Notepad++ text editor.
                      Powered by NodeBB | Contributors