8 votes
Accepted

Use avy to select distant word or line and paste at point

avy already supports what you want. See avy-dispatch-alist. However, the default actions are not enough. I have the following function in my config (here it copies a sexp, but you can change it to ...
cutejumper's user avatar
6 votes
Accepted

Avy is not labelling every character I want to jump to

It looks like your avy shortcut is bound to avy-goto-word-1, while what you want here is avy-goto-char. Try M-x avy-goto-char SPC and you will see that when word boundaries are ignored, all spaces ...
glucas's user avatar
  • 20.6k
5 votes
Accepted

Confine avy search to a single line/paragraph

The avy commands like avy-goto-char run avy--generic-jump underneath, and that function takes a begin/end range. Here's a proof of concept modification to avy-goto-char that runs on the paragraph: (...
amitp's user avatar
  • 2,541
5 votes
Accepted

Get thing-at-point to include periods

What about this. (defun dotted-symbol-at-point () (with-syntax-table (make-syntax-table (syntax-table)) (modify-syntax-entry ?. "_") (thing-at-point 'symbol)))
politza's user avatar
  • 3,336
3 votes

Use avy to select distant word or line and paste at point

cute-jumpers answer is perfectly functional. If you want to bind the action to another key rather than use avy's internal dispatch process then the following adapted code works quite well: (defun my-...
Att Righ's user avatar
  • 775
2 votes
Accepted

Avy copy/delete partial sentence of a certain line

As far as I understand your question, you would like to make a version of avy-kill-ring-save-whole-line that kills only a selected part of a line. Starting from avy-goto-char-timer, you could achieve ...
dalanicolai's user avatar
  • 7,805
2 votes

Precomposing all commands in a keymap with a function using a variable in another command

Did you check the documentation for defvar-keymap? You are supposed to pass it a function┬╣, but you are instead immediately evaluating some code that tries to use your position variable. Of course it ...
db48x's user avatar
  • 18.1k
1 vote
Accepted

How to implement avy comment region function?

You should prefer using Emacs native functions over evil functions, if possible. Additionally, as you've mentioned, there is already avy-kill-region. I would reuse it with as little modification as ...
dalanicolai's user avatar
  • 7,805
1 vote
Accepted

Create avy zap to char and up to char function

How about something like this. Note, the F8 key is just an example, I wouldn't use it. (defun my/zap-to-char-avy () "Delete region from point to a character." (interactive) (save-...
Arktik's user avatar
  • 972
1 vote

How do I jump to the previous/next modification (relative to the git HEAD) in the current file?

In a file-visiting buffer use C-c f p to visit the last blob that modified it. Once you are in a buffer that visits a blob instead of a file you can use just p and n to move through time. Note that ...
tarsius's user avatar
  • 25.7k
1 vote
Accepted

Is it possible to use avy to jump to known positions in a buffer?

Answering my own question... Here is a way to get an avy style jump tree to positions 1, 4 or 12. You could use any list of positions you want, e.g. calculated from some function. (avy-with my-jumper ...
John Kitchin's user avatar
  • 11.9k
1 vote

Avy - Moving Between Terminal Frames

This is an Emacs bug. Avy does call select-frame-set-input-focus on the proper frame, but that function does not work well on terminal frames. If you want this fixed, please follow up with M-x report-...
abo-abo's user avatar
  • 14.1k

Only top scored, non community-wiki answers of a minimum length are eligible