📜  保存原子时自动缩进 - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:51.728000             🧑  作者: Mango

代码示例1
atom.workspace.observeTextEditors (editor) ->
  editor.buffer.onWillSave ->
    return if editor?.getGrammar()?.scopeName is 'source.coffee'
    editor.autoIndentBufferRows 0, editor.getBuffer().getLineCount() - 1