咖啡中折叠 Atom 代码的正确回调是什么
what is the correct callback in coffee for folding code in Atom
我正在尝试通过向其添加快捷方式来破解工具图标咖啡文件,这将允许我 fold/unfold 原子编辑器中的代码。我有以下内容:
@toolBar.addButton
icon: 'plus'
callback: 'run:Cmd+Alt+['
tooltip: 'Expand Code'
iconset: 'icomoon'
但很明显,这是行不通的。这是 atom 的核心功能。如果我按下这些键,我可以分别使用 Cmd+Alt+[
和 Cmd+Alt+]
成功折叠和展开。
使用 core: fold
或 core: unfold
中的核心回调也不起作用
有什么想法吗?
您可以使用 Key Binding Resolver(与 Atom 捆绑)在按下其快捷方式后获取命令名称。
有several commands到fold/unfold个代码,包括这些:
'editor:fold-all'
'editor:unfold-all'
'editor:fold-current-row'
'editor:unfold-current-row'
'editor:fold-selection'
我正在尝试通过向其添加快捷方式来破解工具图标咖啡文件,这将允许我 fold/unfold 原子编辑器中的代码。我有以下内容:
@toolBar.addButton
icon: 'plus'
callback: 'run:Cmd+Alt+['
tooltip: 'Expand Code'
iconset: 'icomoon'
但很明显,这是行不通的。这是 atom 的核心功能。如果我按下这些键,我可以分别使用 Cmd+Alt+[
和 Cmd+Alt+]
成功折叠和展开。
使用 core: fold
或 core: unfold
中的核心回调也不起作用
有什么想法吗?
您可以使用 Key Binding Resolver(与 Atom 捆绑)在按下其快捷方式后获取命令名称。
有several commands到fold/unfold个代码,包括这些:
'editor:fold-all'
'editor:unfold-all'
'editor:fold-current-row'
'editor:unfold-current-row'
'editor:fold-selection'