Atom editor Atom子词导航键绑定

Atom editor Atom子词导航键绑定,atom-editor,Atom Editor,在我的keymap.cson文件中,我有以下内容: 'atom-text-editor': 'ctrl-left': 'editor:move-to-previous-subword-boundary' 'ctrl-right': 'editor:move-to-next-subword-boundary' 但是,我的编辑器不会拾取这些新绑定(即使在重新启动之后)。另外,这两个(ctrl-alt-X)的默认键绑定也不起作用 我正在使用Atom 1.0.2和所有核心软件包。这正是我添加到

在我的
keymap.cson
文件中,我有以下内容:

'atom-text-editor':
  'ctrl-left': 'editor:move-to-previous-subword-boundary'
  'ctrl-right': 'editor:move-to-next-subword-boundary'
但是,我的编辑器不会拾取这些新绑定(即使在重新启动之后)。另外,这两个(
ctrl-alt-X
)的默认键绑定也不起作用


我正在使用Atom 1.0.2和所有核心软件包。

这正是我添加到我的
keycap.cson
文件中以实现这一功能的内容:

'atom-text-editor':
  'ctrl-left': 'editor:move-to-previous-subword-boundary'
  'ctrl-right': 'editor:move-to-next-subword-boundary'
  'ctrl-shift-left': 'editor:select-to-previous-subword-boundary'
  'ctrl-shift-right': 'editor:select-to-next-subword-boundary'
还要认识到,
keymap.cson
是cson格式的。就像JSON一样,您不能通过写入两次键来“附加”到文件中的键。例如,如果您编写了以下内容:

'atom-text-editor':
  'ctrl-left': 'editor:move-to-previous-subword-boundary'
  'ctrl-right': 'editor:move-to-next-subword-boundary'

...later in the file...    

'atom-text-editor':
  'cmd-l': 'go-to-line:toggle'

然后,子字快捷方式将被“转到行”快捷方式覆盖。内部CSON解析器不会“合并”重复的
atom文本编辑器
键的值。

您现在可能已经解决了这个问题,但我在我的答案中添加了另一种可能性,可以解释为什么它对您不起作用。(这也咬了我一口)