sponsor Vim development Vim logo Vim Book Ad

decvers.vim : DEC style backup files

 script karma  Rating 0/0, Downloaded by 61  Comments, bugs, improvements  Vim wiki

created by
Mark Manning
 
script type
utility
 
description
Wanted the old Digital Equipment Corporation (or DEC for short) way of doing backups. All that would happen is that the current file was copies to <filename>.<extension>;<backup>. So I wrote this plugin to do that very thing. You can modify the script and change MAX_BACKUPS from the default value of '3' to however many you want. The program is fairly straight forwards. First it get a list of files with the backup extension, determines the highest number, makes a new backup, and then cleans out the list until it matches the MAX_BACKUPS variable's number. Please note that you should never change the PRINTF command to just have '%d' in it. This is because of the way DOS handles sorting numbers. So instead of 1,2,3,4,5,6,7,8,9,10 you will wind up with 1,10,2,3,4,5,6,7,8,9 which causes problems. Instead, just leave the PRINTF command with the '%05d' which says "Give me 5 decimail places with leading zeros" which makes everything line up properly. Have fun!
 
install details
Install into the plugin directory
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
decvers.vim 1.0 2025-02-15 7.0 Mark Manning Initial upload
ip used for rating: 18.97.14.82

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github