Coding Color lazarus / 9-Editor ---------------------------------------------------------------------- RAW · 2017-02-13 01:00 Just for fun: What EditorCodeColor do you use ??? On a Windows system it's easy to import *.xml ColorSchemes, just in case someone never tried this: Just copy the *.xml files to "C:\Users\USER\AppData\Local\lazarus\userschemes"... And if there is no "userschemes" folder then create one. After that start or restart LAZARUS and check the dropdown menu (EDITOR: PREFERENCES). Should be visible between the default presets... (DEFAULT, DELPHI, OCEAN ...) If you use a SECONDARY INSTALLATION then you could find the "CONFIG"-path in the installation directory: lazarus.cfg (same DIR as lazarus.exe). And yes, I like big bold fonts... this is TERMINAL Size 13... probably not the best font in the world, but I can't help myself I like the look... it looks somewhat heavy on a big monitor... ---------------------------------------------------------------------- Akira1364 · 2017-02-13 01:28 I just use the defaults, but with font size 9 instead of 10, and a margin width of 130 instead of the default 80 (because it's not 1983 anymore, you know.) ---------------------------------------------------------------------- RAW · 2017-02-13 02:20 Quote...and a margin width of 130 instead of the default 80 (because it's not 1983 anymore, you know.) Good Tip... I just googled it's 2017, but I guess Google tricked me... I like 80 if possible... could be useful on older Notebooks with 1280x800 or something like that... ---------------------------------------------------------------------- Akira1364 · 2017-02-13 02:22 1280x800? I don't think that's a thing. Also a pixel width of 1280 could easily handle far more than a margin width of 80. ---------------------------------------------------------------------- Martin_fr · 2017-02-13 03:25 just for reference: http://wiki.lazarus.freepascal.org/UserSuppliedSchemeSettings ---------------------------------------------------------------------- Pascal · 2017-02-13 04:42 Have you tried this font http://sourcefoundry.org/hack/. It's best for coding. Never mix up O and 0 again. ---------------------------------------------------------------------- RAW · 2017-02-13 21:27 @Pascal Thanks for the tip. In my case I can't because "o" or "O" looks totally different in comparsion to "0" and the color is different. ---------------------------------------------------------------------- DL7BJ · 2017-03-16 22:25 I like this font https://github.com/belluzj/fantasque-sans Especially for vim which I use for C/C++, Scripting, Python ... ---------------------------------------------------------------------- marcov · 2017-03-17 03:43 Pascal classic of course on a 1080x1920 (portrait mode) monitor ---------------------------------------------------------------------- Thaddy · 2017-03-17 06:12 When code compiles but I don't really want to look at it: ---------------------------------------------------------------------- Kays · 2017-03-17 08:56 Quote from: Akira1364 on February 13, 2017, 03:22:56 am1280x800? I don't think that's a thing. Also a pixel width of 1280 could easily handle far more than a margin width of 80. Err, yeahah, I'm currently using it right now: Code: [Select]$ xrandr | head -n3 Screen 0: minimum 8 x 8, current 1280 x 1520, maximum 32767 x 32767 LVDS1 connected 1280x800+0+720 (normal left inverted right x axis y axis) 261mm x 163mm    1280x800      60.05*+[search and insert sketch of that incredibly tall CRT here] However, I do not use Lazaraus. My projects are quite small so vim(1), a screen(1) session and manually invoking fpc(1) as needed is sufficient for me. Quote from: Akira1364 on February 13, 2017, 02:28:26 am[…] (because it's not 1983 anymore, you know.)Touché. ---------------------------------------------------------------------- RAW · 2017-03-17 15:25 @DL7BJ: Thanks for the tip... Inside Lazarus it looks weird... maybe I installed the wrong font or the font really needs AA. ---------------------------------------------------------------------- knuckles · 2017-03-31 22:45 My eyes are bleeding  I prefer good old Delphi 7 style, I find having a dark themed editor and then switching to light colored windows hurts my eyes really bad but each to there own ---------------------------------------------------------------------- creaothceann · 2017-04-15 00:25 Classic Turbo Pascal colors with some modifications. - font: http://www.fixedsysexcelsior.com - background: 0/0/160 - current line background: 0/0/255 - default text, numbers, strings: 255/255/0 - reserved words, symbols, case labels: 255/255/255 - compiler directive: 255/0/255 - comments: 0/255/255 - assembler: 0/255/0 - tab size: 8 characters, not replaced by spaces, "cursor skips tabs" enabled - screen size: full screen 1920x1080; other IDE windows are on a second monitor to the left ---------------------------------------------------------------------- RAW · 2017-04-18 01:24 @creaothceann, @marcov I'm not a big fan of the yellow color...  Maybe I should try 1080x1920 too... never thought about it... on the next boring sunday... @knuckles I use a dark classic theme so for me it's not a problem... Sometimes I use a middleGREEN classic theme (it's better for surfing the net). I'm not a big fan of the AERO or STANDARD W7 Theme. I normally disable Designs, AeLookupSvc and UxSms. Normally I don't need them... Sometimes I need to light up the clBlue to something like 0,80,255... It depends on the monitor. My older Notebooks display the clBlue a lot different, much brighter than my new monitor... ---------------------------------------------------------------------- Graeme · 2017-04-18 08:42 I use Solarized Dark (in bright rooms I might switch to Solarized Light) - themes I created based on the official Solarized website reference color values. But mostly I use my own custom Pascal Dark theme (which I've been using for over a decade). My font is always "Raize" (a bitmapped font), but if I need to work with Unicode glyphs (hardly ever in code), then I'll temporarily switch to "DejaVu Sans Mono" I can't code with a white background - it is just way to bright to stare at all day long. ---------------------------------------------------------------------- Thaddy · 2017-04-18 08:51 I like the brown on that,but it would be better with a would stain, like mahogany. Or rosewood. ---------------------------------------------------------------------- Graeme · 2017-04-18 09:14 :-)  The only thought I have it was to choose something with even contrast across all the source code, and something I can stare at for 14 hours a day without inducing headaches. Attached is another screenshot of the Pascal Dark, but this time showing other code elements like IFDEF's, numbers, strings etc. The IFDEF's might be a bit on the bright side, but luckily my code normally contains very little IFDEF's. The screenshot was from MSEide. See "pascal_dark_2.png". Under Lazarus IDE I also have the current editor line in a different color (the background color of the Solarized Dark theme), and inactive code (eg: none active IFDEF's) is a dimmed color of the original. Okay, a picture speaks a thousand works, see "pascal_dark_3.png". ---------------------------------------------------------------------- Zoran · 2017-04-18 11:14 Please donate shown colour schemes to http://wiki.lazarus.freepascal.org/UserSuppliedSchemeSettings. ---------------------------------------------------------------------- creaothceann · 2017-04-18 16:44 Quote from: Zoran on April 18, 2017, 01:14:32 pmPlease donate shown colour schemes to http://wiki.lazarus.freepascal.org/UserSuppliedSchemeSettings. Uploaded mine. ---------------------------------------------------------------------- Thaddy · 2017-04-18 20:23 Hm 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 try....// visibleignore......end;Pick a colour ( or color you Trump's) ---------------------------------------------------------------------- creaothceann · 2017-04-19 18:41 ? ---------------------------------------------------------------------- Graeme · 2017-04-20 09:27 Yeah, I'm also lost by Thaddy's last post. ---------------------------------------------------------------------- Pascal · 2017-04-24 18:40 Inspired by Solarized Dark my editor looks like this now: ---------------------------------------------------------------------- JD · 2017-04-24 20:39 @Pascal Those lines reminds me of the CnWizards plugin for Delphi. How did you do it? JD ---------------------------------------------------------------------- shobits1 · 2017-05-22 21:46 Quote from: JD on April 24, 2017, 10:39:39 pm@Pascal Those lines reminds me of the CnWizards plugin for Delphi. How did you do it? JD I'm also interested to how do it? ---------------------------------------------------------------------- Martin_fr · 2017-05-22 23:44 The guide lines are available in Lazarus 1.8 (download the RC, or use svn). You need to enable them in the options: Editor > Display > Markup and Matches: Outline Thanks to Pascal who provided the patches. ---------------------------------------------------------------------- Pascal · 2017-05-29 14:19 I also adapted the colors in the outline markup for Solarized Dark. So they do not look the same as in trunk or 1.8 RC1. In the furture there will be an extension to the editor options to make the colors customizable by the user. ---------------------------------------------------------------------- RAW · 2017-08-03 00:45 I don't like a white coding background but I experienced problems with PDF-Readers when I use a black or green background color. Maybe it's a rendering problem of LIBRE OFFICE... Anyway to be sure that this cannot happen I decided to do a WhiteBackgroundCodingColor: Really sweet... ---------------------------------------------------------------------- apexcol · 2017-12-14 21:57 I think user ought to have the possibility to change the solid pattern also, for instance, dotted would look better even for readability ---------------------------------------------------------------------- Tz · 2019-12-22 15:27 After reading this https://forum.lazarus.freepascal.org/index.php/topic,47455.0.html? I decided to toying around some color scheme Today I should care for my eyes, using night mode monitor and blue light glasses seem not enough. I am not color expert, but this references are usefull https://ethanschoonover.com/solarized/ https://jfly.uni-koeln.de/color/ https://www.color-blindness.com/coblis-color-blindness-simulator/ Using Fira Code Font https://github.com/tonsky/FiraCode for half screen got 120 column and about 50 row at 9 Editor font size 2 Extra line spacing but ligatures only work on comment block for user defined markup, I add list Noise with item _ and ; Foreground color set to #586E75 with alpha 200, still need adjustment, dont have the right color yet. I use italic only for directive to distiguish it from comment, for old style comment seem make sense today (*     json := { "key" : "value", "ok" : true }   more curly braces     ls -l | less    | vs /  in italic ??? *) Here it is, a dejavu with TP6 ---------------------------------------------------------------------- Martin_fr · 2019-12-22 15:57 Quote from: Tz on December 22, 2019, 04:27:55 pmAfter reading this https://forum.lazarus.freepascal.org/index.php/topic,47455.0.html? I decided to toying around some color scheme https://wiki.lazarus.freepascal.org/UserSuppliedSchemeSettings ---------------------------------------------------------------------- Tz · 2019-12-24 06:01 @Martin_fr Yes I have read it in the post, and try "Solarized2 day version" for testing. strange thing for ligatures, currently working now, but I feel loose connection between what I read and what I type. I am curious about margin width, and I tested for 120 on a paper, and look like below 8 point is too small. Back then when I was newbie, I like using 132 condensed dot matrix font, because I am using a lot space, one space between braces () [], tab 3 size, and a lot lot if statement  I wonder what are lines between 80 and 120, so I made a simple program. The result from svn (*.pas, *.pp, *.inc) Total File : 15944 Total Line : 6001723 % : 100.00 Total  80  : 5385170 % :  89.73 Total 100  : 420548 % : 7.01     ??? Total 120  : 77719 % : 1.29      ??? Total GT   : 118286 % : 1.97 Not sure for now for that 8%, but may be I should create another topic. ---------------------------------------------------------------------- Martin_fr · 2019-12-24 11:56 I haven't tested that font..... Quote from: Tz on December 24, 2019, 07:01:49 amstrange thing for ligatures, currently working now, but I feel loose connection between what I read and what I type. I haven't tested the font, but ligatures may fail... Ligatures do not change what SynEdit sees. It just changes the Glyph that is painted. SynEdit will be completely in the dark about it. 1) SynEdit enforces monospaced. So a ligature for ">=", must have the same width as 2 chars. (When printing black and white on paper, you may get away with less space.) 2) When you select text, and half of the >= is selected (one char is, the other is not) then the chars will display individually, because SynEdit paints them separately. Whenever the color (including bold, italic, underline, frame, ...) of text changes in a line, SynEdit will calculate where a strict monospaced font would be at that time (e.g. 5 char = 4*x // 4 chars of width x before). If the font did not output the first 4 chars according to that rule, then it gets ugly. QuoteBack then when I was newbie, I like using 132 condensed dot matrix font, because I am using a lot space, one space between braces () [], tab 3 size, and a lot lot if statement  You can set the "Extra character spacing" (Tools > Options > Editor > Display) to a negative value.... But it will get hard to read. If you want to print sources, you can export as HTML. That will keep colors, and a html viewer probably can wrap the lines before printing. The current abilities to print sources from the IDE are unfortunately rather limited. About your statistics: I have often seen comments to go past the 80 char border. But sometimes regular sources do to. The 80 char rule originated in the early days, when graphic cards had a textmode with 80x25 chars on the screen (in the days of dos). ---------------------------------------------------------------------- lucamar · 2019-12-24 12:20 Quote from: Martin_fr on December 24, 2019, 12:56:00 pmThe 80 char rule originated in the early days, when graphic cards had a textmode with 80x25 chars on the screen (in the days of dos). Rather earlier, I think: wasn't it the line-length of  punch-cards and teletypes? I kind of remember COBOL and Fortran coding-sheets having that line-lenght ---------------------------------------------------------------------- MarkMLl · 2019-12-24 12:28 Quote from: Martin_fr on December 24, 2019, 12:56:00 pmAbout your statistics: I have often seen comments to go past the 80 char border. But sometimes regular sources do to. The 80 char rule originated in the early days, when graphic cards had a textmode with 80x25 chars on the screen (in the days of dos). I've never seen any firm recommendation regarding line length in standards documents. The only thing I have seen is a "MUST" in one of the original RFCs limiting email lines to 78 chars (plus the mandatory CR LF making 80), presumably in case protocol converters mandated a maximum length or mainframe-based store-and-forward used files derived from punched card images. I wonder what's reasonable these days: a 1200-pixel width with 8+1 character width which magically comes out to 133 chars? :-) MarkMLl ---------------------------------------------------------------------- lucamar · 2019-12-24 13:46 Quote from: MarkMLl on December 24, 2019, 01:28:42 pmI've never seen any firm recommendation regarding line length in standards documents. For normal-sized paper the maximum lenght is still around 80 characters, which corresponds (roughly for monospaced fonts) to the old 10 CPI (aprox. a 12pt font) on an 11' wide sheet (or 210mm. A4 sheet) QuoteI wonder what's reasonable these days: a 1200-pixel width with 8+1 character width which magically comes out to 133 chars? :-) It may sound strange but except on very big monitors I still find 80 to 90 characters max. the best width. The nowadays "standard" 128 chars. are way too small on a normal 15" or 17" one. YMMV, of course; it's always a subjective issue and in my case (and most people of my generation) it's compounded by having bad-sight, due probably to having spent almost my whole life in front of a monitor What I've found is that if you get a bigger monitor, it almost always ends up placed farther (to be able to see most of it in your visual field), so the size/resolution gain is counterchecked by the increased distance. ---------------------------------------------------------------------- Tz · 2019-12-27 04:26 @Martin_fr,  it works  I like coding with a book and paper as a reference, a hardcopy, in today become much more use of softcopy (ebook, chm, pdf, webbrowser, notepad, and writer). Pair in my monitor left side my code editor, and my right side is my softcopy. I like non docking Lazarus IDE, so I can pair with lhelp. For the 8%, here the sample file fpc/packages/fcl-passrc/src/pasresolver.pp -> a single line comment, parameter list fpc/packages/googleapi/src/googlecompute.pp -> identifier fpc/packages/googleapi/src/googledfareporting.pp -> identifier too long fpc/packages/odata/src/sharepoint.pp -> identifier too long fpc/rtl/android/jvm/androidr14.inc -> class name and property fpc/rtl/java/jdk15.inc -> name = value alignment fpc/packages/rtl-unicode/src/collations/collation_zh_le.inc -> const look like spreadsheet 120 just because of this?   TMicrosoft_SharePoint_Marketplace_CorporateCuratedGallerySPCorporate CuratedGallerySettingsBase = class;   TMicrosoft_SharePoint_Marketplace_CorporateCuratedGallerySPCorporate CuratedGallerySettingsBaseArray = Array of TMicrosoft_SharePoint_Marke tplace_CorporateCuratedGallerySPCorporateCuratedGallerySettingsBase;   TMicrosoft_SharePoint_Marketplace_CorporateCuratedGallerySPCorporate CuratedGallerySettingsFactory = class;   TMicrosoft_SharePoint_Marketplace_CorporateCuratedGallerySPCorporate CuratedGallerySettingsFactoryArray = Array of TMicrosoft_SharePoint_Ma rketplace_CorporateCuratedGallerySPCorporateCuratedGallerySettingsFact ory;   For good advice https://wiki.freepascal.org/Identifier I check this font https://typeof.net/Iosevka/ can be fit for 120 at 8 on A4 paper Also try DejaVu Sans Mono 10 on A4 landscape after some die trying, the rigth side full of more space. @lucamar yes! I am very agree, 80 margin still the best option. At least you have Full HD resolution for screen, but in 13" - 15" for me still look so small. Also if using 7" tablet, A4 dont look good, maybe A5 80 column using Iosevka 9. Still can for full screen on 13", but I would rather scroll vertically. My current path is choose to formatting code 1. aligment of parameter 2. constant string, string resouce 3. property May be it can reduce from 8% to 1%, with consequence of more line. And No!, for LOC. http://wiki.c2.com/?LinesOfCode ---------------------------------------------------------------------- del · 2020-01-12 04:01 IDE theme is ObjectPascal - Default, but editor has custom syntax highlighting with a pure black background. Font is Linux "Monospace". Comments and whitespace symbols are "dimmed". And the config is backed up. I've had problems with Dark IDE themes  before - not necessarily with Lazarus - so I usually go with default, and just modify the syntax highlighting.