Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

goto char in word an move to end of the word #169

Open
jockevattenbonde opened this issue Sep 6, 2016 · 0 comments
Open

goto char in word an move to end of the word #169

jockevattenbonde opened this issue Sep 6, 2016 · 0 comments

Comments

@jockevattenbonde
Copy link

Hi,

I want to move the pointer to right after a targeted word.
So, in order to explain this a bit more thoroughly: I look at a character of the word I want to jump to and invoke avy. I then type that character and type the key-combo to get there. Then avy automatically jumps to that character and moves the pointer behind that word.
I would like to have this behavior by default.
I'm a supernoob in emacs, so I can't figure out how to do it.

I figured that I would only have to add (forward-sexp) or (forward-word) to avy-action-goto like this:

(defun avy-action-goto (pt)
  "Goto PT."
  (goto-char pt)
  (forward-sexp))

but this doesn't have any effect. So I figured I need to include a new move like this:

;;;###autoload
(defun avy-goto-char_after_word (char &optional arg)
  "Jump to the end of the visible word containing CHAR.
The window scope is determined by 'avy-all-windows' (ARG negates it)."
...
...

then, I could define this as avy's default behavior, right?
But what else needs to be done?
I don't know if the information is necessary, but I use avy with ace-isearch.

Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant