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

go and ctags key binding conflict #7306

Closed
JAremko opened this issue Oct 6, 2016 · 6 comments
Closed

go and ctags key binding conflict #7306

JAremko opened this issue Oct 6, 2016 · 6 comments

Comments

@JAremko
Copy link
Collaborator

JAremko commented Oct 6, 2016

go layer uses SPC m g c for go-coverage and gtags layer SPC m g c for helm-gtags-create-tags

Can we use SPC m g C for helm-gtags-create-tags ? This is not a function that you would call often and it will help to avoid similar conflicts.

@deb0ch
Copy link
Contributor

deb0ch commented Oct 6, 2016

Or maybe use SPC m g C for go coverage and keep SPC m g c consistent with all the other layers ?

@JAremko
Copy link
Collaborator Author

JAremko commented Oct 6, 2016

@deb0ch I mean use SPC m g C helm-gtags-create-tags for all layers. This way it will have less chance to collide with a layer bindings ( SPC m g C is less likely to be used than SPC m g c + SPC m g c can be used for something that a user would like to use often - it is easier to input.)

@JAremko
Copy link
Collaborator Author

JAremko commented Oct 20, 2016

It looks like some other layers (like Clojure) are already using SPC m g C for their stuff. So it looks like we should go with changing go-coverage key binding to SPC m g C

@TheBB Mb this is also ready for work Beginner friendly 😉 ? also it's a bug(key binding conflict) fix.

@quicknir
Copy link
Contributor

IMHO, no layer other than the one responsible for the major mode should be allowed to bind anything under the major mode prefix. As long as this is ok, you're going to have conflicts like this that have to be resolved ad hoc.

The correct fix would be to make the helm layer not bind anything. Instead, provide a function where you give it a prefix, and then the layer would bind all of its shortcuts under that prefix. Layers can then choose whether or not to call that function, and at which prefix. Consistency between layers would be nice but not at the expense of conflicts.

@JAremko
Copy link
Collaborator Author

JAremko commented Mar 13, 2017

@quicknir Makes sense. Also we can detect collisions by parsing spacemacs/set-leader-keys-for-major-mode forms in the sources code or check if a key binding already exist during evaluation and warn if collision is detected. @syl20bnr

This was referenced Mar 14, 2017
@JAremko JAremko mentioned this issue Mar 28, 2017
32 tasks
@syl20bnr
Copy link
Owner

Actually I went with the initial proposition by @JAremko which was to move create tags to SPC m g C.

In clojure layer SPC m g c was free so I moved SPC m g C to SPC m g c. Moreover SPC m g c was used in other layers than go. Finally as stated, the action of creating tags is not so common so it is a good candidate for a shifted key.

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

No branches or pull requests

5 participants