Skip to content

This is a simple vim plugin that stores each save vim make to a git repo.

Notifications You must be signed in to change notification settings

serby/vim-historic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

This is a simple vim plugin that stores each save vim make to a git repo.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published