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

Use 'page scope for all word motions #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

saser
Copy link

@saser saser commented Apr 2, 2019

This is the default behavior in vim-easymotion.

As far as I can see, there is no other way to configure this without redefining all word motions as they are defined in evil-easymotion.el, and since using the entire page as scope is the default in vim-easymotion, I figured it should probably be the default behavior here as well.

Thank you for porting one of my favorite Vim plugins! ✨

This is the default behaviour in `vim-easymotion`.
@martinbaillie
Copy link

Is there any objections to merging this? Coming across from Vim, the scope change is messing with my head 😄

@PythonNut
Copy link
Owner

Sorry, is page exactly the same scope used in vim-easymotion? I did notice that doom is doing the following:

(put 'visible 'bounds-of-thing-at-point (lambda () (cons (window-start) (window-end))))
(evilem-make-motion evilem-motion-forward-word-begin #'evil-forward-word-begin :scope 'visible)
(evilem-make-motion evilem-motion-forward-WORD-begin #'evil-forward-WORD-begin :scope 'visible)
(evilem-make-motion evilem-motion-forward-word-end #'evil-forward-word-end :scope 'visible)
(evilem-make-motion evilem-motion-forward-WORD-end #'evil-forward-WORD-end :scope 'visible)
(evilem-make-motion evilem-motion-backward-word-begin #'evil-backward-word-begin :scope 'visible)
(evilem-make-motion evilem-motion-backward-WORD-begin #'evil-backward-WORD-begin :scope 'visible)
(evilem-make-motion evilem-motion-backward-word-end #'evil-backward-word-end :scope 'visible)
(evilem-make-motion evilem-motion-backward-WORD-end #'evil-backward-WORD-end :scope 'visible)

I'm not really sure if this is necessary though, since I think you can get this behavior simply by not passing :scope at all.

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

Successfully merging this pull request may close these issues.

3 participants