ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Local History

by vishr ST2/ST3

A Sublime Text 2/3 plugin for maintaining local history of files. [backup | open | compare | incremental diff]

Details

  • 2016.09.12.07.22.25
  • vishr.​com
  • github.​com
  • 6 months ago
  • 1 hour ago
  • 5 years ago

Installs

  • Total 40K
  • Win 21K
  • OS X 12K
  • Linux 7K
Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13 Feb 12 Feb 11 Feb 10 Feb 9 Feb 8
Windows 16 23 21 31 30 17 18 15 25 33 26 34 20 15 19 28 27 27 20 23 15 16 18 20 24 25 19 15 16 17 28 19 32 29 11 15 23 33 21 22 19 8 16 25 21 37
OS X 3 6 5 9 12 7 11 10 6 14 11 14 11 7 6 11 12 17 12 18 7 9 9 9 22 13 14 7 8 13 17 17 14 12 11 11 13 13 10 15 6 7 5 12 11 14
Linux 3 7 5 1 7 9 2 5 8 9 12 15 11 6 3 11 8 8 8 7 2 6 7 9 8 15 9 2 5 5 14 11 4 10 11 3 14 9 19 6 11 5 6 6 3 7

Readme

Source
raw.​githubusercontent.​com

Local History

A Sublime Text package for maintaining a local history of files.

Benefits

  • Every time you modify a file, a copy of the old contents is kept in the local history when you:
    • open the file.
    • close the file.
    • and/or loose focus.
  • Available functions are:
    • file comparison of the open file and any of its older versions from the history.
    • incremental diff view.
  • Functions are available via:
    • the right-click context menu.
    • the Local History: ... commands from the command palette.
  • Local History helps you out when you change or delete a file by accident.
  • Local History can help you out when your workspace has a catastrophic problem or if you get disk errors that corrupt your workspace files.
  • File revisions are stored in separate files (with full path):

Installation

  • Via Package Control:
    • Install Package Control
    • Open the command palette (CtrlShift ⇧P)
    • Choose Package Control: Install Package
    • Search for Local History and select to install.
  • Clone the repo: git clone git://github.com/vishr/local-history.git "Local History" into your Sublime Text Packages directory.
    • via HTTPS: https://github.com/vishr/local-history.git
    • via SSH: git@github.com:vishr/local-history.git
  • current snapshot of master

Settings

Default settings

"history_retention": 0, // number of days to keep files, 0 to disable deletion
    "format_timestamp": "%Y%m%d%H%M%S", // file_name-XXXXXXXX.file_extension
    "history_on_close": true, // only save LocalHistory after closing a file, not when original was saved
    "history_on_focus_lost": false,
    "history_on_load": true,
//  "history_path": "",
    "portable": true,
    "file_size_limit": 4194304 // 4 MB

Local History path

Local History's target directory for file revisions can be set as follows:

  • For "portable": true, Local History will save to Sublime Text/Data/.sublime/Local History/... wherever Sublime Text is installed.
  • Setting "portable": false will change the target folder to the ~/.sublime/Local History/... subfolder of your user directory.
    • If "portable": false changing "history_path": "..." will give you the option to change the target directory to a custom path.

Usage

Context Menu

  • Functions are available via:
    • the right-click context menu.
    • the Local History: ... commands from the command palette.

Tools Menu

  • To permanently delete all history files, choose Tools > Local History > Delete Local History > Permanently delete all