Forum > Suggestions
SynEdit and gutter — tight in there
furious programming:
Gutter currently has virtually no options to change the spacing in its columns, so the data contained in it is crammed tightly. This makes the data hard to read, especially if the lines have been modified, and there are modification tags in addition to line numbering and code folding frames. Sometimes it's hard for me to clear the line number — I have to look harder (see first attachment). I checked what can be configured and the only thing I found was Gutter separator index, but this option is so poor that it is practically useless.
I would like to be able to set my own offsets/margins for gutter columns. Mainly, I mean moving its components apart, i.e. moving the modification markers away from the line numbers and the modification markers from the code folding frames, but also moving the code itself away from the gutter. You can see the appearance of the gutter that I would be interested in in the second attachment — the gutter is much more readable.
Is there any chance that more sensible margin settings for gutter content will be added to the IDE?
Martin_fr:
Which options exactly are you looking for?
There are 2 ways of "spacing"
- increase the width of each/some gutter parts, and allow the content to use the new width.
- add padding (and thereby also increase the size, but the content does not use it.
Without padding, some elements can grow.
- line numbers likely still are glued to the right. (which indeed is a bit crammed)
- fold markers will maybe change. They change according to the available height and width, so if the line height is bigger than the width, increasing the width allows them to grow. (not sure if they have a max size)
- yellow/green line changed markers: imho they should not have padding. But they can benefit from padding of their neighbours.
....
So which ones are you looking for?
furious programming:
I'm looking for a way to add extra spacing between gutter parts. Additionaly, to add extra spacing between the gutter and the code, so the space between the folding markers and the code lines (without indentation) is bigger.
Martin_fr:
--- Quote from: furious programming on March 13, 2023, 01:30:52 pm ---I'm looking for a way to add extra spacing between gutter parts. Additionaly, to add extra spacing between the gutter and the code, so the space between the folding markers and the code lines (without indentation) is bigger.
--- End quote ---
For now, you can already move the gutter-seperator. Tools > Options > editor display
The gutter separator is by default between the "line change" and "fold".
Though that is only 2 pixels.
I don't think, that padding/spacing for each gutter part should be added to the IDE options.
I guess, the following would be sensible
- line number padding. (same amount on the left and right of each line number)
clicks on that padding, count as click on the line number.
- distance between gutter and text.
The critical question is, if (or how much of it) that distance should be sensitive to mouse clicks. E.g should clicking there
-- allow selecting text, so you have a less narrow space in front of the first char of each line
-- do nothing
-- be a click on the right-most gutter part (fold, unless replaced with separator)
- maybe, but not that sure padding for the fold gutter (one value for both sides)
more likely allow setting the width of the gutter-separator (which by default is on the left of the folds)
Alternatively: A single padding value, that is added as padding to the right side of each gutter part (effectively space between gutter parts, but again belongs to a gutter part => mouse click wise)
That would also include the space to the text area as the padding on the right most gutter part.
Not yet sure what might make the most sense...
It may be possible to do (or do more) via plugin.
The synedits can be retrived via the source-editor interface. And then settings on the SynEdit can be modified.
All that may be needed, is an event when the editor config changed.
furious programming:
Ok, I've prepared an example to illustrate what spacing I mean — where I would like to have more space.
The screenshots are zoomed so that you can clearly see the changes. The first screenshot shows the current appearance of gutter, which I have set in the IDE settings. The second screenshot shows the gutter with added spacing, marked with yellow braces. Of course, these spaces are only for visualization — I need smaller, but still.
--- Quote from: Martin_fr on March 13, 2023, 01:50:31 pm ---I don't think, that padding/spacing for each gutter part should be added to the IDE options.
--- End quote ---
Why? Gutter is an element whose appearance configuration is important. It should be as configurable as the contents of the code editor.
No matter what the gutter configuration will look like and how many options there will be. Ultimately, the point is to make it possible to move the gutter elements apart at all, according to your own preferences.
Navigation
[0] Message Index
[#] Next page