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
  • 4 months ago
  • 35 minutes ago
  • 5 years ago

Installs

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