annotate runtime/plugin/tarPlugin.vim @ 21510:31cb78014fe4 v8.2.1305

patch 8.2.1305: some tests are still old style Commit: https://github.com/vim/vim/commit/622b3568fa1baf07671d31390815fb0a55a99891 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jul 27 20:02:41 2020 +0200 patch 8.2.1305: some tests are still old style Problem: Some tests are still old style. Solution: Convert tests 52 and 70 to new style. (Yegappan Lakshmanan, closes #6544) Fix error in FinishTesting().
author Bram Moolenaar <Bram@vim.org>
date Mon, 27 Jul 2020 20:15:07 +0200
parents 1a951a4beee3
children 29c5f168c6fd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
528
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
1 " tarPlugin.vim -- a Vim plugin for browsing tarfiles
1126
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
2 " Original was copyright (c) 2002, Michael C. Toren <mct@toren.net>
4339
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
3 " Modified by Charles E. Campbell
528
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
4 " Distributed under the GNU General Public License.
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
5 "
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
6 " Updates are available from <http://michael.toren.net/code/>. If you
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
7 " find this script useful, or have suggestions for improvements, please
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
8 " let me know.
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
9 " Also look there for further comments and documentation.
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
10 "
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
11 " This part only sets the autocommands. The functions are in autoload/tar.vim.
1126
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
12 " ---------------------------------------------------------------------
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
13 " Load Once: {{{1
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
14 if &cp || exists("g:loaded_tarPlugin")
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
15 finish
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
16 endif
19099
1a951a4beee3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
17 let g:loaded_tarPlugin = "v32"
1126
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
18 let s:keepcpo = &cpo
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
19 set cpo&vim
528
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
20
1126
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
21 " ---------------------------------------------------------------------
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
22 " Public Interface: {{{1
557
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
23 augroup tar
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
24 au!
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
25 au BufReadCmd tarfile::* call tar#Read(expand("<amatch>"), 1)
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
26 au FileReadCmd tarfile::* call tar#Read(expand("<amatch>"), 0)
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
27 au BufWriteCmd tarfile::* call tar#Write(expand("<amatch>"))
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
28 au FileWriteCmd tarfile::* call tar#Write(expand("<amatch>"))
528
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
29
557
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
30 if has("unix")
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
31 au BufReadCmd tarfile::*/* call tar#Read(expand("<amatch>"), 1)
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
32 au FileReadCmd tarfile::*/* call tar#Read(expand("<amatch>"), 0)
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
33 au BufWriteCmd tarfile::*/* call tar#Write(expand("<amatch>"))
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
34 au FileWriteCmd tarfile::*/* call tar#Write(expand("<amatch>"))
557
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
35 endif
528
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
36
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
37 au BufReadCmd *.tar.gz call tar#Browse(expand("<amatch>"))
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
38 au BufReadCmd *.tar call tar#Browse(expand("<amatch>"))
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
39 au BufReadCmd *.lrp call tar#Browse(expand("<amatch>"))
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
40 au BufReadCmd *.tar.bz2 call tar#Browse(expand("<amatch>"))
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
41 au BufReadCmd *.tar.Z call tar#Browse(expand("<amatch>"))
19099
1a951a4beee3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
42 au BufReadCmd *.tbz call tar#Browse(expand("<amatch>"))
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
43 au BufReadCmd *.tgz call tar#Browse(expand("<amatch>"))
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
44 au BufReadCmd *.tar.lzma call tar#Browse(expand("<amatch>"))
2426
e52d87a2bb3e More runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
45 au BufReadCmd *.tar.xz call tar#Browse(expand("<amatch>"))
e52d87a2bb3e More runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
46 au BufReadCmd *.txz call tar#Browse(expand("<amatch>"))
557
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
47 augroup END
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
48 com! -nargs=? -complete=file Vimuntar call tar#Vimuntar(<q-args>)
528
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
49
1126
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
50 " ---------------------------------------------------------------------
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
51 " Restoration And Modelines: {{{1
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
52 " vim: fdm=marker
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
53 let &cpo= s:keepcpo
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
54 unlet s:keepcpo