Community
    • Login

    Good way to visualize replacement?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    6 Posts 4 Posters 2.9k 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
      last edited by

      Is there a good way to visualize a replacement operation, like a replace all? I know I can UNDO a replacement if I don’t like it, but after a replacement operation, and especially when regular expressions are involved, it would be nice to see what changed. Ideas?

      Claudia FrankC Scott SumnerS 2 Replies Last reply Reply Quote 3
      • Claudia FrankC
        Claudia Frank @Alan Kilborn
        last edited by

        @Alan-Kilborn

        I would love to see this as a new feature too, especially when doing replace all.
        Afaik, at the moment it isn’t possible to do it with builtin features.

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • MAPJe71M
          MAPJe71
          last edited by

          There’s the Change Markers plugin (which requires the SciMarkerSymbol and Plugin Marker Margin plugins).

          1 Reply Last reply Reply Quote 0
          • Scott SumnerS
            Scott Sumner @Alan Kilborn
            last edited by

            @Alan-Kilborn

            How about this workflow?:

            • Save your file
            • Do your Replace All operation
            • Use the Compare plugin and execute a Diff since last Save operation
            • Move thru the differences using the Compare plugin’s navigation keys
            • If you decide you like the results of the Replace All, close the compare, keep going with your work; If not, still close the compare but then invoke Undo on your document…
            Alan KilbornA 1 Reply Last reply Reply Quote 1
            • Alan KilbornA
              Alan Kilborn @Scott Sumner
              last edited by

              @Scott-Sumner

              Well the basic idea is interesting but I’ve never liked the compare plugin…it changes my filenames around and even when I close a comparison it leaves some colors in my documents (even documents that weren’t involved in the compare! Yuck!). I use Beyond Compare for all of my file comparison needs.

              Scott SumnerS 1 Reply Last reply Reply Quote 0
              • Scott SumnerS
                Scott Sumner @Alan Kilborn
                last edited by

                @Alan-Kilborn

                leaves some colors in my documents (even documents that weren’t involved in the compare! Yuck!)

                Maybe the Compare plugin is using some “indicators” that you are using in some other way–so that there’s a conflict? Check other plugins, maybe, for overlap?

                It seems like it would be fairly easy to write a Pythonscript to mimic the Compare plugin’s Diff since last save functionality, using Beyond Compare instead, something like this as the last lines of a script:

                with open(unsaved_changes_file_path, 'w') as f: f.write(editor.getText())
                subprocess.Popen([ beyond_compare_prog_path, unsaved_changes_file_path, notepad.getCurrentFilename() ])
                

                I think I remember that you are familiar with Pythonscript so I’ll leave completing the whole to you…

                @MAPJe71 , I think the original request takes it to a level beyond what “change markers” can provide.

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