From: Greg D. <gre...@in...> - 2018-12-19 17:03:16
|
I knew there was something already in the app which met my needs - my brain wasn't connecting the word "filters" with a search/replace, but it seems this is exactly what I want! Thanks! On 12/19/18 3:56 AM, Bernard Desgraupes wrote: > Hi Greg, > > I think that the Filters Menu is your friend. This is exactly what it is about. > You create a filter which is a sequence of search/replace commands (textual or regexp) and then apply the filter to the current window, or only a selection, or even on a directory. > Filters are named and recorded, so they can be reused. Alternatively there is Temporary filter. > See the documentation here: > https://alphacocoa.sourceforge.io/FiltersMenuHelp.html > > Alpha ships with a set of basic filters which can serve as examples. > > Cheers, > Bernard > > > Le 19 déc. 2018 à 09:47, Greg Dunn <gre...@in...> a écrit : > >> It seems that the more I use AlphaCocoa, the more I find interesting and useful features to speed my workflow. However, I'm a bit embarrassed to note >> that there's something I do frequently that I haven't been able to find a shortcut for, and it's likely my lack of experience with the program: >> >> Many times, when editing a program or even an informational text document, I need to re-format and tweak the document in specific ways. This entails >> making several global search/replaces, sequentially, because the state of the file is such that a single replace command (even with regex) can't make >> the necessary changes; i.e., the search/replace result is dependent somewhat on the result of the prior search/replace on the global file contents. >> The sequence of commands is the same, but they must be executed one after the other rather than as a single command. >> >> Of course, I can enter the details in the search dialog, and then perform another dialog, and... but since I know the exact sequence which needs to >> be performed, I'd like to be able to create a macro set of commands to do this rather than type them all in manually. Editors like vi can, for >> example, execute multiple commands separated by ";" and can even source them from an external script. >> >> I know this could be done via AppleScript, but I was wondering if there's a method entirely self-contained in Alpha to handle it? I see a 'macro' >> feature and am able to record/save a macro, but it doesn't seem to capture sequential search/replace commands with the parameters I entered. >> >> Maybe I'm going about this the wrong way. Have I overlooked something really obvious? It wouldn't be the first time. ;-) >> >> >> -- >> | Greg Dunn | And all you touch and all you see | >> | gre...@in... | Is all your life will ever be. | >> | The Sultan of Slack(tm) | Pink Floyd | >> | http://www.indy.net/~gregdunn/ | | >> >> >> _______________________________________________ >> AlphaCocoa-devel mailing list >> Alp...@li... >> https://lists.sourceforge.net/lists/listinfo/alphacocoa-devel > > -- | Greg Dunn | People are so conditioned to take | | gre...@in... | sides that a balanced analysis | | The Sultan of Slack(tm) | looks to them like hatred. | | http://www.indy.net/~gregdunn/ | Scott Adams | |