atom / markdown-preview

📝 Markdown preview in Atom
MIT License
1.23k stars 358 forks source link

Change toggle keybind away from ctrl-shift-m #114

Open dmnd opened 10 years ago

dmnd commented 10 years ago

I'm suggesting that markdown-preview use another keybind so that bracket-matcher can use ctrl-shift-m by default.

ctrl-m is used by bracket-matcher to navigate the cursor to a bracket. It makes sense for the shift key to convert this cursor movement action to a selection action, however ctrl-shift-m is already used by markdown-preview. Note that ctrl-m and ctrl-shift-m are the keybinds used by Sublime too.

Another option would be to reduce the scope of markdown-preview's bind to only Markdown docs, but that would still prevent bracket matching working in Markdown docs and that might be annoying if the doc has code snippets in it. Also it's just generally inconsistent.

See atom/bracket-matcher#17 for more details.

brunetton commented 9 years ago

While waiting for the pull request to be included on next Atom release, we can customize our keymap.cson adding this :

'atom-text-editor':
  'ctrl-shift-m': 'bracket-matcher:select-inside-brackets'
'atom-text-editor[data-grammar="source gfm"]':
  'ctrl-shift-m': 'markdown-preview:toggle'