Keep note histories
- keep history of note files.
- initially, a history file could be a full copy of a note.
- a new history file could be created based on the size of diff of the updated file content and the content of the last history file. for instance, create a new history file if the updated content has 10 lines difference than the current content.
- number of history files could be configurable. for instance, keep N history files for each note.
where is the file going to be kept?
Some perceptual hash technique can be used to generate a hash out of the content and it will give different hash for different note contents while giving the same one for unchanged note. So that we won't need to count the lines or trust the length.
We can keep history files along with the original file. If the file name is "note.txt", history files could be like "note.md.history.1", "note.md.history.2", up to "node.md.N". We can hide these history files in the navigation tree.
About hashing, even if we change a single letter, we would get a different hash, therefore create a new history file. I think that could be overkill. Instead of that, we could create a new history file if the change is significant, for instance, at least N lines or %N percent of the file changed.