529
|
1 " zipPlugin.vim: Handles browsing zipfiles
|
|
2 " PLUGIN PORTION
|
3281
|
3 " Date: Aug 15, 2011
|
1121
|
4 " Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
|
529
|
5 " License: Vim License (see vim's :help license)
|
3281
|
6 " Copyright: Copyright (C) 2005-2011 Charles E. Campbell, Jr. {{{1
|
529
|
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.
|
1121
|
15 "
|
|
16 " (James 4:8 WEB) Draw near to God, and he will draw near to you.
|
|
17 " Cleanse your hands, you sinners; and purify your hearts, you double-minded.
|
529
|
18 " ---------------------------------------------------------------------
|
1121
|
19 " Load Once: {{{1
|
|
20 if &cp || exists("g:loaded_zipPlugin")
|
|
21 finish
|
|
22 endif
|
3281
|
23 let g:loaded_zipPlugin = "v25"
|
1121
|
24 let s:keepcpo = &cpo
|
529
|
25 set cpo&vim
|
|
26
|
|
27 " ---------------------------------------------------------------------
|
|
28 " Public Interface: {{{1
|
|
29 augroup zip
|
|
30 au!
|
557
|
31 au BufReadCmd zipfile:* call zip#Read(expand("<amatch>"), 1)
|
|
32 au FileReadCmd zipfile:* call zip#Read(expand("<amatch>"), 0)
|
|
33 au BufWriteCmd zipfile:* call zip#Write(expand("<amatch>"))
|
|
34 au FileWriteCmd zipfile:* call zip#Write(expand("<amatch>"))
|
529
|
35
|
|
36 if has("unix")
|
557
|
37 au BufReadCmd zipfile:*/* call zip#Read(expand("<amatch>"), 1)
|
|
38 au FileReadCmd zipfile:*/* call zip#Read(expand("<amatch>"), 0)
|
|
39 au BufWriteCmd zipfile:*/* call zip#Write(expand("<amatch>"))
|
|
40 au FileWriteCmd zipfile:*/* call zip#Write(expand("<amatch>"))
|
529
|
41 endif
|
|
42
|
3281
|
43 au BufReadCmd *.zip,*.jar,*.xpi,*.war,*.ear,*.celzip,*.oxt call zip#Browse(expand("<amatch>"))
|
529
|
44 augroup END
|
|
45
|
1121
|
46 " ---------------------------------------------------------------------
|
|
47 " Restoration And Modelines: {{{1
|
|
48 " vim: fdm=marker
|
529
|
49 let &cpo= s:keepcpo
|
|
50 unlet s:keepcpo
|