From: Bernard D. <bde...@or...> - 2018-12-19 08:57:08
|
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 |