annotate runtime/plugin/tarPlugin.vim @ 23429:de278e062eb6

Added tag v8.2.2257 for changeset 5807e3958e3898e21dced2fae52a15c9aa00ef57
author Bram Moolenaar <Bram@vim.org>
date Thu, 31 Dec 2020 21:30:04 +0100
parents 29c5f168c6fd
children e003aedbf9e1
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>"))
23047
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 19099
diff changeset
47 au BufReadCmd *.tar.zst call tar#Browse(expand("<amatch>"))
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 19099
diff changeset
48 au BufReadCmd *.tzs call tar#Browse(expand("<amatch>"))
557
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
49 augroup END
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
50 com! -nargs=? -complete=file Vimuntar call tar#Vimuntar(<q-args>)
528
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
51
1126
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
52 " ---------------------------------------------------------------------
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
53 " Restoration And Modelines: {{{1
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
54 " vim: fdm=marker
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
55 let &cpo= s:keepcpo
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
56 unlet s:keepcpo