This module provides a fill column indicator to make it obvious when a line reaches or surpasses the 80th column. This serves as a reminder to keep lines short for accessibility and/or convenience. Read more about this on the Emacs Wiki page.
This module is deprecated and will be removed once Doom drops Emacs 26.x support. This is because the built-in
display-fill-column-indicator-mode
(in 27 and newer) replaces it, and enabling it is a trivial one-liner, which doesn’t warrant a module:(global-display-fill-column-indicator-mode +1)
This module has no dedicated maintainers.
This module provides no flags.
- hl-fill-column* (unless Emacs >=27)
This module has no prerequisites.
The behavior of this module varies slightly depending on your version of Emacs:
- In Emacs 26.x, text beyond
fill-column
will be highlighted. - In Emacs 27 and newer, a line is drawn down the right side at column 80.
This column limit is controlled by the fill-column
variable (default: 80
).
This variable is buffer-local, therefore, to change this globally, you must use
setq-default
:
(setq-default fill-column 100)
hl-fill-column-mode
(or display-fill-column-indicator-mode
on Emacs 27+)
must be restarted to see the change.
The setq-hook!
convenience macro makes settings fill-column
for a particular
mode (or modes) easy:
(setq-hook! 'org-mode-hook fill-column 100)
(setq-hook! 'python-mode-hook fill-column 72)
(setq-hook! js2-mode fill-column 72)
(setq-hook! '(ruby-mode rustic-mode python-mode-hook) fill-column 80)
Any open buffers in these modes must be restarted to see the change.
To change the appears of hl-fill-column’s highlight, change the
hl-fill-column-face
face. Doom provides the custom-set-faces!
macro to help
you do this:
(custom-set-faces!
'(hl-fill-column-face :background "red"
:foreground "blue"
:inverse-video t))
See M-x helpful-function RET custom-set-faces\!
for demos and documentation
for this macro.