Now that I have a widescreen monitor, I can't seem to find a way to make the Delphi IDE wrap generated code at anything other than 80 chars. I've set the "Right margin" setting in the IDE Editor options to a high value, but it doesn't appear to affect the wrapping that happens on generated events and code lines. Does anyone know of a way to set it? Perhaps a hidden registry setting? Alternately, are there any IDE addons that do this? Thanks for any suggestions!
views:
201answers:
3Those events which are inserted using code templates can be modified by editing the template files (they are xml documents in the C:\Program Files\CodeGear\RAD Studio\xxxx\ObjRepos\Code_Templates\Delphi directory)
As far as I know there is no plugin or setting to change where generated code wraps outside of templates.
In D2007 and up, setting Tools|Options|Editor Options|Display|Right margin to 100 causes the event generated from the Object Inspector to wrap after the 100th character...
I just tried :
procedure TForm7.AVeryLongMethodNameqwertyuiopasdfghjklzxcvbnm(Sender: TObject; Shift: TShiftState;
MousePos: TPoint; var Handled: Boolean);
Until the IDE offers a little more flexibility or configuration in this area, one option might be to use a code formatting tool to tidy up the code inserted by the IDE.
Delphi 2010 will come with a highly configurable code formatter "built in", but there are other alternatives available now. One which comes with an IDE plug-in is the JEDI Code Formatter, and the information pages for that contain references to other alternatives which may be of help even if the JEDI solution itself is not.