[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to set margins of buffer when window changes?
From: |
Joost Kremers |
Subject: |
Re: How to set margins of buffer when window changes? |
Date: |
Wed, 08 Sep 2021 21:11:15 +0200 |
User-agent: |
mu4e 1.6.5; emacs 27.2 |
On Wed, Sep 08 2021, edgar@openmail.cc wrote:
> I am trying to have some buffers centre the text. I figured that I could do it
> with margins. I want this to adjust depending on the value of `fill-column'
> (could be any other variable) and the width of the window (if it is too small,
> don't centre).
I've written a minor mode that does this:
https://github.com/joostkremers/visual-fill-column
To centre the text, set `visual-fill-column-center-text` to `t`.
Feel free to adapt the code to your needs or simply use it for inspiration. :-)
--
Joost Kremers
Life has its moments