Skip to content
This is a simple vim plugin that stores each save vim make to a git repo.
VimL Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
bin
plugin
.gitignore
README.md

README.md

Historic - Vim save history using git

This is a simple vim plugin that stores each save vim makes to a git repo. I wrote this because I miss the excellent local history built into Eclipse. Originally I tried vimlocalhistory but we (www.clock.co.uk) are a PHP/JavaScript house and don't have Ruby on all our environments. So I have created a plugin that has as few dependencies as possible.

Requires

  • git
  • bash

Usage

Create a backup of the last save for the current file. If the file hasn't changed then no backup will be made

  :HistoricBackup

Show available revisions for file

  :HistoricList

(Incomplete) Compare the current buffer with a historic version. If you omit revision the latest revision will be used

  :HistoricCompare <Revision>

(Incomplete) Replace the current buffer with a historic version. If you omit revision the latest revision will be used

  :HistoricReplace <Revision>

By default Historic will bind to the save (BufWritePost) of every filetype and run :HistoricBackup. If you would like to disable this function and action the backup manually do the following in you .vimrc.

  let g:historicBackupOnSave = 0

By default Historic will create the backup repo in ~/.vim.backup you can change by defining the location in your .vimrc as below

let g:historicBackupRepoLocation = "~/mycustomlocation"

Credits

Paul Serby

Licence

Licenced under the New BSD License

Something went wrong with that request. Please try again.