There's a way to know when a file is saved? Event?


#1

I need to know when a file is saved to run some command on my package.
Where I need to listen to a event or assign callback? Any documentation link?

Thanks in advance.


#2

You should be able to subscribe to the saved event on the buffer, similar to how this package does it: https://github.com/atom/symbols-view/blob/fc77d056505e5465ea4652ad40e5fa46d11f3c1d/lib/file-view.coffee#L11

We don’t have docs on events yet!