Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.
/ autosave Public archive
forked from atom/autosave

🔒 Autosaves buffers when they lose focus

License

Notifications You must be signed in to change notification settings

pulsar-edit/autosave

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repo is now archived under Pulsar-Edit as it is Bundled into the core editor #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

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

package initialize

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

About

🔒 Autosaves buffers when they lose focus

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%