vim: update release.sh to vim 7.3
[msysgit/mtrensch.git] / share / vim / vim72 / plugin / tarPlugin.vim
blob2ddf7f34842ce1818fed0885e9d27c0670868274
1 " tarPlugin.vim -- a Vim plugin for browsing tarfiles
2 " Original was copyright (c) 2002, Michael C. Toren <mct@toren.net>
3 " Modified by Charles E. Campbell, Jr.
4 " Distributed under the GNU General Public License.
6 " Updates are available from <http://michael.toren.net/code/>.  If you
7 " find this script useful, or have suggestions for improvements, please
8 " let me know.
9 " Also look there for further comments and documentation.
11 " This part only sets the autocommands.  The functions are in autoload/tar.vim.
12 " ---------------------------------------------------------------------
13 "  Load Once: {{{1
14 if &cp || exists("g:loaded_tarPlugin")
15  finish
16 endif
17 let g:loaded_tarPlugin = "v23"
18 let s:keepcpo          = &cpo
19 set cpo&vim
21 " ---------------------------------------------------------------------
22 "  Public Interface: {{{1
23 augroup tar
24   au!
25   au BufReadCmd   tarfile::*    call tar#Read(expand("<amatch>"), 1)
26   au FileReadCmd  tarfile::*    call tar#Read(expand("<amatch>"), 0)
27   au BufWriteCmd  tarfile::*    call tar#Write(expand("<amatch>"))
28   au FileWriteCmd tarfile::*    call tar#Write(expand("<amatch>"))
30   if has("unix")
31    au BufReadCmd   tarfile::*/* call tar#Read(expand("<amatch>"), 1)
32    au FileReadCmd  tarfile::*/* call tar#Read(expand("<amatch>"), 0)
33    au BufWriteCmd  tarfile::*/* call tar#Write(expand("<amatch>"))
34    au FileWriteCmd tarfile::*/* call tar#Write(expand("<amatch>"))
35   endif
37   au BufReadCmd   *.tar.gz      call tar#Browse(expand("<amatch>"))
38   au BufReadCmd   *.tar         call tar#Browse(expand("<amatch>"))
39   au BufReadCmd   *.lrp         call tar#Browse(expand("<amatch>"))
40   au BufReadCmd   *.tar.bz2     call tar#Browse(expand("<amatch>"))
41   au BufReadCmd   *.tar.Z       call tar#Browse(expand("<amatch>"))
42   au BufReadCmd   *.tgz         call tar#Browse(expand("<amatch>"))
43 augroup END
45 " ---------------------------------------------------------------------
46 " Restoration And Modelines: {{{1
47 " vim: fdm=marker
48 let &cpo= s:keepcpo
49 unlet s:keepcpo