When using linum-mode in emacs and when increase font by M-x text-scale-increase
, there is the one thing that bothers me. Font for line numbers have same size as reading and don't fit into left-margin
on left side of buffer!
1 Normal font-size, OK
2 Increased font-size, no longer readable FUUUUU
What I'd really like to have:
When increase/decrease font I want one of these to work
then don't change font for left-margin but increase/decrease spacing between line numbers
Does anybody have some suggestions? Thanks, guys
By default, Emacs displays the current line number of the point in the mode line. You can toggle this feature off or on with the command M-x line-number-mode , or by setting the variable line-number-mode .
You can press C-x C-+ and C-x C-- to increase or decrease the buffer text size.
Vanilla Emacs: You can use ` C-x C-+ ' and 'C-x C--' ( 'text-scale-adjust' ) to increase or decrease the buffer text size (` C-+ ' or 'C--' to repeat). To restore the default (global) face height, type 'C-x C-0' .
Have a look at these two links:
It works quite well enough for my needs.
Examples:
1
The easiest, most straightforward solution I've seen is to set the line numbers to a fixed height. This can be accomplished easily, in accordance with user78810's answer: https://unix.stackexchange.com/questions/29786/font-size-issues-with-emacs-in-linum-mode/146781#146781
To wit, add the following line in your emacs config (or to your dotspacemacs/user-config
function, if you're using spacemacs):
(eval-after-load "linum" '(set-face-attribute 'linum nil :height 100))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With