vishr / local-history

A Sublime Text 2/3 plugin for maintaining local history of files. [backup | open | compare | incremental diff]
http://vishr.com/local-history
MIT License
227 stars 21 forks source link

Disable history pruning #58

Closed StoyanDimitrov closed 8 years ago

StoyanDimitrov commented 9 years ago

Also fixes #53.

Note: This patch includes breaking changes - namely pref renaming and pref file renaming.

vishr commented 9 years ago

@StoyanDimitrov I am far away from understanding my own code and ST. Can you make sure everything works on ST 2 & 3? Also what do you mean "this patch has breaking changes"?

primitives commented 9 years ago

Has this been integrated into the plugin yet? Specifically hoping to see #53...

StoyanDimitrov commented 9 years ago

I have not tested ST2. Under ST3 the plugin work as expected, although the pref history_on_close does not seems to have any difference. I can't relate my change breaking it. What I really meant by "breaking changes" is "backward incompatible change". I had in mind the rename of "LocalHistory.sublime-settings" to "Local History.sublime-settings" for consistency.

StoyanDimitrov commented 9 years ago

Wrong button.

vishr commented 9 years ago

Can someone test it with ST2 as well?

primitives commented 9 years ago

Maybe I'm just being dense but I can't seem to install this plugin. In package control the latest version I see is 2014.03.27.23.59.24 by vishr. So how do I get your version installed? I've tried downloading the zip file and extracting it to ~/.config/sublime-text-3/Packages/local-history but it doesn't appear inside ST3 and, in fact, the unzipped files are deleted when package control is opened...

StoyanDimitrov commented 9 years ago

@primitives Have the Local History.sublime-package in the Installed Packages folder. I had the same problems you describe before figure it out this way.

primitives commented 9 years ago

@StoyanDimitrov Ok, so I downloaded the zip from the right-side of your project page. I renamed it from .zip to .sublime-package and dropped it into "~/.config/sublime-text-3/Installed Packages/" and opened ST3. I then see a new menu item \Tools\Local History\Delete All which is always grayed out. I go to "Package Settings\Local History\Settings - User" and I manually paste the settings from the bottom of the project main page, since the settings are currently empty, and I manually adjust the path to "~/.sublime/history/"

I then restart ST3 and open a random php or css file in my development folder while having ~/.sublime/history/ open in another window to watch what happens, and nothing happens. I make a small edit to the file and save it. Nothing happens in the backup folder. I close the file. Nothing happens. I reopen ST3 and undo the change and save again. Nothing happens.

I don't know what it is about ST but the only plugins that ever work for me are the ones that come straight from Package Control inside the app, except for themes. Those always seem to work.

StoyanDimitrov commented 9 years ago

@primitives I don't know for sure what is the cause, may be something left from ST2, but the settings for the plugin are in separate file that does not exists by default. Just create an empty file named Local History.sublime-settings in Data/Packages/User or wherever your setting are and paste your prefs there. Note that the history_retention is renamed to days_to_keep_files.