SlickEdit Community

SlickEdit Product Discussion => SlickEditĀ® => Slick-CĀ® Macro Programming => Topic started by: tlholaday on September 26, 2006, 01:32:15 pm

Title: Macros that invoke Beautify
Post by: tlholaday on September 26, 2006, 01:32:15 pm
I have one hundred fifty short XML files to beautify (and print).  I'd rather press a macro key than

I record all that, but when I press run-last-macro, macro execution stops with the language list.  What do the macro wizards do?

Alternatively, is there a "batch beautify" command that will accept a list of files (or a directory and wildcard) and beautify them in place?
Title: Re: Macros that invoke Beautify
Post by: Clark on September 26, 2006, 02:29:26 pm
The xml_beautify command will beautify the current XML file without prompting.  It uses what ever your last settings were.

You can use the SlickEdit file manager to repeat this command on the selected files.  It does prompt whether you wish to save the files.  From the SlickEdit command line use the dir or list commands to list files.  (ex "dir *.xml") .  Space bar selects files (puts a '>' at start of line).  Right click for the file manager context menu.  After you have selected the files you wish to operate on, press Alt+Shift+R to repeat a command on the selected files.  Enter "edit_with %f xml_beautify" and press Enter.
Title: Re: Macros that invoke Beautify
Post by: hs2 on September 26, 2006, 03:08:26 pm
Even though the fileman stuff is also a bit dated (as my beloved list-* macros ;)) it's incredibly useful...

Thanks for this hint Clark !

HS2

PS: I'm a bit unsure - you are 'J. Clark Maurer', right ?
Title: Re: Macros that invoke Beautify
Post by: hs2 on September 27, 2006, 08:38:21 am
This is also a clear statement - even the boss is taking care about the community ...
Quite impressive.

HS2