doomemacs/modules/editor/rotate-text/README.org
Henrik Lissner 6f40ad55f5
docs: discourage after! and use-package! use
There's little reason for users to use these macros in their private
configs over plain ol' `with-eval-after-load` and `use-package`, unless
they're writing their own modules.

It's my fault for signal boosting them in documentation and whenever I'm
asked for help, because beginners now believe they are somehow
required for Doom to work correctly (there are guides out there
telling beginners that migrating to Doom involves replacing all
instances of `with-eval-after-load` and `use-package` in their
pre-existing configs with `after!` and `use-package!` -- which was never
true).

What's more, I plan to replace `use-package`, internally, so the
`use-package!` macro won't exist for much longer.
2026-02-09 04:29:47 -05:00

2.3 KiB

:editor rotate-text

Description   unfold

This module adds text rotation to Doom Emacs. I.e. The ability to cycle through keywords or text patterns at point, like true and false, or public, protected, and private (in c++-mode).

Module flags

This module has no flags.

Hacks

No hacks documented for this module.

TODO Changelog

This module does not have a changelog yet.

Installation

Enable this module in your doom! block.

This module has no external requirements.

TODO Usage

󱌣 This module's usage documentation is incomplete. Complete it?

For evil users: [r and ]r will cycle back and forward (respectively) through specified patterns for the text at point. Patterns will wrap around as you cycle through them.

TODO Configuration

󱌣 This module's configuration documentation is incomplete. Complete it?

To enable a set of items to cycle through globally:

;; in $DOOMDIR/config.el
(with-eval-after-load 'rotate-text
  (add-to-list 'rotate-text-words '("small" "medium" "large")))

To add a sequence to a specific mode:

;; in $DOOMDIR/config.el
(set-rotate-patterns! 'c++-mode
  :words '(("float" "double")))

When configuring a sequence of words or symbols that should be rotated through, it is important that all items are all lower case. The casing will be determined by the item that initiated the rotation. For example, Small will be replaced with Medium and SMALL will be replaced with MEDIUM using the example described above.

Troubleshooting

There are no known problems with this module. Report one?

Frequently asked questions

This module has no FAQs yet. Ask one?

Appendix

󱌣 This module has no appendix yet. Write one?