README.md (1948B)
1 kmacro-x 2 ======== 3 4 A collection of Emacs commands, modes and functions building on top of 5 the keyboard macros (kmacros) system. 6 7 INSTALLATION 8 ------------ 9 10 `kmacro-x` is available on MELPA. Example configuration with 11 `use-package`: 12 13 ```elisp 14 (use-package kmacro-x 15 :ensure t 16 :init (kmacro-x-atomic-undo-mode 1) 17 :bind (("C-<" . kmacro-x-mc-mark-previous) 18 ("C->" . kmacro-x-mc-mark-next))) 19 ``` 20 21 FEATURES 22 -------- 23 24 **kmacro-x-atomic-undo-mode** 25 26 While this mode is enabled, the kmacro executions can be undo-ed 27 atomically, as a single operation. Often the user doesn't want to 28 undo a single step of a kmacro but rather the kmacro as a whole. 29 30 **kmacro-x-mc** 31 32 Emulates the typical multiple-cursors workflow using kmacros. 33 This way all the pitfalls of rolling a custom implementation of 34 multiple-cursors are avoided, while all the kmacro facilities, such as 35 counters, queries and kmacro editing, are gained virtually for free. 36 37 Usage: 38 39 1. `kmacro-x-mc-mark-next` and `kmacro-x-mc-mark-previous` are used to 40 find the next/previous occurrence of the symbol at point (or the 41 region if active) and create a fake cursor/selection at 42 its position. 43 2. Some arbitrary actions are being performed. 44 3. `RET` can be used to apply the actions to all the other cursors or 45 `C-g` can be used to abort the bulk operation. 46 47 `kmacro-x-mc-atomic-undo-mode` can be enabled to make each 48 `macro-x-mc` change undoable as a whole, similarly to what 49 `kmacro-x-atomic-undo-mode` does to each cursor individually. 50 51 Notable settings, check their documentation for details: 52 53 - `kmacro-x-mc-live-preview` (default: `nil`) 54 - `kmacro-x-mc-mark-whole-symbol` (default: `nil`) 55 - `kmacro-x-mc-preserve-last-macro` (default: `t`) 56 57 Note for the existing users: The older implementation of the multiple 58 cursors provided by this package is still available in 59 `kmacro-x-mc-legacy.el`. All the functions are the same as before, 60 just with the `legacy` infix added.