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 |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 18.97.14.82
|