![]() There is a similar named packages called Undotree, which does similar things. ![]() vim in your home directory, or other ones mentioned in the output of :version or -version on the commandline.įor even more control over your undo history, I'd recommend also using Undotree to complement the experience. Will make it so every changes/undo will be permanently kept under the directory undodir under your local vimDir, which is by default either. " Keep undo history across sessions by storing it in a file Then I'd recommend using undo history, which not only (as it's name suggest) relate to the act of undoing an action in the Vim editor, but also the one you save too. There a couple ways that you could do this: Then, obviously, the same goal can be achieved through a tool or through a script, but this apply in many other cases as well. The requirements of the question were precise many opinions have been given, but the question is not - per se - that much opinion-based. This even avoids the use of a script, provides the previous versions of the file and avoids the customization for vi. It is file-based and it is exactly what I was looking for. The tool which is closest to the above requirements (no git, no commit messages, little or nothing overhead) is RCS. I have nothing against git, but I explicitly wished to avoid it (for several reason, last but not least the fact that I don't know it enough). Update: Thanks for all the suggestions and the several solutions that have been introduced. Is there a tool to accomplish this in Linux? I would simply like to edit the file with vi (or equivalent), save it, and automatically record the modification as above (its diff and its time). ![]() I don't want to deal with add, commit messages, push, etc. This is surely possible with Git, but it's too powerful and complex. (Ideally, I would also like to be able to obtain the version of my file at a specific time, but this is a plus, not essential). what has been modified (the diff information).For any modification, I would like to automatically record: I often modify it (adding lines, editing existing lines, or any other possible modification). I have a plain text file (not containing source code). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |