Coder Social home page Coder Social logo

omni-kill.el's Introduction

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 ;)

omni-kill.el's People

Contributors

adrieankhisbe avatar purcell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

omni-kill.el's Issues

Feature request: Non-interactive picking of thing types

In omni-kill--generate-dispatch-command type of thing to pick is prompted for interactively. I'd like to request a non-interactive (scriptable) way of picking it and then passing the choice on.

The reason for this request is that I'd like to write a hydra that prompts me for all the different types of things that I can pick, and once I choose what I want using the hydra, I'd like to be able to pass that choice on so it can be acted on.

I'm not sure if the best way to do that would be to add a hook to omni-kill--generate-dispatch-command or parameterize it or maybe some other way.

omni-kill vs thing-edit

Hi, Actually it's not an issue. Recently I found this package is very similar with thing-edit which is not in melpa. Could you please compare both and enhance omni-kill? Thanks.

Eager macro-expansion failure: (void-variable action)

omni-kill.el is causing Emacs to complain of Eager macro-expansion failure: (void-variable action).

I've tracked this down to omni-kill--generate-all-the-fun, which calls (omni-kill--generate-dispatch-command action). The root cause, however, seems to be the omni-kill--generate-dispatch-command macro itself, which tries to (eval command) at compile time, while command only exists at runtime.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.