writebackup

writebackup is a Vim plugin that writes backups of current file with date file extension.
Download

writebackup Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Ingo Karkat
  • Publisher web site:
  • http://www.vim.org/scripts/script.php?script_id=1690

writebackup Tags


writebackup Description

writebackup is a Vim plugin that writes backups of current file with date file extension. writebackup is a Vim plugin that writes backups of current file with date file extension.This is a poor man's revision control system, a primitive alternative to CVS, RCS, Subversion, etc., which works with no additional software and almost any file system.The ':WriteBackup' command writes subsequent backups of the current file with a 'current date + counter' file extension (format '.YYYYMMDD'). The first backup of a day has letter 'a' appended, the next 'b', and so on. (Which means that a file can be backed up up to 26 times on any given day.)By default, backups are created in the same directory as the original file, but they can also be placed in a directory relative to the original file, or in one common backup directory for all files (similar to VIM's 'backupdir' option).USAGE: :WriteBackupFor a permanent configuration, put the following commands into your vimrc file (see :help vimrc).To put backups into another directory, specify a backup directory via let g:writebackup_BackupDir = 'D:backups'Please note that this setting may result in name clashes when backing up files with the same name from different directories!A directory starting with "./" (or "." for MS-DOS et al.) puts the backupfile relative to where the backed-up file is. The leading "." is replaced with the path name of the current file: let g:writebackup_BackupDir = './backups'You can override this global setting for specific buffers via a buffer-scoped variable, which can be set by an autocmd, ftplugin, or manually: let b:writebackup_BackupDir = 'X:specialbackupfolder'In case you already have other custom VIM commands starting with W, you can define a shorter command alias ':W' in your .vimrc to save some keystrokes.Developer commentsI like the parallelism between ':w' for a normal write and ':W' for a backup write. command W :WriteBackupRequirements:· VimWhat's New in This Release:· Minor change: Added -bar to :WriteBackup, so that commands can be chained together.


writebackup Related Software