Closed irigone closed 3 years ago
It goes even worse when I want to edit a word inside it
why don't you use avy-goto-char-timer for that? the algorithm could be
M-x avy-goto-char-timer
, c
, "jump letters", C-t
(to transpose)
avy-goto-char-timer and type "align"
avy-goto-char-timer
doesn't support multiple letters, are you sure you're not using avy-goto-word
or something like that?
in your case I'd just use M-x avy-goto-char-timer
, SPC
, "jump", *
avy-goto-char-timer
doesn't support multiple letters, are you sure you're not usingavy-goto-word
or something like that?
The documentation string says that it does?
avy-goto-char-timer is an autoloaded interactive compiled Lisp
function in ‘avy.el’.
It is bound to C-'.
(avy-goto-char-timer &optional ARG)
Read one or many consecutive chars and jump to the first one.
The window scope is determined by ‘avy-all-windows’ (ARG negates it).
in your case I'd just use
M-x avy-goto-char-timer
,SPC
, "jump",*
I don't understand your solution. This is how I see your comment:
I have problems with English...
Or maybe
I can wrap around avy-goto-char-2 because it always uses 2 characters so... the issue is solved for me, but I really wish I could use goto-char-timer...
This solves the issue for me. I read the source code. Yay, I'm (kinda) learning Lisp!
(defun avy-goto-char-timer-end (&optional arg)
"Read one or many consecutive chars and jump to the last one.
The window scope is determined by `avy-all-windows' (ARG negates it)."
(interactive "P")
(avy-goto-char-timer arg)
(forward-char (length avy-text)))
Edit 2020-12-17 04:05 AM GMT+6: length as forward-char argument instead of dotimes.
I want to go to the end of the candidate instead of its beginning. In my opinion, it's more intuitive, and most of people are already used to that, because they already used isearch. There should be a variable that changes that behaviour. I find myself C-f'ing several times after using avy just because of that. For example, if I want to change
align
toalign*
in LaTeX, I'd instinctively use avy-goto-char-timer and type "align", then go to that candidate with the tree, because I want to append an asterisk. Now, after I do that, I'll have to type M-f to go to the end of the word. In this example, it's more intuitive to go to the end of the candidate, because for a human reading the wordalign
is much, much more eaosier thann}
It goes even worse when I want to edit a word inside it. If I type "doucmentation" and want to fix my typo, I'd usually type "douc", then edit. However, instead of that, I have to type C-f C-f C-d C-d to change that. In this situation, it's easier to go to the end of candidate, too, because with the default behavior you have to skip the "douc" in your mind and then read the "mentation". This is obviously less intuitive. This would also add #224 functionality, btw. There are indeed situations where going to the beginning of the candidate is easier (like when you need to change "there" to "There", but in my opinion, this barely happens. This is why there should be a variable that controls that, so that the user could make a simple function with a let that goes to the beginning of that candidate.