@@ 14,6 14,22 @@ We recommend binding these functions to
(bind-key "M-D" #'caser-dashcase-dwim)
```
+## Basic usage ##
+
+Put some camelcase, snakecase, or dashcase text into a buffer. Then call one of the functions below.
+
+* `caser-camelcase-dwim` changes text to camelCase
+* `caser-snakecase-dwim` changes text to snake_case
+* `caser-dashcase-dwim` changes text to dash-case.
+
+## Dwim?
+
+The functions Do What I Mean. Hopefully, that is.
+
+1. When some text is selected, the `-dwim` functions act on the region.
+1. When no text is selected, the `-dwim` functions act on the next word.
+1. When there's a prefix argument, the `-dwim` functions act on that many words forward.
+
## Repeat case changes ##
Sometimes, it's easier to call a `dwim` function multiple times in a row, rather than select a region first. To make this easier, this mode supports [repeat-mode](https://karthinks.com/software/it-bears-repeating/). Repeat-mode is a way of easily repeating related commands.
@@ 34,13 50,6 @@ Because this package uses standard Emacs [regexp character classes](https://www.gnu.org/software/emacs/manual/html_node/elisp/Char-Classes.html) and [case conversion functions](https://www.gnu.org/software/emacs/manual/html_node/elisp/Case-Conversion.html), it fully supports changing the case of languages that don't use only ASCII letters. Try `orð á íslensku` (Icelandic), or `Deutsch ist ähnlich` (German).
Although languages with no capitalization can't be camelCased, they can still be changed from dash-case to snake_case: try `한국어-단어` (Korean).
-## Functions ##
-
-There are two sets of functions. If you don't know which you want, prefer the `*-dwim` functions.
-
-1. `*-dwim` functions are the most user-friendly. If the region is active, they act on the region. If given a prefix argument, they act on that many words forward (or, if negative, backward). Otherwise, they change the case of the single next word. These functions are `camelcase-dwim`, `dashcase-dwim`, and `snakecase-dwim`.
-2. `*-word` functions don't act on the region. They take an optional prefix argument, and act on that many words. These functions are `camelcase-word`, `dashcase-word`, and `snakecase-word`.
-
## Alternatives ##
This is not the first casing-related Emacs package. However, it works slightly differently than these existing packages.