atom-local-history
atom-local-history copied to clipboard
Diff and easy restore for files
There should be a command to easily restore a file. The current file will of coarse be added to the history.
I'll probably build this when I have a moment.
Hello,
Generally, I do, either copy / paste the entire file or I merge incrementally with Meld (from the command Local history diff tool).
A great feature would be to make a diff and restores directly from Atom!
We could fork https://github.com/floydpink/atom-compare-files and add the merge functionality.
I think the best is to use a generic NPM module like JSdiff
However, this require time to integrate. I'm busy at the moment :/ If you want make this feature, I merge with pleasure. If nobody does, may be I will do it but in a long time.
@Nicolab I'm interested why to not make git repo for all your folders, and make autocommits. git isn't dependency - it's should be installed to install atom (or on Windows it's untrue?) If this is not a solution I have a time to make this with JSdiff. I think to use two panes diff, like in https://github.com/mupchrch/split-diff
Maybe it would be interesting to choose with difftoolcommand.
So, a custom command that launches the diff view in Atom (same way as Meld).
Concerning the autocommit, I don't know if it's necessary. Maybe be yes but this strategy requires lots of code change.
Using external diff tool isn't ok because it can not be updated instantly. I think it's boring to open history files one-by-one. What I really want - http://sjl.bitbucket.org/gundo.vim/ or https://github.com/mbbill/undotree functionality. I don't think we need tree definitely, but without that history branches wouldn't comfortable.
And why local history isn't incorporated into text-buffer directly it's very frustrating to loose history when you restart atom. In vim constant history is in core. Do you investigate this before starting your plugin?
@terraqout This.
Perserving undo when files are reopened, trees, time based undo. All things I have yet to get used to not having.
This should probably be a separate repo though.
terraqout: Do you investigate this before starting your plugin?
No, because it's not the goal. The goal is only to save the file revision (not the buffer revision).
mrapogee: This should probably be a separate repo though.
:+1:
Just to follow the track:
- Diff tool setting, support of internal command added by PR #38
- @NerdPad posted an awesome timeline view example, git-time-machine (show diff inside Atom itself)