Skip to content

Latest commit

 

History

History
72 lines (52 loc) · 3.37 KB

README.org

File metadata and controls

72 lines (52 loc) · 3.37 KB

keypress-multi-event

keypress-multi-eventhttps://melpa.org/packages/keypress-multi-event-badge.svghttps://stable.melpa.org/packages/keypress-multi-event-badge.svg

This package for emacs provides a method to define multiple functions to be performed for the same keypress. You can use this as a convenience feature to toggle among several functions. It was originally written as the back-end for package `home-end’, allowing those two keys to smartly cycle between moving POINT to the beginning/end of a line, the beginning/end of the window, the beginning/end of the buffer, and back to POINT.

Create a function which calls `keypress-multi-event’ with a list of the functions to be associated with the keypress, and bind that keypress to that function. By default, subsequent keypresses cycle through the list, but you can change that behavior by optionally adding an index into the list as a second argument, or you could also directly manipulate the underlying buffer-local variable `keypress-multi-event–state’. Both methods are illustrated in package `home-end’.

Dependencies

None.

Installation

Option 1: From within emacs, via MELPA

Option 2: From your distribution’s package manager

  • Debian has expressed an interest in providing a debian package for this repository, along with that of my related `home-end` repo. Stay tuned.
  • If you know of other distributions that make a similar decision, please let me know.

Option 3: Manual install

  • Download the `.el` file to somewhere on your emacs `load-path`.
  • `load`, `require`, `use-package`, or evaluate the file contents, as you desire.

Some other Emacs software by this author