I'd like to add a margin to the top of the window so that it's not so close to the top part of the frame.
Here's what it looks like currently (arrow indicates where I'd like to add extra margin):
How would I go about accomplishing this?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityAccording to the docs, it can't be set individually at the moment. You can play with internal-border-width
which would change all the borders inside the frame. That's what setting it to 7 gives:
(add-to-list 'default-frame-alist '(internal-border-width . 7))
Maybe you'll find a value which would add enough space on top and at the same time small enough that it doesn't affect the sides too much.
The tabbar
package uses an obscure emacs features called the header-line
to display the tab bar. This header-line
is an extra line of text shown at the top of a buffer, just as the mode-line
is shown at the bottom. The text in this line is rendered using the tabbar-default
face, so you could edit it and change some parameters to customize the look of the tab bar. You could change its font size, or change the font used, for example. Perhaps that will get you close to what you want.
On the other hand, you can't change the line spacing for an individual face, that has to be done for the buffer as a whole. (Curiously, the line-spacing
variable isn't used for the header-line
or the mode-line
, so you can put extra space between all the lines of the buffer except these two.)
I have created a minor mode related to this which is now available on MELPA:
TopSpace - Recenter line 1 with scrollable upper margin/padding