autosave Documentation

Lock: Autosaves buffers when they lose focus

0 stars JavaScript JavaScript 1 file ยท ~331 tokens
RAW Doc

Technical Documentation: pulsar-edit/autosave

โ„น๏ธ Provenance: Multi-Tier Ingestion ยท CodeWiki Reference

Overview (`README.md`)

This repo is now archived under Pulsar-Edit as it is Bundled into the core editor [#424](https://github.com/pulsar-edit/pulsar/pull/424)

Autosave package

Autosaves editor when they lose focus, are destroyed, or when the window is closed.

This package is disabled by default and can be enabled via the autosave.enabled config
setting or by checking Enabled in the settings for the autosave package in the
Settings view.

Service API

The service exposes an object with a function dontSaveIf, which accepts a callback.
Callbacks will be invoked with each pane item eligible for an autosave and if the callback
returns true, the item will be skipped.

Usage

package.json

json
"consumedServices": {
  "autosave": {
    "versions": {
      "1.0.0": "consumeAutosave"
    }
  }
}

package initialize

javascript
consumeAutosave({dontSaveIf}) {
  dontSaveIf(paneItem -> paneItem.getPath() === '/dont/autosave/me.coffee')
}

--- METRICS ---