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 39K
  • Win 20K
  • OS X 12K
  • Linux 7K
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 Feb 7 Feb 6 Feb 5 Feb 4 Feb 3 Feb 2 Feb 1 Jan 31 Jan 30 Jan 29 Jan 28 Jan 27 Jan 26 Jan 25 Jan 24 Jan 23 Jan 22 Jan 21 Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12
Windows 6 16 17 28 19 32 29 11 15 23 33 21 22 19 8 16 25 21 37 28 24 14 18 26 29 20 31 21 5 14 39 25 19 32 29 21 19 22 33 22 27 35 15 20 26 26
OS X 3 8 13 17 17 14 12 11 11 13 13 10 15 6 7 5 12 11 14 10 14 9 4 8 2 22 9 13 8 11 16 9 9 7 19 4 8 9 11 15 11 18 9 4 11 16
Linux 0 5 5 14 11 4 10 11 3 14 9 19 6 11 5 6 6 3 7 10 13 6 6 10 11 12 6 8 3 2 6 12 7 12 5 10 6 16 8 10 8 8 4 3 8 8

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