comparison runtime/plugin/zipPlugin.vim @ 529:0d6092bb72e6

updated for version 7.0148
author vimboss
date Fri, 16 Sep 2005 21:47:57 +0000
parents
children 862863033fdd
comparison
equal deleted inserted replaced
528:66475621f0bf 529:0d6092bb72e6
1 " zipPlugin.vim: Handles browsing zipfiles
2 " PLUGIN PORTION
3 " Date: Sep 14, 2005
4 " Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
5 " License: Vim License (see vim's :help license)
6 " Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1
7 " Permission is hereby granted to use and distribute this code,
8 " with or without modifications, provided that this copyright
9 " notice is copied with it. Like anything else that's free,
10 " zipPlugin.vim is provided *as is* and comes with no warranty
11 " of any kind, either expressed or implied. By using this
12 " plugin, you agree that in no event will the copyright
13 " holder be liable for any damages resulting from the use
14 " of this software.
15
16 " ---------------------------------------------------------------------
17 " Initialization: {{{1
18 let s:keepcpo= &cpo
19 set cpo&vim
20
21 " ---------------------------------------------------------------------
22 " Public Interface: {{{1
23 augroup zip
24 au!
25 au BufReadCmd zipfile:* call zip#Read(expand("<afile>"), 1)
26 au FileReadCmd zipfile:* call zip#Read(expand("<afile>"), 0)
27 au BufWriteCmd zipfile:* call zip#Write(expand("<afile>"))
28 au FileWriteCmd zipfile:* call zip#Write(expand("<afile>"))
29
30 if has("unix")
31 au BufReadCmd zipfile:*/* call zip#Read(expand("<afile>"), 1)
32 au FileReadCmd zipfile:*/* call zip#Read(expand("<afile>"), 0)
33 au BufWriteCmd zipfile:*/* call zip#Write(expand("<afile>"))
34 au FileWriteCmd zipfile:*/* call zip#Write(expand("<afile>"))
35 endif
36
37 au BufReadCmd *.zip call zip#Browse(expand("<afile>"))
38 augroup END
39
40 " ------------------------------------------------------------------------
41 " Modelines And Restoration: {{{1
42 let &cpo= s:keepcpo
43 unlet s:keepcpo
44 " vim:ts=8 fdm=marker