Coder Social home page Coder Social logo

zzz-to-char's Introduction

Zzz to Char

License GPL 3 MELPA CI

This package provides two new commands: zzz-to-char and zzz-up-to-char which work like the built-ins zap-to-char and zap-up-to-char, but allow the user to quickly select the exact character they want to zzz to. The commands work like the built-ins when there is only one occurrence of the target character, excepting that they automatically work in the backward direction, too. One can specify how many characters to scan from each side of the point, see zzz-to-char-reach.

Installation

The package is available via MELPA, so you can just type M-x package-install RET zzz-to-char RET.

If you would like to install the package manually, download or clone it and put on Emacs' load-path. Then you can require it in your init file like this:

(require 'zzz-to-char)

Usage

Just bind zzz-to-char or zzz-to-char-up-to-char (depends on your taste, the latter doesn't include the target char into the killed text):

(global-set-key (kbd "M-z") #'zzz-to-char)

License

Copyright © 2015–present Mark Karpov

Distributed under GNU GPL, version 3.

zzz-to-char's People

Contributors

dependabot[bot] avatar mrkkrp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

zzz-to-char's Issues

Don't offer targets that would do nothing, i.e. adjacent chars

One use case for zapping is to delete the text between delimiters, e.g.

"|here is a string"

With point at | I can zap up to the closing ". With zzz-to-char-up-to-char it offers both the start and end quotes as possible targets, even though zapping backwards would do nothing here.

Can you ignore targets adjacent to point?

The package chokes with an older avy version

tl;dr when using this package with an older version of avy the package does not work

See how I stumbled upon this issue:

M-x package-install RET zzz-to-char RET
Then in a buffer with some text:

foo█ x x x x bar

M-x zzz-up-to-char RET

In minibuffer:

Zzz up to char:

b
I get back (in minibuffer):

Symbol’s function definition is void: avy-jump

Mind you I had avy at version 20180514.1100.

Installed the newest version from MELPA.
And voila, it worked.

At first I thought:

Maybe you'd like to specify the minimum avy version to something higher that 0.3.0 in order to prevent this?

But then looking at avy at version 20180514.1100, even that package is at version 0.4.0. So it won't be a fix.

Figured you might wanna know about this...

Thanks for the package :)

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.