Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
############################################################ {{{1 ###########
# Copyright © 2021 … 2021 Martin Krischik
############################################################ }}}1 ###########

# force correct line ending on well known files.
#
*.applescript text eol=lf
*.bat text eol=crlf
*.btm text eol=crlf
*.cmd text eol=crlf
*.command text eol=lf
*.M65 text eol=lf
*.md text eol=lf
*.pl text eol=lf
*.sh text eol=lf
*.terminal text eol=lf
*.vim text eol=lf

# files without extension:
#
.editorconfig text eol=lf
.git* text eol=lf
.lfsconfig text eol=lf
Makefile text eol=lf

# These files are large files and should be handled by lfs
#
*.7z -text
*.developerprofile -text
*.docx -text
*.dotx -text
*.iso -text
*.mov -text
*.mp4 -text
*.odg -text
*.pdf -text
*.png -text
*.pot -text
*.potx -text
*.ppt -text
*.pptx -text
*.vsd -text
*.wmv -text
*.zip -text

# vim: set nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab :
# vim: set textwidth=0 filetype=conf foldmethod=marker nospell :

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.orig
*.swp
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "Wiki"]
path = Wiki
url = https://github.com/krischik/vim-backup.wiki.git
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

13 changes: 0 additions & 13 deletions README

This file was deleted.

55 changes: 55 additions & 0 deletions README.mediawiki
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
= Numbered Backups =

This is a mirror of http://www.vim.org/scripts/script.php?script_id=1537

== Description ==

Holds numbered backups inside a separate directory.

Automatically purges old backups. Standard is to hold the last 10 versions.

Tested with Linux, MS-Windows and OpenVMS.

; '''IMPORTANT:'''
: Creating this plugin was only possible because vim 7 offers new file management functions - namely :mkdir, finddir() delete() and the new List datatype. This plugin won'g work with vim 6.x.

== Installation ==

Install from https://github.com/krischik/vim-backup using dein (https://github.com/Shougo/dein.vim) or similar:

call dein#begin('$HOME/vimfiles/bundles')
call dein#add('krischik/vim-backup')
call dein#end()
call dein#install()

set the following global variables:

; '''g:backup_directory'''
: name of backup directory local to edited file used for non VMS only. Since non VMS operating-systems don't know about version we would get ugly directory listings. So all backups are moved into a hidden directory.

; '''g:backup_purge'''
: count of backups to hold - purge older once. On VMS PURGE is used to delete older version 0 switched the feature off.

== References ==

{|
|+ Numbered Backups
|-
| Vim-Script || https://www.vim.org/scripts/script.php?script_id=1537
|-
| Source || https://github.com/krischik/vim-backup
|-
| Wiki || https://github.com/krischik/vim-backup/wiki
|-
| Releases || https://github.com/krischik/vim-backup/releases
|-
| Issues || https://github.com/krischik/vim-backup/issues
|-
| Discussions || https://github.com/krischik/vim-backup/discussions
|}

==Comments==

/* vim: set textwidth=0 wrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab : */
/* vim: set filetype=mediawiki fileencoding=utf8 fileformat=unix foldmethod=marker : */
/* vim: set nospell spelllang=en_gb : */
1 change: 1 addition & 0 deletions Wiki
Submodule Wiki added at 8d100e
13 changes: 4 additions & 9 deletions plugin/backup.vim
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
"-------------------------------------------------------------------------------
" Description: Use VMS style versioned backup
" $Id: backup.vim 745 2007-07-08 15:57:40Z krischik $
" Copyright: Copyright (C) 2006 Martin Krischik
" Copyright: Copyright (C) 2006 … 2022 Martin Krischik
" Maintainer: Martin Krischik
" $Author: krischik $
" $Date: 2007-07-08 17:57:40 +0200 (So, 08 Jul 2007) $
" Version: 2.2
" $Revision: 745 $
" $HeadURL: http://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/plugin/backup.vim $
" Version: 3.0
" History: 15.05.2006 MK Fix "Press ENTER ..." on vms systems
" 15.05.2006 MK Fix set backupdir on non vms systems
" 24.05.2006 MK Unified Headers
" 15.10.2006 MK Bram's suggestion for runtime integration
" 15.10.2006 MK Fix pathname with space problem
" 21.09.2022 MK make dein compatible
" Usage: copy to plugin directory.
"-------------------------------------------------------------------------------
" Customize:
Expand All @@ -31,6 +27,7 @@ if exists("s:loaded_backup") || version < 700
finish
else
let s:loaded_backup = 22
setlocal cpoptions-=C

if ! exists("g:backup_purge")
let g:backup_purge=10
Expand Down Expand Up @@ -142,8 +139,6 @@ else
endif

"------------------------------------------------------------------------------
" Copyright (C) 2006 Martin Krischik
"
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
"-------------------------------------------------------------------------------
" vim: textwidth=0 nowrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
Expand Down