doomemacs/modules/editor/rotate-text/README.org
Henrik Lissner 1abcf913aa
revert: fix(docs): set mode in file-local vars
emacs-straight/org-mode@e22b4eb7aa introduced a breaking change that
made it impossible to rely on .dir-locals.el to change org-mode buffers
in $EMACSDIR to doom-docs-org-mode (without infinite recursion), so we
used file-local variables in 7e400ab.

emacs-straight/org-mode@215de6176b reverted that change, so we can use
.dir-locals.el again, and this is my preference, since it requires less
boilerplate across our hundreds of org files.

Ref: emacs-straight/org-mode@215de6176b
Ref: emacs-straight/org-mode@e22b4eb7aa
Revert: 7e400abdc0
2022-08-07 19:08:07 +02:00

77 lines
2.3 KiB
Org Mode

#+title: :editor rotate-text
#+subtitle: The only back'n'forth nerds will ever know
#+created: June 22, 2018
#+since: 2.0.4
* 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~).
** Maintainers
- [[doom-user:][@hlissner]]
[[doom-contrib-maintainer:][Become a maintainer?]]
** Module flags
/This module has no flags./
** Packages
- [[doom-package:][rotate-text]]
** Hacks
/No hacks documented for this module./
** TODO Changelog
# This section will be machine generated. Don't edit it by hand.
/This module does not have a changelog yet./
* Installation
[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]]
/This module has no external requirements./
* TODO Usage
#+begin_quote
🔨 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
#+end_quote
For evil users: [[kbd:][[r]] and [[kbd:][]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
#+begin_quote
🔨 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
#+end_quote
To enable a set of items to cycle through globally:
#+begin_src emacs-lisp
;; in $DOOMDIR/config.el
(after! rotate-text
(add-to-list 'rotate-text-words '("small" "medium" "large")))
#+end_src
To add a sequence to a specific mode:
#+begin_src emacs-lisp
;; in $DOOMDIR/config.el
(set-rotate-patterns! 'c++-mode
:words '(("float" "double")))
#+end_src
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./ [[doom-report:][Report one?]]
* Frequently asked questions
/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]]
* Appendix
#+begin_quote
🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
#+end_quote