How to remove extra space in global-linum-mode? - emacs

Having global-linum-mode on creates extra space on the left hand.
How do I get rid of this extra space and just show the line numbers?
Picture:

The extra space that appears on the left side of the buffer when global-linum-mode is enabled is caused by the default linum-format setting, which adds a certain amount of padding to the line numbers to make sure they align properly.
To get rid of the extra space and just show the line numbers without any padding, you can customize the linum-format variable. This variable determines the format of the line numbers in global-linum-mode, and you can set it to a format string that doesn't include any padding.
(custom-set-variables
'(linum-format "%d"))

Related

How can I configure auto-dim-other-buffers to dim line number column?

I am using auto-dim-other-buffers-mode, but unfortunately this mode does not change the color of the line number column.
I am using line-number-mode for displaying relative line numbers.
I have tried to customize auto-dim-other-buffers face but have had no success.
I also have tried editing line-number face which allows me to change the color of the column that I wish for auto-dim to take care of.
What options do I have here?

Add left space/margin/padding in VS Code editor window between line numbers and code

I would love to have some space between the line numbers and the first intendation/code in the VS Code editor window:
I just want to indent the code in the editor without actually adding whitespace in the code.
I tried "editor.glyphMargin", but this will only increase the space on the left of the line numbers, not between the line numbers and the code.
I'm also aware of the "Centered Layout" view, but this also decreases the width of e. g. the tabs for the file selection.
Is there a setting I'm missing or do I need a plugin/custom CSS?
You can try this --
"editor.lineDecorationsWidth": 25,
This increases the space on the right side of the numbers. I haven't seen anything that increases the padding on the other side of the gutter nearest your code.
Opinion --
Ideally, there would be a editor.padding.left like there is a editor.padding.top, but I haven't seen this yet.

Libreoffice reduce formula line space

Here I got a text in libreoffice, third line has a mathematical formula which has added a lot of horizontal space above and below its line (third line). how can reduce the horizontal space in this line?
I just found the answer, it's just enough to set a fixed line space, not single or double or proportional.
Just right click on the paragraph and then select paragraph from menu and in idents and spacing tab, Line spacing > Fixed and then set a number for line height.

How to determine the visible buffer width in characters

I'm using a custom modeline and I'm starting to get how to configure it but here I'm stuck as to how to get the info I want: I'd like to show, in each buffer's modeline, the width in characters of the buffer.
I'm also using linum-mode (with always at least two columns used) and ideally I'd like to deduce the number of characters used by linum from the width.
The function (window-width) is what you're looking for, this doesn't include the characters used by linum-mode however you can get their width from (window-margins)

How to add 1 pixel of vert-spacing to an Emacs font?

I don't know if this can easily be done with Emacs (read below for my hack in case there's no easy way to do this) so...
How can I add one pixel of vertical-spacing between each line under Emacs?
I know that screen real estate is precious but I'm using a "custom" font (ProggyFont) and, under IntelliJ IDEA, I can modify the vertical spacing to something that I like.
Under Emacs, however, I find the text hard to read because the pixels from one line are too close from the pixel of another line, so I'd like to add one "one pixel" empty vertical line between every line. Can this be done simply?
If there's no "simple way", how do I take a "x by y" bitmap font and turn it into a "x by (y+1)" bitmap font? I don't mind using a font editor: been there, done that. But I don't know exactly everything that would be involved.
Check out the line-spacing variable, e.g.
(setq line-spacing 0.2)
From the docs:
Additional space to put between lines when displaying a buffer.
The space is measured in pixels, and put below lines on window systems.
If value is a floating point number, it specifies the spacing relative
to the default frame line height. A value of nil means add no extra space.