You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Autosave package has a single setting: the Enabled toggle. This enables automatically saving the editor when it loses focus, is destroyed, or the window is closed.
This isn't very flexible, so I'd like to propose adding additional settings:
On losing focus
On destroy
On close
(or any combination thereof)
What benefits does this feature provide?
This would allow you to choose when the editor is autosaved.
My use case is that I have the Whitespace package installed, which is set to remove all trailing whitespace on save. With Autosave also enabled, this means when I have my cursor indented on a new line ready to add code, and then I alt-tab away to look something up, when I come back the editor has been saved, the whitespace is removed, and my cursor is no longer indented.
So being able to choose exactly when the editor is autosaved would be really handy. In my case I'd have it autosave on destory and when the window's closed, but not when it loses focus.
Any alternatives?
I think adding additional settings here makes more sense, rather than in another (community) package.
Other examples:
No response
The text was updated successfully, but these errors were encountered:
The good news is that there's a setting in the whitespace package that will prevent this outcome: make sure to check Ignore Whitespace On Current Line if you want to prevent autosave from dedenting your cursor in these scenarios.
(I was worried it was failing to treat the current line as the current line in a situation where focus was lost, but I just tried this out, and it worked the way I hoped.)
In the meantime, this is a fair feature request even if there's a workaround for your scenario, so I'll leave this open. Thanks for the report!
savetheclocktower
changed the title
Additional settings for Autosave package
[autosave] Add settings for more granular behavior
Nov 25, 2024
Thanks @savetheclocktower. Yeah, I saw that option in the Whitespace settings, but I've had trouble in the past when my cursor's on a line with trailing whitespace and I save and close Pulsar, then the whitespace remains (when it should be removed).
Have you checked for existing feature requests?
Summary
The Autosave package has a single setting: the
Enabled
toggle. This enables automatically saving the editor when it loses focus, is destroyed, or the window is closed.This isn't very flexible, so I'd like to propose adding additional settings:
(or any combination thereof)
What benefits does this feature provide?
This would allow you to choose when the editor is autosaved.
My use case is that I have the Whitespace package installed, which is set to remove all trailing whitespace on save. With Autosave also enabled, this means when I have my cursor indented on a new line ready to add code, and then I alt-tab away to look something up, when I come back the editor has been saved, the whitespace is removed, and my cursor is no longer indented.
So being able to choose exactly when the editor is autosaved would be really handy. In my case I'd have it autosave on destory and when the window's closed, but not when it loses focus.
Any alternatives?
I think adding additional settings here makes more sense, rather than in another (community) package.
Other examples:
No response
The text was updated successfully, but these errors were encountered: