Why are some of custom keybindings resolved while other are not?


I aded the following lines in keymap.cson

‘.platform-linux atom-text-editor’:
‘ctrl-}’: ‘atom-ctags:go-to-declaration’

‘.platform-linux atom-text-editor’:
‘ctrl-{’: ‘atom-ctags:return-from-declaration’

Restarted editor (single-window), enabled Key Binding Resolver, and tried the key combinations. It is able to resolve ‘ctrl-{’ but not the other.

Any suggestions are appreciated :smile:


You can and should put both commands in the same scope selector:

'.platform-linux atom-text-editor':
  'ctrl-}': 'atom-ctags:go-to-declaration',
  'ctrl-{': 'atom-ctags:return-from-declaration'

Note that indentation is important.


The response is here : Snippets: Why does only the last snippet work? :+1:


Got it,
thanks :smile:


We need a package to enforce the uniqueness of keys in cson. It could show the error when trying to save.


Or to allow duplicates :smile: I would really like that, because it would allow to organize keybindings on a per-package basis instead of per-selector