Skip to content

Instantly share code, notes, and snippets.

@greduan
Created March 9, 2016 03:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greduan/2a4bbd57954dd1898958 to your computer and use it in GitHub Desktop.
Save greduan/2a4bbd57954dd1898958 to your computer and use it in GitHub Desktop.
Atom: Destroy other items in pane when we open a new item
// We don't need empty panes
if (atom.config.get('core.destroyEmptyPanes')) {
atom.config.set('core.destroyEmptyPanes', true)
}
atom.workspace.onDidOpen(function (event) {
/**
* event = { item, pane, index }
*/
event.pane.destroyInactiveItems()
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment