• Login
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.
  • A
    Alan Kilborn
    last edited by Oct 1, 2017, 6:33 PM

    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?

    C S 2 Replies Last reply Oct 2, 2017, 2:18 PM Reply Quote 3
    • C
      Claudia Frank @Alan Kilborn
      last edited by Oct 2, 2017, 2:18 PM

      @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
      • M
        MAPJe71
        last edited by Oct 2, 2017, 3:08 PM

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

        1 Reply Last reply Reply Quote 0
        • S
          Scott Sumner @Alan Kilborn
          last edited by Oct 3, 2017, 2:20 PM

          @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…
          A 1 Reply Last reply Oct 3, 2017, 5:09 PM Reply Quote 1
          • A
            Alan Kilborn @Scott Sumner
            last edited by Oct 3, 2017, 5:09 PM

            @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.

            S 1 Reply Last reply Oct 4, 2017, 12:54 PM Reply Quote 0
            • S
              Scott Sumner @Alan Kilborn
              last edited by Oct 4, 2017, 12:54 PM

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