Skip to content

martinbaillie/evil-motion-trainer

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 

evil-motion-trainer

Evil Motion Trainer

About

You've already opted to give your Emacs setup a streak of modal editing malevolence, 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:

(evil-motion-trainer-mode)

Turn on for all buffers:

(global-evil-motion-trainer-mode 1)

Configure the number of permitted repeated key presses:

(setq evil-motion-trainer-threshold 6)

Enable a super annoying mode that pops a warning in a buffer:

(setq evil-motion-trainer-super-annoying-mode t)

Add to the suggested alternatives for a key:

(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

About

Make Emacs drop lazily repeated "hjkl"-based motions after a configurable threshold

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published