代码之家  ›  专栏  ›  技术社区  ›  LOTUSMS

在coffee中,在Atom中折叠代码的正确回调是什么

  •  -1
  • LOTUSMS  · 技术社区  · 7 年前

    @toolBar.addButton
      icon: 'plus'
      callback: 'run:Cmd+Alt+['
      tooltip: 'Expand Code'
      iconset: 'icomoon'
    

    但很明显,它不起作用。这是atom的核心功能。如果我按下这些键,我可以用 Cmd+Alt+[ Cmd+Alt+] .

    使用核心回调,如中所示 core: fold core: unfold 也不起作用

    有什么想法吗?

    1 回复  |  直到 7 年前
        1
  •  1
  •   idleberg    7 年前

    您可以使用 Key Binding Resolver

    enter image description here

    several commands 折叠/展开代码,包括:

      'editor:fold-all'
      'editor:unfold-all'
      'editor:fold-current-row'
      'editor:unfold-current-row'
      'editor:fold-selection'