Recent

Author Topic: Simulating a "Zen mode" in the code editor. [SOLVED]  (Read 457 times)

carl_caulkett

  • Hero Member
  • *****
  • Posts: 614
Simulating a "Zen mode" in the code editor. [SOLVED]
« on: October 08, 2024, 08:07:13 pm »
* Mac Mini M1
* macOS 14.6.1
* Lazarus 3.99
* FPC 3.3.1

I've used Keyboard Maestro to map the Ctrl-Z keystroke onto Fn-F (the standard key. mappings didn't permit this!), which means I can toggle between full view and standard view in a much more comfortable way. However, what would be really great is to alter the width of the code gutter (see highlight in the attached image).

Ideally I would have a standard width gutter in standard view and the larger gutter width in the "Zen mode". I'm sure this is possible but I'd rather do it without messing with the IDE Internals (how ever much fun that may be ;)).

Any ideas, anyone?
« Last Edit: October 10, 2024, 12:58:17 am by carl_caulkett »
"It builds... ship it!"

zeljko

  • Hero Member
  • *****
  • Posts: 1653
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Simulating a "Zen mode" in the code editor.
« Reply #1 on: October 08, 2024, 08:31:54 pm »
Tools -> Options -> Display ?

carl_caulkett

  • Hero Member
  • *****
  • Posts: 614
Re: Simulating a "Zen mode" in the code editor.
« Reply #2 on: October 08, 2024, 08:40:47 pm »
Thanks! It seem I can bump up the margin on 4 of the parameters, each by an additional 9 pixels. That's a total of 36 pixels! Not ideal, but it's the best that can be achieved easily ;)
"It builds... ship it!"

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10462
  • Debugger - SynEdit - and more
    • wiki
Re: Simulating a "Zen mode" in the code editor.
« Reply #3 on: October 08, 2024, 09:40:50 pm »
Quote
Ideally I would have a standard width gutter in standard view and the larger gutter width in the "Zen mode".
There is only one setting. That setting will be applied for any size of the window.

Quote
Thanks! It seem I can bump up the margin on 4 of the parameters, each by an additional 9 pixels. That's a total of 36 pixels! Not ideal, but it's the best that can be achieved easily

The right margin goes up to 25 each. And you can change the actual content width.

carl_caulkett

  • Hero Member
  • *****
  • Posts: 614
Re: Simulating a "Zen mode" in the code editor.
« Reply #4 on: October 09, 2024, 04:04:11 pm »
Quote
Ideally I would have a standard width gutter in standard view and the larger gutter width in the "Zen mode".
There is only one setting. That setting will be applied for any size of the window.

Quote
Thanks! It seem I can bump up the margin on 4 of the parameters, each by an additional 9 pixels. That's a total of 36 pixels! Not ideal, but it's the best that can be achieved easily

The right margin goes up to 25 each. And you can change the actual content width.

These are the settings I'm changing. The "Marks", "Line Number", "Changes" and "Folding" parameters all have a maximum of 10 pixels, unless I'm missing something!
« Last Edit: October 09, 2024, 04:11:36 pm by carl_caulkett »
"It builds... ship it!"

carl_caulkett

  • Hero Member
  • *****
  • Posts: 614
Re: Simulating a "Zen mode" in the code editor.
« Reply #5 on: October 09, 2024, 04:52:30 pm »
@Martin_fr I did, indeed, miss something. I can alter the width parameter! Dunno how I missed that. That's the result of late night tweaking... That's my excuse and I'm sticking to it  ;)
"It builds... ship it!"

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10462
  • Debugger - SynEdit - and more
    • wiki
Re: Simulating a "Zen mode" in the code editor.
« Reply #6 on: October 09, 2024, 05:01:01 pm »
These are the settings I'm changing. The "Marks", "Line Number", "Changes" and "Folding" parameters all have a maximum of 10 pixels, unless I'm missing something!

Each gutter part has 2 fields for margin (left/right). The right one goes up to 25.

I don't recall why the limits were set as they are.... I probably couldn't imagine anyone needing more... Still not sure why they are diff for the 2 sites. Maybe just by mistake...

carl_caulkett

  • Hero Member
  • *****
  • Posts: 614
Re: Simulating a "Zen mode" in the code editor.
« Reply #7 on: October 09, 2024, 05:15:23 pm »
These are the settings I'm changing. The "Marks", "Line Number", "Changes" and "Folding" parameters all have a maximum of 10 pixels, unless I'm missing something!

Each gutter part has 2 fields for margin (left/right). The right one goes up to 25.

I don't recall why the limits were set as they are.... I probably couldn't imagine anyone needing more... Still not sure why they are diff for the 2 sites. Maybe just by mistake...

No worries! I was able to change the "Marks" width to 20 and move my Object Inspector to the right hand side of the editor, so that the editor stays constant between views 😍

By the way, if anyone is struggling with the size limit on PNG files when you try to attach a screenshot, this site https://www.iloveimg.com/compress-image/compress-png should help!
"It builds... ship it!"

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10462
  • Debugger - SynEdit - and more
    • wiki
Re: Simulating a "Zen mode" in the code editor.
« Reply #8 on: October 09, 2024, 05:42:29 pm »
ok, now I get what you want to do....

You may try to dock something else there. You could open a unit in a 2nd source-editor (right click the editor tab of the unit). Then when you dock that 2nd editor window, you can close the unit, but keep the window => that can be used a spacer, I guess.

Possible (no idea if it works) you can then save this as a new "desktop setting" (see desktops in the toolbar). Then (if that works) you can quickly toggle between having it and not having it.

 

TinyPortal © 2005-2018