Author Topic: Macros that invoke Beautify  (Read 6215 times)

tlholaday

  • Community Member
  • Posts: 15
  • Hero Points: 2
  • Text text wonderful text
Macros that invoke Beautify
« 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
  • Click Tools | Beautify
  • pick XML off the language list
  • click OK
  • accept the defaults
  • click Beautify
  • click Save
  • Close (and move to next buffer)

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?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4741
  • Hero Points: 383
Re: Macros that invoke Beautify
« Reply #1 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.

hs2

  • Senior Community Member
  • Posts: 2737
  • Hero Points: 288
Re: Macros that invoke Beautify
« Reply #2 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 ?

hs2

  • Senior Community Member
  • Posts: 2737
  • Hero Points: 288
Re: Macros that invoke Beautify
« Reply #3 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