Skip to content

tninja/evil-gamepad.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

evil-gamepad

./ps1_gamepad_keymapping.png

evil-gamepad

A gamepad-inspired keybinding layout for Evil in Emacs.

This package remaps a small set of core Evil commands into a controller-style layout:

  • Left hand for movement
  • Right hand for editing actions

The package intentionally stays small. It only depends on Evil and focuses on core navigation and editing instead of third-party integrations. The j and J bindings can optionally use avy when that package is installed.

Design

The layout is built around a simple mental model:

  • W A S D handles directional movement
  • Q E expands movement to words
  • Q/E uppercase expands movement further
  • The right side of the keyboard handles deletion and append actions

The goal is consistency across normal state and visual state, not a full replacement for every default Evil binding.

Key Layout

Normal state

KeyCommand
aevil-backward-char
devil-forward-char
wevil-previous-line
sevil-next-line
qevil-backward-word-begin
eevil-forward-word-begin
Qtab-bar-switch-to-prev-tab
Etab-bar-switch-to-next-tab
Aevil-beginning-of-line
Devil-end-of-line
Wevil-backward-paragraph
Sevil-forward-paragraph
C-wevil-scroll-page-up
C-sevil-scroll-page-down
hmagit-status
jevil-gamepad-avy-goto-char
Jevil-gamepad-avy-goto-line
kevil-delete-char
Kevil-delete-backward-char-and-join
C-kevil-delete-backward-word
levil-append
Levil-append-line

Visual state

Visual state keeps the same movement layout for consistency.

KeyCommand
aevil-backward-char
devil-forward-char
wevil-previous-line
sevil-next-line
qevil-backward-word-begin
eevil-forward-word-begin
Aevil-beginning-of-line
Devil-end-of-line
Wevil-backward-paragraph
Sevil-forward-paragraph

Installation

This package is not on MELPA yet.

Add the repository to your load-path and enable the mode:

(add-to-list 'load-path "/path/to/evil-gamepad.el")
(require 'evil-gamepad)
(evil-gamepad-mode 1)

If you use use-package:

(use-package evil-gamepad
  :load-path "/path/to/evil-gamepad.el"
  :after evil
  :config
  (evil-gamepad-mode 1))

If you want the j and J bindings to jump with avy, install avy separately. Without avy, loading evil-gamepad still succeeds and the bindings will show an explanatory error only when invoked.

Customization

By default, the package only installs keybindings.

If you also want Evil search behavior tuned for symbol-based searching:

(setq evil-gamepad-enable-search-tweaks t)

This enables:

  • evil-symbol-word-search
  • evil-search-module set to evil-search

Scope

This package includes minimal integration with popular packages:

  • h key binding to magit-status for quick Git access
  • j and J bindings use avy when available

Beyond these, the package does not include bindings for:

  • Helm
  • Org extensions
  • Python tooling
  • Multiple cursors
  • Modeline packages
  • Other third-party packages

Those can be layered on top in user configuration if needed.

License

See LICENSE.

About

SNES and PlayStation-inspired keybindings for Evil in Emacs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors