annotate runtime/plugin/tarPlugin.vim @ 719:82ef0c58b012

updated for version 7.0219
author vimboss
date Thu, 09 Mar 2006 22:32:39 +0000
parents 862863033fdd
children c5c164b4c95c
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
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
2 " Copyright (c) 2002, Michael C. Toren <mct@toren.net>
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
3 " Distributed under the GNU General Public License.
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
4 "
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
5 " Updates are available from <http://michael.toren.net/code/>. If you
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
6 " find this script useful, or have suggestions for improvements, please
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
7 " let me know.
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
8 " Also look there for further comments and documentation.
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
9 "
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
10 " This part only sets the autocommands. The functions are in autoload/tar.vim.
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
11
557
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
12 augroup tar
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
13 au!
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
14 au BufReadCmd tarfile:* call tar#Read(expand("<amatch>"), 1)
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
15 au FileReadCmd tarfile:* call tar#Read(expand("<amatch>"), 0)
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
16 au BufWriteCmd tarfile:* call tar#Write(expand("<amatch>"))
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
17 au FileWriteCmd tarfile:* call tar#Write(expand("<amatch>"))
528
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
18
557
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
19 if has("unix")
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
20 au BufReadCmd tarfile:*/* call tar#Read(expand("<amatch>"), 1)
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
21 au FileReadCmd tarfile:*/* call tar#Read(expand("<amatch>"), 0)
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
22 au BufWriteCmd tarfile:*/* call tar#Write(expand("<amatch>"))
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
23 au FileWriteCmd tarfile:*/* call tar#Write(expand("<amatch>"))
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
24 endif
528
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
25
557
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
26 au BufReadCmd *.tar call tar#Browse(expand("<amatch>"))
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
27 au BufReadCmd *.tar.gz call tar#Browse(expand("<amatch>"))
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
28 au BufReadCmd *.tar.bz2 call tar#Browse(expand("<amatch>"))
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
29 au BufReadCmd *.tar.Z call tar#Browse(expand("<amatch>"))
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
30 au BufReadCmd *.tgz call tar#Browse(expand("<amatch>"))
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
31 augroup END
528
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
32
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
33 " vim: ts=8