Keyboard Shortcut overriding (Emmet and Markdown Preview)

I’m trying to figure out how to make ctrl-shift-m always trigger markdown-preview:toggle, but Emmet is conflicting with it and always overpowering it.

I’ve tried to put this in keymap.cson but Emmet’s emmet:merge-lines still prevails as default:

'.workspace, .workspace .editor, .workspace .editor:not(.mini)':
  'ctrl-shift-m': 'markdown-preview:toggle'

How can I force markdown-preview:toggle as a user?


What does the Keybinding Resolver Ctrl+. say when you press Ctrl+Shift+M?

For future reference, the Debugging document covers basic keybinding debugging:

1 Like

Thanks for your help leedohm! I did find the Keybinding Resolver, but it seems my own keymap.cson is not overriding the package default:

… or am I free to edit that emmet.cson without it being clobbered when Emmet updates?

If you’re on the latest version of Atom, you might want to change your selector to simply atom-text-editor and see if that fixes it. (And if you’re not on the latest version of Atom, you should try that too! :grinning:)

Updated to 0.168.0, all packages up to date. Still no dice:

Wait … have you tried just .editor:not(.mini) as your selector? I don’t think the Keybinding Resolver supports the comma operator in selectors.


Yay! That works! Thanks for your help!



i have the same problem with emmet and markdown-prewivew. Can you post the string which i have to put into my keymap.cson file to make ‘ctrl-shift-m’ always the ‘markdown-prview:toggle’ -command.

Thanks in advance

Had the same issue, fixed it with these lines:

  'ctrl-shift-M': 'markdown-preview:toggle'
1 Like

Worked like a charm. Thanks!

I removed the 2 “offending” lines from emmet.cson, as I wasn’t thinking the merge keyboard shortcut was all that important (at present).

Do you think this will cause issues when emmet updates/upgrades? Or maybe my future self will not be happy?

Or maybe there was a better way to manage keybindings. I know that can disable the markdown keybindings and create my own? Curious how the cracker-jack programmers manage keybindings with so many packages…

Thanks for your insight.