Closed xelibrion closed 7 years ago
Hi, I'm not entirely sure what you mean by buffer borders. Normally, two Emacs windows are separated by a divider, but that doesn't really help in keeping track of which buffer/window is in focus.
The best way to keep track of that in my experience is to use a theme that makes a clear distinction between the active and inactive mode line. Then a quick look at the mode line can tell you which window is in focus.
Perhaps I don't understand your problem well enough? Do you think a screen shot might help?
@joostkremers The dividers is what I meant, sorry if it was unclear. They don't seems to be rendered with the writeroom-mode
turned on.
I do get a divider:
It's difficult to see that writeroom-mode
is on in the two windows, because the margins are not very wide, but it is. What exactly do you get?
This is the screen that I get
Ah, now I understand the problem. I'm sorry, I was confused by the way I use writeroom-mode
myself.
The problem you describe is caused by the fact that by default, writeroom-mode
disables the mode line. There are three ways to deal with this problem. First, you could activate window-divider-mode
, which draws explicit dividers between windows. You may need to set window-divider-default-places
to t
or bottom-only
to get a bottom divider. You may also want to customise window-divider-default-bottom-width
and window-divider-default-right-width
in that case.
The second option would be to enable the mode line in writeroom-mode
buffers. This can be done with the option writeroom-mode-line
. You can either display the default mode line, or a customised one, which only displays the modification time and file name.
A third option would be to do what is described in the README of visual-fill-column-mode
, which is what writeroom-mode
uses to narrow the text width. If you set the option split-window-preferred-function
to visual-fill-column-split-window-sensibly
, splitting a window will create two side-by-side windows, which are visually divided (as in the screen shot I uploaded). Side-by-side windows don't suffer from the same problem. Of course that's not an option if you actually prefer the window to be split top-to-bottom.
I actually didn't know about window-divider-mode
until this morning. I think it would be a good idea to incorporate it into writeroom-mode
, so if you don't mind waiting a few days, you may not have to do anything.
@joostkremers thank you very much for such a detailed answer, I'm going to use the third option for now, while I'm waiting for the new release.
I'll close this issue.
I just added a bottom window divider. It's activated by default, that seemed to make the most sense. It's only one pixel wide, but it can be widened if you wish, of course.
Let me know if you run into any problems.
@joostkremers thanks a lot for your work mate, just updated the plugin and it works superb!
Hey, thanks for writing this excellent package.
I like using your extension when using org-mode to do research, and often I open plots that I generate in a separate buffer. What I'd like to do is enable showing borders between two buffers as often it gets quite confusing which buffer has focus in current setup.
I couldn't figure out how to enable displaying buffer borders from reading source code (I get
writeroom-border-width
is not quite what I want).