emmetio / emmet-atom

Emmet support for Atom
MIT License
763 stars 181 forks source link

confilct with markdown-preview #196

Open lesonky opened 9 years ago

lesonky commented 9 years ago

when enable this plugin ,markdown-preview can not work

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/7974364-confilct-with-markdown-preview?utm_campaign=plugin&utm_content=tracker%2F535900&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F535900&utm_medium=issues&utm_source=github).
RyenNelsen commented 9 years ago

+1 Also having this issue.

austincummings commented 9 years ago

+1

silvenon commented 9 years ago

I'm not having this issue. (I guess that is useful info too?)

dnorton commented 9 years ago

Emmet and the Markdown Preview plugins both use the keyboard shortcut "Ctl+Shift+M".

emmet: used for line merge markdown: preview the Markdown file in HTML

Not sure if the order of installation matters or not.

You can change it by going into "${ATOM_HOME}/packages/emmet/keymaps" and editing "emmet.cson". I simply changed mine to "ctrl-alt-m".

astanush commented 9 years ago

Markdown Preview is a core package that is enabled by default. Would it be a best practice for community packages not to duplicate keyboard shortcuts of core packages?

And a question:

You can change it by going into "${ATOM_HOME}/packages/emmet/keymaps" and editing "emmet.cson". I simply changed mine to "ctrl-alt-m".

Does this change get overridden when the Emmet package is updated?

dnorton commented 9 years ago

@astanush, yep. It does get overridden.

sergeche commented 9 years ago

You don’t have to change anything in plugin files, simply Atom > Open Your Keymap instead

astanush commented 9 years ago

What line would I add to keymap.cson to override Emmet's "merge lines" shortcut? I tried the following, but the ctrl-shift-m Markdown Preview shortcut still isn't working:

'atom-text-editor:not([mini])':
    'ctrl-alt-m': 'emmet:merge-lines'
sergeche commented 9 years ago

You’re telling Atom to bind Emmet’s Merge Line action to ctrl-alt-m. I think you need something like

'atom-text-editor:not([mini])':
    'ctrl-alt-m': 'markdown-preview:toggle'
astanush commented 9 years ago

Gotcha. I looked at markdown-preview.cson to find the correct selector. The following is working for me:

'atom-workspace, atom-workspace atom-text-editor':
  'ctrl-alt-m': 'markdown-preview:toggle'

:tada: