Artistic Style on selection

Artistic Style on selection

79
Advanced UserAdvanced User
79

    Apr 04, 2012#1

    Reindent Selection does very badly on pretty much any C or C++ code I feed it (it likes to keep pushing code farther and farther to the right as it proceeds down the selection - I've ask IDM support for help with that).

    So I thought to try the Artistic Style gadget, but it seems that the Artistic Style tool works only on the entire file - does anyone have information on how I can set up a custom tool to run it only on a selection?

    6,686586
    Grand MasterGrand Master
    6,686586

      Apr 05, 2012#2

      As you can read in Artistic Style documentation this tool is designed for being executed on source files and has no option to run on an input byte stream. Therefore you need to copy a selection temporarily to a new file, save this file with any name like Temp.c, run Artistic Style, copy the result, delete the file and paste the reformatted text over the selection in real source file.

      Please note that Artistic Style installed with UE / UES has the version 1.22. There are lots of changes in options in comparison to v2.02. I have started writing an email with the suggestion to update Artistic Style to v2.02 and what must be changed in UltraEdit/UEStudio (code, dialog, help) to support v2.02 of Artistic Style. Because there are so many changes which must be taken into account I have not yet finished this email.

      79
      Advanced UserAdvanced User
      79

        Apr 05, 2012#3

        Thanks for the info. I was hoping there would be a simple command line I could drop in, but sounds like a little bit of scripting will do the trick.