emmetio / emmet-atom

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

Keybinding ctrl-e (emmet:expand-abbreviation) interferes with core keybinding #119

Open jclark-dot-org opened 10 years ago

jclark-dot-org commented 10 years ago

Emmet adds a keybinding, ctrl-e, for the command emmet:expand-abbreviation. This conflicts with the Atom core binding for editor:move-to-end-of-line. This is a standard binding on many Unix systems (including Mac OS X) which originated with emacs. It is also the only Atom binding for editor:move-to-end-of-line, out of the box. This binding should be changed to avoid interfering with a core Atom binding.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/3405501-keybinding-ctrl-e-emmet-expand-abbreviation-interferes-with-core-keybinding?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).
jclark-dot-org commented 10 years ago

Forgot to add my workaround. In your keymap.cson file:

#workaround for emmet mapping of expand-abbreviation
'.editor:not(.mini)':
  'ctrl-e': 'unset!'                           # remove all bindings
  'ctrl-e': 'editor:move-to-end-of-line'       # remap core binding
  'alt-cmd-e' : 'emmet:expand-abbreviation'    # alternate binding for emmet
szimek commented 10 years ago

Same for ctrl-d at least on OS X...

arnohattingh commented 10 years ago

Almost none of the key bindings work in Windows. Enter stopped working, but I got that fixed. Tab does not work. Ctrl+E does not work. I have gone through all of the issues on this repo, I've tried all the solutions, and none of them works.

qq99 commented 10 years ago

:+1: The suggestion from @jclark-dot-org worked for me

S-Ethan commented 9 years ago

Thanks @jclark-dot-org, it worked for me too!! Although I changed it from alt-ctrl-e to tab.

kyoyadmoon commented 8 years ago

Thanks @jclark-dot-org !

palaniichukdmytro commented 8 years ago

thanks, @jclark-dot-org start using atom instead sublime, tab is working for me better and faster

ghost commented 7 years ago

@arnohattingh Same here, on Windows I cannot get TAB to autocomplete HTML, only CTRL + E will autocomplete HTML. Please see the new issue and kindly let me know what can or could possibly be done. Thank you heaps.

Baldrani commented 7 years ago

Completely agree, it does not make sense. And thanks for the workaround

levbrie commented 7 years ago

The workaround from @jclark-dot-org that seems to be meeting with a lot of success didn't work for me - I got a "Failed to load" error: Duplicate key 'ctrl-e'. The workaround to this makes things even more straightforward. Just:

'atom-text-editor:not([mini])':
  'ctrl-e': 'editor:move-to-end-of-line'

worked perfectly for me.

wbusby88 commented 7 years ago

Today mine stopped working (on Windows) for some reason and this got it working again

'.platform-win32 atom-text-editor, .platform-linux atom-text-editor':
    'ctrl-e': 'unset!'
'.editor:not(.mini)':
        'ctrl-e' : 'emmet:expand-abbreviation'
louwers commented 7 years ago

ctrl-shift-, also interferes on Linux (with editor-scroll-to-cursor)

'atom-text-editor:not([mini])':
  'ctrl-shift-,': 'unset!'
  'ctrl-shift-,': 'emmet:select-previous-item'

yields

Edit: I had to rebind ctrl-< for some reason.

dbphanna commented 7 years ago

Past it into keymap your emmet with tab will work

'.editor:not(.mini)': 'tab' : 'emmet:expand-abbreviation' # alternate binding for emmet

backspaces commented 7 years ago

What is the answer to the ctrl-d problem. I want to retain the current "delete forward" or "delete character ahead". But I don't know atom's name for that to use in my keymap!

I.e. this works for ctrl-e:

'atom-text-editor:not([mini])':
  'ctrl-e': 'editor:move-to-end-of-line'

But I don't know the name for delete-forward. Using

'atom-text-editor:not([mini])':
  'ctrl-d': 'editor:delete-forward'
  'ctrl-e': 'editor:move-to-end-of-line'

Does not work.

backspaces commented 7 years ago

Here's the solution for ctrl-d being delete forward: 'ctrl-d': 'core:delete' I found this by looking at the github repo under keymaps.