Skip to content

emacsmirror/meep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MEEP for Emacs

MEEP is an experimental modal editing system for emacs.

Available via melpa.

Motivation

The main motivation for MEEP was to provide a modal editing environment that can co-exist with Emacs default key bindings.

Support VIM-like Workflow
Common operations which are possible in VIM should be possible in MEEP with a similar number of key-strokes.
Low Friction Integration
Use of a modal editing shouldn't impose additional constraints (where possible) or complicate use of 3rd party packages.
Low Complexity
Avoid "clever" solutions that often end up causing unforeseen complications.

For the most part MEEP is just a collection of commands that could be called independently of each other.

Other Pages

  • Overview: for extended information on the design & implementation.
  • Comparisons: for the rationale and comparisons with other modal-editing systems.
  • Command Reference: for a list of commands and options.
  • Default Keymap: for reference and an example key-map.
  • Hacking: notes for working on the code.
  • Further Work: potential changes and improvements.

Features

  • Persistent selection (as its own state with its own key-map).
  • Repeat multiple commands (edits, insertions, changes, etc).
  • Rectangle selection support (cut/paste/swap/replace/change/surround).
  • Find character on line (VIM style).
  • Record and replay macros (VIM style).
  • Key-pad mode (matching Meow's keypad mode).

How it Works

Instead of defining text-objects, most "motions" commands set the mark. This means commands afterwards can operate on the region, without activating it.

At first this may seem counter intuitive (since the region isn't visible) but it doesn't take long to get used to this.

Allowing for common actions such as change-word or cut-paragraph to be performed efficiently.

Trying it Out

To try out MEEP without installing it, you may use the bundled example init.el file:

./emacs-run-local.sh

Default Key-map

A diagram for the default layout can be found in the example configuration, see: init.el.

Installing

While it is possible to install this package and access commands a typical installation is expected to be integrated into your init.el file.

For reference see the minimal example: init.el.

Which shows how MEEP commands can be used with Bray for a modal editing configuration.

Integration

If you wish to use "motion" commands from other packages with MEEP. A utility functions is meep-command-mark-on-motion-advice-add (as well as an associated remove function).

If you wish to repeat these motions by entering a number afterwards or selecting the whole item with meep-exchange-point-and-mark-motion, then these commands must accept a numeric argument (already a common convention).

Note that without any integration, motion command from other packages can still be used, they just wont mark text to operate on.

Customization

It's recommended to start out with one of the provided key-maps.

See the command reference for a list of custom options.

Dependencies

  • Bray: a generic modal editing system.
  • Repeat-Fu: while not a hard dependency, it's recommended.

Other Packages

These packages work well with MEEP.

  • Avy: For jumping to text by characters.
  • Shift numbers: for incrementing/decrementing numbers.

About

Lightweight modal editing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  

Packages

No packages published