2022-03-28 15:03:21 +02:00
|
|
|
#+title: :editor rotate-text
|
|
|
|
#+subtitle: The only back'n'forth nerds will ever know
|
|
|
|
#+created: June 22, 2018
|
|
|
|
#+since: 2.0.4
|
2021-10-16 01:22:41 +02:00
|
|
|
|
|
|
|
* 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~).
|
2021-10-18 01:43:37 +02:00
|
|
|
|
|
|
|
** Maintainers
|
2021-10-16 01:22:41 +02:00
|
|
|
- [[doom-user:][@hlissner]]
|
|
|
|
|
|
|
|
[[doom-contrib-maintainer:][Become a maintainer?]]
|
|
|
|
|
|
|
|
** Module flags
|
|
|
|
/This module has no flags./
|
|
|
|
|
|
|
|
** Packages
|
2022-09-26 02:19:42 +08:00
|
|
|
- [[doom-package:rotate-text]]
|
2021-10-16 01:22:41 +02:00
|
|
|
|
|
|
|
** 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./
|
2021-10-18 01:43:37 +02:00
|
|
|
|
2021-10-16 01:22:41 +02:00
|
|
|
* Installation
|
|
|
|
[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]]
|
2021-10-18 01:43:37 +02:00
|
|
|
|
2021-10-16 01:22:41 +02:00
|
|
|
/This module has no external requirements./
|
2021-10-18 01:43:37 +02:00
|
|
|
|
2021-10-16 01:22:41 +02:00
|
|
|
* TODO Usage
|
|
|
|
#+begin_quote
|
|
|
|
🔨 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
|
|
|
|
#+end_quote
|
2021-10-18 01:43:37 +02:00
|
|
|
|
2021-10-16 01:22:41 +02:00
|
|
|
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.
|
2021-10-18 01:43:37 +02:00
|
|
|
|
2021-10-16 01:22:41 +02:00
|
|
|
* 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:
|
2021-10-18 01:43:37 +02:00
|
|
|
#+begin_src emacs-lisp
|
2021-10-16 01:22:41 +02:00
|
|
|
;; in $DOOMDIR/config.el
|
2021-10-18 01:43:37 +02:00
|
|
|
(after! rotate-text
|
2021-10-16 01:22:41 +02:00
|
|
|
(add-to-list 'rotate-text-words '("small" "medium" "large")))
|
2021-10-18 01:43:37 +02:00
|
|
|
#+end_src
|
|
|
|
|
2021-10-16 01:22:41 +02:00
|
|
|
To add a sequence to a specific mode:
|
2021-10-18 01:43:37 +02:00
|
|
|
#+begin_src emacs-lisp
|
2021-10-16 01:22:41 +02:00
|
|
|
;; in $DOOMDIR/config.el
|
2021-10-18 01:43:37 +02:00
|
|
|
(set-rotate-patterns! 'c++-mode
|
|
|
|
:words '(("float" "double")))
|
2021-10-16 01:22:41 +02:00
|
|
|
#+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?]]
|
2021-10-18 01:43:37 +02:00
|
|
|
|
2021-10-16 01:22:41 +02:00
|
|
|
* Appendix
|
|
|
|
#+begin_quote
|
|
|
|
🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
|
|
|
|
#+end_quote
|