[Solved] Handling long lines in source with Lazarus IDE editor lazarus / 9-Editor ---------------------------------------------------------------------- markusd112 · 2015-12-27 06:40 Hi, as there any option in the lazarus source code editor to wrap long lines? Or is there any possibility to write a long source code text row in multiplex rows? In other languages it works with an "\" at the end of the line, e.g. char* s = "sfgsdfg \     asdfasdf\     sadfsdf"; Or sometimes with an "_" at the beginning. But in freepascal it doesn't seem to work. Some code editors have an option to handle long lines, which is for me the most comfortable way to code... Thanks, Markus ---------------------------------------------------------------------- balazsszekely · 2015-12-27 06:43 Did you try "+"? Like this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i var  s: string;begin  s := 'aaaaaaaaaaaaaaaaaaa' +        'bbbbbbbbbbbbbbbbbbb' +        'ccccccccccccccccccccccccc';end; ---------------------------------------------------------------------- markusd112 · 2015-12-27 07:14 Great, that works. Thanks!!    But with code lines other than strings (e.g. a long if statement) there is no possibility to handle long lines... Am I right, that there is no switch in the editor preferences to enable some sort of line wrap directly in the editor to handle long lines? Best regards Markus ---------------------------------------------------------------------- taazz · 2015-12-27 07:37 you are in pascal now where the crlf is not considered end of statement eg Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i       if (i = QueryList.Count - 1) or         ((Trim(QueryList[i + 1]) <> '') and  (Pos('/*', Trim(QueryList[i + 1])           ) <> 1) and         (Pos('--', Trim(QueryList[i + 1])) <> 1)) then          Break;  which you can write as Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i       if (i          =          QueryList.Count          -          1)        or          (          (Trim(                QueryList[i + 1]             )           <>           '')           and           (Pos(              '/*',                Trim(                     QueryList[i + 1]                    )                )            <>            1         )           and         (Pos('--', Trim(QueryList[i + 1])) <> 1)) then Break;    with out problems except the readability one that is. ---------------------------------------------------------------------- markusd112 · 2015-12-27 07:40 Ah ok, thanks. Now it is clear to me . I tried the same with a string const (nearly like the C example in the initial post) and that didn't work like this. But with the "+" solution it works for strings. Thanks for your help! Best regards Markus ---------------------------------------------------------------------- Martin_fr · 2015-12-27 09:00 The editor can also auto continue strings or comments. Menu / Tools / options / editor / general / tab + indent. If enabled and you press return while inside a string, it will add   ' + at the end of line, and ' at the start of the new line. ---------------------------------------------------------------------- markusd112 · 2015-12-28 06:06 That's a good hint, thanks. @edit: I tried to find this option, but in my Lazarus IDE it isn't available? The problem is, that I am using the german version of the IDE, so the texts differ. But there seems to bo no such option in the Editor --> general preferences... See attached screenshot... Bye, Markus ---------------------------------------------------------------------- Martin_fr · 2015-12-28 08:31 2nd picture. there are buttons: "ansi", ..., "string"