Skip to content

bakaup.vim is an enhanced automatic backup system. Backup your file when you written a file like`/path/to/file.txt`, it backed up to `{backup-dir}/%path%to%2025-10-10_09-40_file.txt`

License

Notifications You must be signed in to change notification settings

aiya000/bakaup.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💾 bakaup.vim

A powerful version history plugin for Vim that automatically creates timestamped backups on every save!

📝 Backup your file every save

This plugin automatically backs up your file every time you :write it, creating a comprehensive version history 🐶

For example, in /home/you/todo.md, and when you did :write at 2016-10-06 11:06, bakaup.vim creates:

~/.backup/vim_backup/2016-10-06/%home%you%todo.md_at_11:06

Save it again at 11:42? You are careful to overwrite?

Don't worry! You will get another backup file:

~/.backup/vim_backup/2016-10-06/%home%you%todo.md_at_11:42

Meaning, you'll get:

$ cd ~/.backup/vim_backup/2016-10-06 && ls %home%you%todo.md*
%home%you%todo.md_at_11:06
%home%you%todo.md_at_11:42

You can go back to any save point - perfect for when you realize you deleted something important hours ago!

🚀 Use Cases

  • Recover accidentally deleted code from any previous save
  • Review your work history and see how your document evolved
  • Safe experimentation - try changes knowing you can always go back
  • No git repository needed - works for config files, notes, scripts, anything!
  • Finer granularity than git commits - every save is preserved

⚡ Vim's standard backup vs bakaup.vim

Unlike Vim's standard 'backup' option which only keeps one previous version per file, bakaup.vim creates a complete history of all your saves with precise timestamps!

Feature Vim's 'backup' bakaup.vim
Backup frequency Only before overwrite Every :write
History depth 1 backup (latest only) Unlimited backups
Timestamp precision No timestamp Hour:Minute precision
Organization Same directory or simple backup dir Date-organized directories
Recovery Overwrite risk Safe history browsing

With Vim's standard backup: When you save todo.md multiple times, you only get todo.md~ - just the previous version.

With bakaup.vim: Every save creates a new timestamped backup, giving you a complete version history!

📦 How to install

dein.vim

call dein#add('aiya000/bakaup.vim')

Or if you use toml:

[[plugins]]
repo = 'aiya000/bakaup.vim'

For lazy loading with toml:

[[plugins]]
repo = 'aiya000/bakaup.vim'
on_cmd = [
    'BakaupBackupExecute',
    'BakaupEnable',
    'BakaupDisable',
    'BakaupArchiveBackups',
    'BakaupExplore',
    'BakaupTexplore',
    'BakaupVexplore',
    'BakaupSexplore',
]

lazy.nvim

{
  'aiya000/bakaup.vim',
  init = function()
    vim.g.bakaup_auto_backup = 1
    -- Optional: customize backup directory
    -- vim.g.bakaup_backup_dir = vim.fn.expand('~/my_backups')
  end,
}

Important for lazy.nvim users: Use the init function (not config) to set g:bakaup_auto_backup before the plugin loads.

⚙️ How to use this

For Vim or manual setup

let g:bakaup_auto_backup = 1

This value is 0 by default.

bakaup.vim is not enabled by default. Above line enables bakaup.vim!

More specs are available in ./doc (:help bakaup.vim) 🐕

About

bakaup.vim is an enhanced automatic backup system. Backup your file when you written a file like`/path/to/file.txt`, it backed up to `{backup-dir}/%path%to%2025-10-10_09-40_file.txt`

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •