Skip to content

AdrieanKhisbe/omni-kill.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Omni Kill

https://travis-ci.org/AdrieanKhisbe/omni-kill.el.svg https://coveralls.io/repos/AdrieanKhisbe/omni-kill.el/badge.svg http://melpa.org/packages/omni-kill-badge.svg http://stable.melpa.org/packages/omni-kill-badge.svg https://img.shields.io/github/tag/AdrieanKhisbe/omni-kill.el.svg http://img.shields.io/:license-gpl3-blue.svg

Kill all the things! \o/

Description

This library is here to help you quickly kill, copy, select, … things that are at point: emails, url, sentence, sexp… It’s built on top of thingatpt, and just provide wrapper functions.

Usage

Once loaded you will have at you disposal many commands to kill, grab, delete, “Things” that are at point. The naming scheme for these commands are by default omni-ACTION-THING, with:

actions
kill, copy, delete, select, narrow, save (to register), go to start / end
things
symbol, list, sexp, defun, filename, url, email, word, sentence, whitespace, line, page aka the default thingatpt)

Besides you can use the dispatch functions. They take as argument the next key you type, and look on an alist to get the associated thing. These are named omni-ACTION, and the char to thing association can be customized through the omni-kill-thing-to-letter-alist custom.

For example calling omni-kill followed by the letter e, will kill the current email at point if any. (these function accept thing as symbol in non interactive use)

Installation

To install it, install the package from melpa or just put the omni-kill.el in your load path, and require it. Then bind the commands to the keybinding that suit you.

Configuration

If you are using use-package, here is the config you could use.

(use-package omni-kill
    :defer nil
    :bind (("M-s c". omni-copy)
           ("M-s d". omni-delete)
           ("M-s k". omni-kill)
           ("M-s s". omni-select)
           ("M-s n". omni-narrow)
           ("M-s r". omni-save)
           ("M-s a". omni-start)
           ("M-s e". omni-end)))

Defer nil is needed so that the omni-ACTION-THING are created by loading the library. (there is no autoload for these commands, as they are macro generated)

If you want to adapt or change the naming scheme, just run M-x customization-group RET omni-kill. You can also add to the list your custom things. By default you will get omni-copy-url, omni-delete-line, and so on.

Notes

This is still a young library. So if ever you think about using it, and not fetching it from melpa, prefer the master branch, and expect to update your config.

Work is still in progress, but I’ll try to avoid incompatible change on he master branch

If you have any remark, refactor suggestion or else, just pose an issue ;)