Recent

Author Topic: formatting option for spaces after comma and semicolon  (Read 3134 times)

brandnewmember

  • Newbie
  • Posts: 5
formatting option for spaces after comma and semicolon
« on: September 21, 2016, 12:09:24 pm »
Hello!

The Jedi Code Formatter puts one space character at these places.
Is there any option to control space count at the following places (procedure calls and declarations)?

AddLVItemCol(LI,<here>C,<here>format(FS,<here>V));

procedure TfrmMain.AddLVItemCol(LI : TListItem;<here>C : boolean;<here>const FS : TLotteryString;<here>const V : array of const);

Thanks
« Last Edit: September 21, 2016, 05:02:51 pm by brandnewmember »

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: formatting option for spaces after comma and semicolon
« Reply #1 on: September 21, 2016, 12:54:05 pm »
Lazarus itself is able to do that.  Look at the Lazarus' configuration dialog, Codetools > Space section.
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

brandnewmember

  • Newbie
  • Posts: 5
Re: formatting option for spaces after comma and semicolon
« Reply #2 on: September 21, 2016, 03:26:55 pm »
Thank you for your answer! But how can I apply those settings to a specific part of the  source code or the entire file?

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: formatting option for spaces after comma and semicolon
« Reply #3 on: September 21, 2016, 03:37:37 pm »
There are two different approaches here.

Codetools options mostly affect 'live' code as you type it (though the Code Browser has some reformatting functionality).

The Jedi formatter processes persistent (already typed) code, to massage it into the format you desire. However, it may not have a feature you desire, and it does not know about some syntaxes  such as FPC's generics convention (which was actually introduced before Delphi's).
Someone who uses and knows the Jedi formatter would know if what you want is possible, and if so could point you in the right direction.

brandnewmember

  • Newbie
  • Posts: 5
Re: formatting option for spaces after comma and semicolon
« Reply #4 on: September 21, 2016, 05:31:42 pm »
OK, thank you!

 

TinyPortal © 2005-2018