0

I want to mainly margin only the left side, for example, to set the left margin to about 30% of the total width and 5% on the right side.

I'm using olivetti now but this package doesn't seem to be able to specify separately on the left and right. Is there any solution?

roomworoof
  • 394
  • 2
  • 9

1 Answers1

1

I would say just create a custom function for it e.g.:

(defun set-window-margins-relatively (window left-fraction &optional right-fraction)
  (set-window-margins window
                      (round (* (window-width) left-fraction))
                      (when right-fraction
                        (round (* (window-width) right-fraction)))))

This function uses fractions (i.e. percentage/100) instead of percentage.

I haven't looked at Olivetti though (so I am not sure how it implemented things).

dalanicolai
  • 6,108
  • 7
  • 23