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

[core] new function spacemacs/set-root-leader-keys-for-mode #14422

Closed
wants to merge 1 commit into from

Conversation

thanhvg
Copy link
Contributor

@thanhvg thanhvg commented Feb 24, 2021

[core] This function allows to bind a mode command behind dotspacemacs-leader-key' and dotspacemacs-emacs-leader-key' when that mode is activate.

[org] apply this function to org narrow commands

motivation:

Currently spacemacs/set-leader-keys-for-major-mode and
spacemacs/set-leader-keys-for-minor-mode only let us bind command under spc m and , That works fine in general. But not all commands should go there. A
mode that deals with compilation or comments when active should have commands
bound behind spc c not spc m. Another example is org-mode narrow commands
should go to prefix spc n not a long and tedious spc m s b n.

[core] This function allows to bind a mode command behind `dotspacemacs-leader-key' and
`dotspacemacs-emacs-leader-key' when that mode is activate.

[org] apply this function to org narrow commands

motivation:

Currently `spacemacs/set-leader-keys-for-major-mode` and
`spacemacs/set-leader-keys-for-minor-mode` only let us bind command under `spc
m` and `,` That works fine in general. But not all commands should go there. A
mode that deals with compilation or comments when active should have commands
bound behind `spc c` not `spc m`. Another example is org-mode narrow commands
should go to prefix `spc n` not a long and tedious `spc m s b n`.
@smile13241324
Copy link
Collaborator

@syl20bnr can you comment on this PR, I am not sure if those global bindings are not breaking our conventions. If they do the least we should do is to merge the general function to allow people to use it in their personal configs.

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