Good way to visualize replacement?
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?
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.
There’s the Change Markers plugin (which requires the SciMarkerSymbol and Plugin Marker Margin plugins).
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…
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.
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.