-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path0089 - savevers.vim.json
More file actions
139 lines (139 loc) · 10.3 KB
/
0089 - savevers.vim.json
File metadata and controls
139 lines (139 loc) · 10.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
{
"script_id": "89",
"display_name": "savevers.vim",
"summary": "Automatically save and diff multiple, sequentially numbered revisions (like VMS)",
"name": "savevers.vim",
"script_type": "utility",
"description": "Automatically saves and compares multiple, sequentially numbered\nold revisions of files (like in VMS)\n\nIf the 'patchmode' option is non-empty, then whenever a file\nis saved, a version of the previously saved version is kept,\nbut renamed to {file}.{number}.{patchext}, where:\n {file} is the filename of the file being saved\n {number} is a number between 0001 and 9999\n {patchext} is the value of the 'patchmode' option.\n\nOptionally, the saved versions can be placed in a subdirectory.\n\nNote that this plugin is DISABLED if 'patchmode' is empty.\nAlso, this plugin won't work if 'backupdir' is empty or if\n'backup' is unset, so to get started, put the following in\nyour \".vimrc\"\n\n set backup\n set patchmode=.clean\n\nSo, for example, if 'patchmode' is '.clean' and we save a\nfile named \"test.txt\" we'll have the following files:\n\n-rw-r----- 1 eralston admin 106 Sep 20 11:14 test.txt\n-rw-r----- 1 eralston admin 102 Sep 20 11:12 test.txt.0001.clean\n\nIf we make subsequent changes to \"test.txt\" and save it a\nfew more times, we'll end up with something like:\n\n-rw-r----- 1 eralston admin 226 Sep 20 11:43 test.txt\n-rw-r----- 1 eralston admin 102 Sep 20 11:12 test.txt.0001.clean\n-rw-r----- 1 eralston admin 106 Sep 20 11:14 test.txt.0002.clean\n-rw-r----- 1 eralston admin 132 Sep 20 11:22 test.txt.0003.clean\n-rw-r----- 1 eralston admin 148 Sep 20 11:34 test.txt.0004.clean\n\nCOMMANDS:\n :Purge [-a] [-v] [N]\n Removes all but the patchmode files numbered N and below.\n The [N] is optional, and defaults to 1.\n Normally, this operates only on the patchmode files associated\n with the current buffer, but if the [-a] flag is given, then\n it operates on all patchmode files in the directory of the\n current file.\n If the optional [-v] (verbose) flag is given, then the filename\n of each deleted patchmode file is printed.\n\n Use \":Purge 0\" to delete all of the patchmode files for the\n current file.\n\n Use \":Purge -a 0\" to delete all of the patchmode files in\n the directory of the current file.\n\n :VersDiff [arg]\n Does a \"diffsplit\" on the current file with the version\n indicated by [arg]. So, for example, if the current\n file is \"test.txt\" then the \":VersDiff 5\" command will\n do a \"diffsplit\" with \"test.txt.0005.clean\", assuming\n &patchmode is \".clean\"\n\n If [arg] is zero (the default), then the diff is done with\n the current saved version of the file.\n\n If [arg] is negative, then the diff is done with the\n [arg]th oldest file; e.g., if [arg] is \"-5\" and there are\n versions 0001-0023 saved on disk, then the version that\n is diffed will be (23-5+1)=19, i.e, \"test.txt.0019\" will\n be diffed.\n\n If [arg] is \"-cvs\", then the diff is done with the most recently\n checked-in version of the file.\n\n If [arg] is \"-\", then the current VersDiff window is decremented.\n If [arg] is \"+\", then the current VersDiff window is incremented.\n (Note that if VersDiff is currently doing a cvs diff, then\n the cvs revision is incremented/decremented)\n\n If [arg] is \"-c\", then any current VersDiff window is closed.\n\nHINTS:\n If you use GNU 'ls', then try adding \"-I'*.clean'\" (without the\n double quotes) to your 'ls' alias (assuming &patchmode==.clean)\n\n It's also helpful to have the patchmode value in the backupskip,\n suffixes, and wildignore vim options:\n\n :exe \"set backupskip+=*\" . &patchmode\n :exe \"set suffixes+=\" . &patchmode\n :exe \"set wildignore+=*\" . &patchmode\n\n Also, here are some nice mappings that allow quick comparison\n of the current file with previous versions. Pressing <F5>\n successively shows the diff with older versions.\n\n \" <F5> decrease version viewed in VersDiff window\n \" <F6> increase version viewed in VersDiff window\n \" <F7> do VersDiff with cvs version of current file\n \" <F8> cancel VersDiff window\n nmap <silent> <F5> :VersDiff -<cr>\n nmap <silent> <F6> :VersDiff +<cr>\n nmap <silent> <F7> :VersDiff -cvs<cr>\n nmap <silent> <F8> :VersDiff -c<cr>",
"install_details": "Save the plugin as $VIMRUNTIME/plugin/savevers.vim\nand you're good to go. The default settings should\nwork fine for most people, but to enable it, the following\nsettings (put in .vimrc) should get you started:\n\n set backup\n set patchmode=.clean\n\nThis plugin can be configured by setting the following\nvariables in \".vimrc\"\n\n savevers_types - This is a comma-separated list of filename\n patterns. Sets the types of files that\n will have numbered versions.\n Defaults to \"*\" (all files).\n\n savevers_max - Sets the maximum patchmode version.\n Defaults to \"9999\".\n\n savevers_purge - Sets default value of [N] for the :Purge command\n Defaults to \"1\".\n\n savevers_dirs - This is a comma-separated list of directories\n that will be tried to store the patchmode files.\n The first writable directory in this list is used.\n This works much like the vim 'backupdir' option.\n To set this to the same as 'backupdir', do\n :let savevers_dirs = &backupdir\n Defaults to '.', which puts all patchmode files\n in the same directory as the original file.\n\n versdiff_no_resize - Disables window resizing during \":VersDiff\"\n\n versdiff_max_cols - Limits window resizing during \":VersDiff\"\n\nSo, for example, if the user has in ~/.vimrc:\n let savevers_types = \"*.c,*.h,*.vim\"\n let savevers_max = 99\n let savevers_purge = 0\nthen only \"*.c\", \"*.h\", and \"*.vim\" files will be numbered,\nand there will be a maximum of 99 versions saved.\nAlso, the \":Purge\" command will purge all numbered versions\n(instead of the default, which is to delete all but the oldest).\n",
"versions": [
{
"url": "http://www.vim.org/scripts/download_script.php?src_id=261",
"filename": "savevers.vim",
"script_version": "0.8",
"date": "2001-10-10",
"vim_version": "6.0",
"author": {
"user_id": "237",
"user_name": "eralston",
"first_name": "Ed",
"last_name": "Ralston",
"email": "ed@vim.eralston.net",
"homepage": "http://vim.eralston.net/"
},
"release_notes": "Corrected some obscure documentation. Allow cvs revisions to be incremented/decremented."
},
{
"url": "http://www.vim.org/scripts/download_script.php?src_id=227",
"filename": "savevers.vim",
"script_version": "0.7",
"date": "2001-10-02",
"vim_version": "6.0",
"author": {
"user_id": "237",
"user_name": "eralston",
"first_name": "Ed",
"last_name": "Ralston",
"email": "ed@vim.eralston.net",
"homepage": "http://vim.eralston.net/"
},
"release_notes": "Added option to specify directory for patchmode files"
},
{
"url": "http://www.vim.org/scripts/download_script.php?src_id=212",
"filename": "savevers.vim",
"script_version": "0.6",
"date": "2001-10-01",
"vim_version": "6.0",
"author": {
"user_id": "237",
"user_name": "eralston",
"first_name": "Ed",
"last_name": "Ralston",
"email": "ed@vim.eralston.net",
"homepage": "http://vim.eralston.net/"
},
"release_notes": "\":VersDiff\" command improvements"
},
{
"url": "http://www.vim.org/scripts/download_script.php?src_id=211",
"filename": "savevers.vim",
"script_version": "0.5",
"date": "2001-10-01",
"vim_version": "6.0",
"author": {
"user_id": "237",
"user_name": "eralston",
"first_name": "Ed",
"last_name": "Ralston",
"email": "ed@vim.eralston.net",
"homepage": "http://vim.eralston.net/"
},
"release_notes": "Added \":VersDiff\" command."
},
{
"url": "http://www.vim.org/scripts/download_script.php?src_id=196",
"filename": "savevers.vim",
"script_version": "0.4",
"date": "2001-09-26",
"vim_version": "6.0",
"author": {
"user_id": "237",
"user_name": "eralston",
"first_name": "Ed",
"last_name": "Ralston",
"email": "ed@vim.eralston.net",
"homepage": "http://vim.eralston.net/"
},
"release_notes": "Added \"-a\" and \"-v\" flags to the \":Purge\" command."
},
{
"url": "http://www.vim.org/scripts/download_script.php?src_id=192",
"filename": "savevers.vim",
"script_version": "0.3",
"date": "2001-09-25",
"vim_version": "6.0",
"author": {
"user_id": "237",
"user_name": "eralston",
"first_name": "Ed",
"last_name": "Ralston",
"email": "ed@vim.eralston.net",
"homepage": "http://vim.eralston.net/"
},
"release_notes": "Added configuration options"
},
{
"url": "http://www.vim.org/scripts/download_script.php?src_id=191",
"filename": "savevers.vim",
"script_version": "0.2",
"date": "2001-09-25",
"vim_version": "6.0",
"author": {
"user_id": "237",
"user_name": "eralston",
"first_name": "Ed",
"last_name": "Ralston",
"email": "ed@vim.eralston.net",
"homepage": "http://vim.eralston.net/"
},
"release_notes": "allow up to 9999 numbered versions\n"
},
{
"url": "http://www.vim.org/scripts/download_script.php?src_id=178",
"filename": "savevers.vim",
"script_version": "0.1",
"date": "2001-09-20",
"vim_version": "6.0",
"author": {
"user_id": "237",
"user_name": "eralston",
"first_name": "Ed",
"last_name": "Ralston",
"email": "ed@vim.eralston.net",
"homepage": "http://vim.eralston.net/"
},
"release_notes": "Initial upload"
}
]
}