New gif
Update README
Listen to window-size-change-functions to recenter text
A minor mode for focused writing. Highlights the sentence at your cursor so you can better ignore your inner editor and focus on finishing that first draft.
M-x package-vc-install https://git.sr.ht/~mgmarlow/focus-mode RET
Activate focus-mode
in any text mode:
M-x focus-mode RET
This is important! focus-mode
uses the built-in Emacs sentence
detection, meaning it is subject to the sentence-end-double-space
variable. By default, Emacs assumes that two spaces follow a
sentence-terminating period. It's likely that this is not the
behavior you expect.
If you want focus-mode
to behave more like a normal word processor,
the following config change is recommended:
(customize-set-variable 'sentence-end-double-space nil)
A value of nil
tells Emacs that sentences have only one space
following periods.
You can either focus the current sentence or the current paragraph
depending on the value of focus-type
. The default is sentence.
(customize-set-variable 'focus-type 'paragraph)
By default, font faces assume dark mode. The values are plucked from ef-themes-autumn. If you use light mode, you will want to customize these faces to suit your theme.
focus-face-main
: Font face for primary, focused text.
focus-face-dim
: Font face for background, dimmed text.
focus-centered-column-width
: Max width of centered text during
focus-mode
. Defaults to current-fill-column
to play nicely with
auto-fill-mode
.