Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Unsetting a key doesn't appear to work with complex selector #79

@lee-dohm

Description

@lee-dohm

Ref: atom/markdown-preview#114

I was experimenting with my keybindings to unmap the default Markdown Preview key:

'atom-workspace, atom-workspace atom-text-editor':
  'ctrl-shift-M': 'markdown-preview:toggle'

and set a new, grammar-scoped key:

'atom-text-editor[data-grammar="source gfm"]':
  'ctrl-shift-M': 'markdown-preview:toggle'

So I added the following to my keymap.cson:

'atom-workspace, atom-workspace atom-text-editor':
  'ctrl-shift-M': 'unset!'
'atom-text-editor[data-grammar="source gfm"]':
  'ctrl-shift-m': 'markdown-preview:toggle'

which, in theory, should make it so that Ctrl+Shift+M should only activate the Markdown Preview when a GFM text editor is focused. But if I do the following:

  1. With the keymap modification above active, open a Markdown file
  2. Focus the tree view
  3. Press Ctrl+Shift+M

Expected: Markdown Preview is not displayed
Actual: Markdown Preview is displayed

Here's what I see in the Keybinding Resolver:

screen shot 2015-05-11 at 8 21 40 am

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions