2015-07-13 31 views
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和所有核心軟件包。

+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-text-editor的值。