[SOLVED] How to delete blank lines wihin procedure? lazarus / 9-Editor ---------------------------------------------------------------------- Elmug · 2011-08-14 03:46 Dear forum people, I went to the Environment Options of the editor and could not figure out how to reformat the code so that there be no blank lines withing a procedure. That's when I press Ctrl-D to do a reformat, by the way. I still want one line between procedures. The reason is while coding, I use blank lines to visualize what matters. But thereafter, when code is OK, I'd like to have those blank lines removed. Thanks for any help afforded. ---------------------------------------------------------------------- BlueIcaro · 2011-08-14 07:13 Hello, I use blank lines, and other kind of marks, as you. But I don't remove it. They don't affect to your exe file (size, etc.). But After a time, if you review your code you will find usefull your marks. So I think it's no a problem. /BlueIcaro ---------------------------------------------------------------------- Elmug · 2011-08-14 09:38 Quote from: BlueIcaro on August 14, 2011, 09:13:59 amHello, I use blank lines, and other kind of marks, as you. But I don't remove it. They don't affect to your exe file (size, etc.). But After a time, if you review your code you will find usefull your marks. So I think it's no a problem. /BlueIcaro Thanks, I still would like to remove the blank lines, except between procedures. From the so many options having to do with blank lines, in the Environment, I thought this should be possible, but just don't seem to figure how. If any one knows how to do that, would appreciate it. ---------------------------------------------------------------------- Leledumbo · 2011-08-14 15:22 Environment Options->JCF Format Settings->Blank Lines ---------------------------------------------------------------------- Arbee · 2011-08-14 15:42 I tend to agree with BlueIcaro. You can not have too many blank lines in your code.  Plus lots of comments of course. Make your source code as bloated as possible with comments and blank lines.  There will come a day you"ll be happy you did. ---------------------------------------------------------------------- Elmug · 2011-08-14 22:56 Quote from: Arbee on August 14, 2011, 05:42:18 pmI tend to agree with BlueIcaro. You can not have too many blank lines in your code.  Plus lots of comments of course. Make your source code as bloated as possible with comments and blank lines.  There will come a day you"ll be happy you did. Hi Arbee, thanks for your comment. I always used blank lines for intentions as you suggest. Except that when the project grows, and I am using copy paste, checks, and other things, I have found blank lines have gotten me confused as to where a procedure ends. So, now, when I want blank lines, if I really need them, I put {} instead of a blank line. That way, I have one continuous block for a procedure and makes my checking things out, finding things, and so forth. That's why I want to get rid of the blank lines, and only have one blank line between procedures. I can delete the blank lines manually, of course, and that's what I've been doing. But am asking specifically how to have this done by the editor facility. Thanks! ---------------------------------------------------------------------- Elmug · 2011-08-14 23:00 Quote from: Leledumbo on August 14, 2011, 05:22:09 pmEnvironment Options->JCF Format Settings->Blank Lines HI and thanks for the reply, Leledumbo, but it is precisely from trying there that I am asking. All the options on blank lines don't seem to allow me to do what I describe. I hope someone has actually managed to do it and would share the settings.  I am on Windows XP. ---------------------------------------------------------------------- Scoops · 2011-08-15 03:37 (Taken from Jedi Code Formatter help file) Consecutive blank lines This will remove blank lines when the limit limber of blank lines in a row is encountered anywhere in the source code. I recommend a value of 3 or 4 for this setting - less than that and you can't use several repeated blank lines for spacing. There is a minimum of 2 on this value. Minimum of 2, maybe that's your problem. ---------------------------------------------------------------------- Elmug · 2011-08-15 06:01 Quote from: Scoops on August 15, 2011, 05:37:08 am(Taken from Jedi Code Formatter help file) Consecutive blank lines This will remove blank lines when the limit limber of blank lines in a row is encountered anywhere in the source code. I recommend a value of 3 or 4 for this setting - less than that and you can't use several repeated blank lines for spacing. There is a minimum of 2 on this value. Minimum of 2, maybe that's your problem. Thanks Scoop, It seems that'd be the problem. However, the environment settings have a parameter called Max consecutive blank lines anywhere (not Minimum) as you say. And if I set that value to 1, it seems to take it but it actually does not take it. But, even if I could set it to 1, then I would still have ONE blank line within my procedures, whereas what I would like to have is now that I realize it is more like a new option: "Max number of blank lines within procedures", and I would set that to zero. So I am gradually achieving that manually. Thanks!