Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/martinbaillie/evil-motion-trainer
Make Emacs drop lazily repeated "hjkl"-based motions after a configurable threshold
https://github.com/martinbaillie/evil-motion-trainer
emacs emacs-lisp evil-mode modal-editing
Last synced: 2 months ago
JSON representation
Make Emacs drop lazily repeated "hjkl"-based motions after a configurable threshold
- Host: GitHub
- URL: https://github.com/martinbaillie/evil-motion-trainer
- Owner: martinbaillie
- Created: 2020-06-07T06:56:10.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-08-07T12:28:40.000Z (over 3 years ago)
- Last Synced: 2024-05-02T01:07:17.207Z (9 months ago)
- Topics: emacs, emacs-lisp, evil-mode, modal-editing
- Language: Emacs Lisp
- Homepage: https://martin.baillie.id/wrote/evil-motion-training-for-emacs/
- Size: 746 KB
- Stars: 48
- Watchers: 5
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# evil-motion-trainer
![Evil Motion Trainer](evil_motion_trainer.gif "Evil Motion Trainer")
## About
You've already opted to give your Emacs setup a streak of [modal
editing](https://github.com/emacs-evil/evil)
[malevolence](https://github.com/PythonNut/evil-easymotion), so why not train
yourself to move around your Emacs evil buffer with all the grace and poise of
advanced motions. We are not barbarians, after all.Entering `evil-motion-trainer-mode` makes Emacs drop lazily repeated
hjkl-based motions after a
configurable threshold, forcing you to think about a more precise motion.### Why?
Simply put, these keys are not the best choice for the job in most cases.
Word-wise motions (e.g. wW, bB,
eE, ge), character searches (e.g.
fF, tT, ,, ;)
and line jumps (e.g. 10j 5k) will get you there with less
keystrokes.## Configuration
Enable in a buffer with:
```emacs-lisp
(evil-motion-trainer-mode)
```Turn on for all buffers:
```emacs-lisp
(global-evil-motion-trainer-mode 1)
```Configure the number of permitted repeated key presses:
```emacs-lisp
(setq evil-motion-trainer-threshold 6)
```Enable a super annoying mode that pops a warning in a buffer:
```emacs-lisp
(setq evil-motion-trainer-super-annoying-mode t)
```Add to the suggested alternatives for a key:
```emacs-lisp
(emt-add-suggestion 'evil-next-line 'evil-avy-goto-char-timer)
;; See also: (emt-add-suggestions)
```## References
This package borrows from and was inspired by:
- Emacs annoying-arrows-mode
- Emacs evil-annoying-arrows-mode
- Vim hardtime
- Vim hardmode