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
Would it be possible to detect changes without having to save the file? I think GitGutter does this.
I know, that there is an option for autosave, but this is not really convenient. Especially, if you got a file watcher running in your build system which listens to file changes and reacts to them.
Apart from that, autosave only saves the file if I unfocus and refocus the view. Is this behavior intended?
The text was updated successfully, but these errors were encountered:
Could you verify GitGutter does that?
If so, I'll take a look at its implementation.
Apart from that, autosave only saves the file if I unfocus and refocus the view. Is this behavior intended?
Yes. The idea was that you may edit a file (that is currently opened in Sublime) in another editor, then when you switch back to Sublime, Modific will update gutter when content updates.
Turns out many users don't like that, because not all want to save a file.
When I was implementing that feature, I couldn't imagine someone wouldn't want to save a file.
Yes, GitGutter does this definitely. As far as I can tell it writes the current content of the buffer to a temporary file and diffs it against the current head of the repository.
I think, this is the corresponding code part.
As long as the diffing is asynchronous and debounced, I don't think that this is a problem. In spite of the lag, it probably will feel more immediate than having to save the file manually.
Would it be possible to detect changes without having to save the file? I think GitGutter does this.
I know, that there is an option for autosave, but this is not really convenient. Especially, if you got a file watcher running in your build system which listens to file changes and reacts to them.
Apart from that, autosave only saves the file if I unfocus and refocus the view. Is this behavior intended?
The text was updated successfully, but these errors were encountered: