smashwilson / merge-conflicts

Resolve git merge conflicts in Atom
https://atom.io/packages/merge-conflicts
MIT License
431 stars 42 forks source link

How Do I Personalize the keybinding? #214

Closed eltommy99 closed 8 years ago

eltommy99 commented 8 years ago

is its possible to personalize them? If it´s not, then why cant i get it to open with the keybindings it says...

smashwilson commented 8 years ago

It is indeed possible to personalize! Choose "Keymap..." from your Atom menu and add CSON to set the keybindings to whatever you wish. You can copy and paste this and change the keys to whatever you prefer:

'atom-text-editor.conflicted':
  'alt-m down': 'merge-conflicts:next-unresolved'
  'alt-m up': 'merge-conflicts:previous-unresolved'
  'alt-m enter': 'merge-conflicts:accept-current'
  'alt-m r': 'merge-conflicts:revert-current'
  'alt-m 1': 'merge-conflicts:accept-ours'
  'alt-m 2': 'merge-conflicts:accept-theirs'

'atom-workspace':
  'alt-m d': 'merge-conflicts:detect'

The Atom docs have basic and advanced guidelines describing the syntax.

If it won't open for you, you may have conflicting keybindings from another package. Check the "Keybindings" tab in your Settings page and explore with the keybindings resolver (run Key Binding Resolver: Toggle from the command palette or use the hotkey to launch it, ⌘ . on a Mac).

smashwilson commented 8 years ago

I'm adding a section on this to the README in #230. :sparkles: