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

[Feature] Support defclass for evil motions #1925

Open
krshrimali opened this issue Jul 20, 2024 · 1 comment
Open

[Feature] Support defclass for evil motions #1925

krshrimali opened this issue Jul 20, 2024 · 1 comment

Comments

@krshrimali
Copy link

krshrimali commented Jul 20, 2024

Issue type

  • Enhancement request

Pitch

Given that we have evil motions for going backwards (for defun: evil-backward-section-end) and forward for defun, it would be helpful to have the same for defclass as well. This would ideally make it easier to have a keymap to go back to previous/next class directly instead of moving between functions.

Going through the code-base, I didn't find functions that would support defclass like they do for defun (like beginning-of-defun, end-of-defun). Please point out if I missed anything here.

Environment

Emacs version: 29.4
Operating System: Endeavour OS
Evil version: 1.15.0
Evil installation type: MELPA
Graphical/Terminal: Terminal (/both)

Further notes

Happy to discuss this forward and any thoughts on implementations (can help with a PR if necessary).

Was just curious, was there any reasoning to not support motions for defclass? Maybe I'm missing some context here.

@tomdl89
Copy link
Member

tomdl89 commented Jul 21, 2024

@krshrimali can you give an example of a defclass that would be incorrectly navigated with the motions evil supplies?

also,

was there any reasoning to not support motions for defclass?

Evil primarily emulates vim functionality. As this is not functionality in vim, it would have to be a common emacs-specific need to be addressed. And defuns are much more commonly used than defclasses. For example, evil has zero usages.

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

2 participants