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

replace: Bind q to quit-window when not editing #805

Closed
wants to merge 1 commit into from

Conversation

bcc32
Copy link

@bcc32 bcc32 commented Apr 14, 2024

q is bound by default to dismiss the window, which is useful when
occur is being used only to navigate occurrences and not edit them.

q is bound by default to dismiss the window, which is useful when
occur is being used only to navigate occurrences and not edit them.
@condy0919
Copy link
Collaborator

condy0919 commented Apr 15, 2024

Occur is derived from special-mode, and evil-collection has already bound q to quit-window in normal state.

describe-keymap occur-mode-map may help you.

@bcc32
Copy link
Author

bcc32 commented Apr 15, 2024

The original motivation for this PR was to be able to use this mode in Spacemacs. Spacemacs currently only enables a small subset of the modes in evil-collection-mode-list, and certainly doesn't have q bound to quit-window in occur buffers at the moment. (I worry that enabling simple in that list would have lots of other possibly-undesirable side-effects since Spacemacs already sets up its own key bindings for many modes that derive from special-mode).

Perhaps evil-collection-set-readonly-bindings should be used instead, would you recommend using that here?

@condy0919
Copy link
Collaborator

Could you suggest enabling simple for Spacemacs? Or tons of modes derived from special-mode should have an extra evil-collection-set-readonly-bindings .

@bcc32
Copy link
Author

bcc32 commented May 2, 2024

That's a good point, thanks. I've incorporated it into this Spacemacs PR, in case you're curious.

@bcc32 bcc32 closed this May 2, 2024
@bcc32 bcc32 deleted the occur-q-to-quit branch May 2, 2024 04:27
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.

None yet

2 participants