在 atom 上编辑 keymap.cson 时重复键 'ctrl-e'

Duplicate key 'ctrl-e' when editing keymap.cson on atom

所以我只是想覆盖 emmet 核心快捷方式,但是当我编辑 keymap.cson 时,我遇到了这个错误:

Failed to load /Users/Me/.atom/keymap.cson Duplicate key 'ctrl-e'

但是我正在取消设置并重新映射它,所以为什么会出现此错误?这是你的配置文件:

# Your keymap
#
#workaround for emmet mapping of expand-abbreviation

'.editor':
  '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

'atom-text-editor':
  'alt-backspace': 'editor:delete-to-previous-word-boundary'
  'alt-delete': 'editor:delete-to-next-word-boundary'

"unset! is only useful when you want to disable a key completely. When you want a key to be bound to a different command than the default, it is unnecessary to use unset!"

我猜他们偷偷更新了它什么的,因为我最近不知从哪里冒出来了同样的问题,注释掉 "unset!" 行似乎已经解决了它。

祝你好运!

所以基本上你只需要删除 'ctrl-e': 'unset!'