annotate runtime/autoload/zip.vim @ 2152:b9e314fe473f

Updated runtime files.
author Bram Moolenaar <bram@zimbu.org>
date Fri, 14 May 2010 23:24:24 +0200
parents f4f8014d516e
children fd09a9c8468e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
1 " zip.vim: Handles browsing zipfiles
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
2 " AUTOLOAD PORTION
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1698
diff changeset
3 " Date: Apr 12, 2010
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1698
diff changeset
4 " Version: 23
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
5 " Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
6 " License: Vim License (see vim's :help license)
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
7 " Copyright: Copyright (C) 2005-2008 Charles E. Campbell, Jr. {{{1
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
8 " Permission is hereby granted to use and distribute this code,
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
9 " with or without modifications, provided that this copyright
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
10 " notice is copied with it. Like anything else that's free,
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
11 " zip.vim and zipPlugin.vim are provided *as is* and comes with
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
12 " no warranty of any kind, either expressed or implied. By using
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
13 " this plugin, you agree that in no event will the copyright
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
14 " holder be liable for any damages resulting from the use
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
15 " of this software.
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
16
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
17 " ---------------------------------------------------------------------
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
18 " Load Once: {{{1
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1698
diff changeset
19 if &cp || exists("g:loaded_zip")
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1698
diff changeset
20 finish
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1698
diff changeset
21 endif
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1698
diff changeset
22 let g:loaded_zip= "v23"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1698
diff changeset
23 if v:version < 702
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1698
diff changeset
24 echohl WarningMsg
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1698
diff changeset
25 echo "***warning*** this version of zip needs vim 7.2"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1698
diff changeset
26 echohl Normal
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1698
diff changeset
27 finish
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1698
diff changeset
28 endif
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
29 let s:keepcpo= &cpo
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
30 set cpo&vim
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
31
798
95dac6af3b3a updated for version 7.0232
vimboss
parents: 623
diff changeset
32 let s:zipfile_escape = ' ?&;\'
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
33 let s:ERROR = 2
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
34 let s:WARNING = 1
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
35 let s:NOTE = 0
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
36
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
37 " ---------------------------------------------------------------------
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
38 " Global Values: {{{1
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
39 if !exists("g:zip_shq")
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
40 if &shq != ""
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
41 let g:zip_shq= &shq
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
42 elseif has("unix")
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
43 let g:zip_shq= "'"
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
44 else
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
45 let g:zip_shq= '"'
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
46 endif
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
47 endif
1214
a91a2e0c4108 updated for version 7.1b
vimboss
parents: 1121
diff changeset
48 if !exists("g:zip_zipcmd")
a91a2e0c4108 updated for version 7.1b
vimboss
parents: 1121
diff changeset
49 let g:zip_zipcmd= "zip"
a91a2e0c4108 updated for version 7.1b
vimboss
parents: 1121
diff changeset
50 endif
a91a2e0c4108 updated for version 7.1b
vimboss
parents: 1121
diff changeset
51 if !exists("g:zip_unzipcmd")
a91a2e0c4108 updated for version 7.1b
vimboss
parents: 1121
diff changeset
52 let g:zip_unzipcmd= "unzip"
a91a2e0c4108 updated for version 7.1b
vimboss
parents: 1121
diff changeset
53 endif
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
54
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
55 " ----------------
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
56 " Functions: {{{1
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
57 " ----------------
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
58
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
59 " ---------------------------------------------------------------------
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
60 " zip#Browse: {{{2
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
61 fun! zip#Browse(zipfile)
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
62 " call Dfunc("zip#Browse(zipfile<".a:zipfile.">)")
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
63 let repkeep= &report
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
64 set report=10
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
65
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
66 " sanity checks
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
67 if !exists("*fnameescape")
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
68 if &verbose > 1
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
69 echoerr "the zip plugin is not available (your vim doens't support fnameescape())"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
70 endif
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
71 return
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
72 endif
1214
a91a2e0c4108 updated for version 7.1b
vimboss
parents: 1121
diff changeset
73 if !executable(g:zip_unzipcmd)
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
74 redraw!
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
75 echohl Error | echo "***error*** (zip#Browse) unzip not available on your system"
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
76 " call inputsave()|call input("Press <cr> to continue")|call inputrestore()
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
77 let &report= repkeep
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
78 " call Dret("zip#Browse")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
79 return
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
80 endif
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
81 if !filereadable(a:zipfile)
557
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
82 if a:zipfile !~# '^\a\+://'
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
83 " if its an url, don't complain, let url-handlers such as vim do its thing
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
84 redraw!
557
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
85 echohl Error | echo "***error*** (zip#Browse) File not readable<".a:zipfile.">" | echohl None
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
86 " call inputsave()|call input("Press <cr> to continue")|call inputrestore()
557
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
87 endif
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
88 let &report= repkeep
557
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
89 " call Dret("zip#Browse : file<".a:zipfile."> not readable")
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
90 return
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
91 endif
798
95dac6af3b3a updated for version 7.0232
vimboss
parents: 623
diff changeset
92 " call Decho("passed sanity checks")
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
93 if &ma != 1
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
94 set ma
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
95 endif
1214
a91a2e0c4108 updated for version 7.1b
vimboss
parents: 1121
diff changeset
96 let b:zipfile= a:zipfile
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
97
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
98 setlocal noswapfile
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
99 setlocal buftype=nofile
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
100 setlocal bufhidden=hide
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
101 setlocal nobuflisted
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
102 setlocal nowrap
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
103 set ft=tar
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
104
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
105 " give header
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
106 let lastline= line("$")
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
107 call setline(lastline+1,'" zip.vim version '.g:loaded_zip)
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
108 call setline(lastline+2,'" Browsing zipfile '.a:zipfile)
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
109 call setline(lastline+3,'" Select a file with cursor and press ENTER')
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
110 $put =''
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
111 0d
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
112 $
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
113
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
114 " call Decho("exe silent r! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1))
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
115 exe "silent r! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1)
857
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
116 if v:shell_error != 0
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
117 redraw!
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
118 echohl WarningMsg | echo "***warning*** (zip#Browse) ".fnameescape(a:zipfile)." is not a zip file" | echohl None
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
119 " call inputsave()|call input("Press <cr> to continue")|call inputrestore()
857
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
120 silent %d
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
121 let eikeep= &ei
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
122 set ei=BufReadCmd,FileReadCmd
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
123 exe "r ".fnameescape(a:zipfile)
857
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
124 let &ei= eikeep
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
125 1d
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
126 " call Dret("zip#Browse")
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
127 return
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
128 endif
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 804
diff changeset
129 " call Decho("line 6: ".getline(6))
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 804
diff changeset
130 let namecol= stridx(getline(6),'Name') + 1
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 804
diff changeset
131 " call Decho("namecol=".namecol)
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 804
diff changeset
132 4,$g/^\s*----/d
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 804
diff changeset
133 4,$g/^\s*\a/d
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
134 $d
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 819
diff changeset
135 if namecol > 0
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 819
diff changeset
136 exe 'silent 4,$s/^.*\%'.namecol.'c//'
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 819
diff changeset
137 endif
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
138
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
139 setlocal noma nomod ro
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
140 noremap <silent> <buffer> <cr> :call <SID>ZipBrowseSelect()<cr>
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
141
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
142 let &report= repkeep
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
143 " call Dret("zip#Browse")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
144 endfun
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
145
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
146 " ---------------------------------------------------------------------
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
147 " ZipBrowseSelect: {{{2
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
148 fun! s:ZipBrowseSelect()
1214
a91a2e0c4108 updated for version 7.1b
vimboss
parents: 1121
diff changeset
149 " call Dfunc("ZipBrowseSelect() zipfile<".b:zipfile."> curfile<".expand("%").">")
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
150 let repkeep= &report
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
151 set report=10
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
152 let fname= getline(".")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
153
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
154 " sanity check
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
155 if fname =~ '^"'
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
156 let &report= repkeep
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
157 " call Dret("ZipBrowseSelect")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
158 return
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
159 endif
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
160 if fname =~ '/$'
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
161 redraw!
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
162 echohl Error | echo "***error*** (zip#Browse) Please specify a file, not a directory" | echohl None
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
163 " call inputsave()|call input("Press <cr> to continue")|call inputrestore()
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
164 let &report= repkeep
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
165 " call Dret("ZipBrowseSelect")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
166 return
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
167 endif
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
168
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
169 " call Decho("fname<".fname.">")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
170
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
171 " get zipfile to the new-window
1214
a91a2e0c4108 updated for version 7.1b
vimboss
parents: 1121
diff changeset
172 let zipfile = b:zipfile
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 804
diff changeset
173 let curfile= expand("%")
798
95dac6af3b3a updated for version 7.0232
vimboss
parents: 623
diff changeset
174 " call Decho("zipfile<".zipfile.">")
95dac6af3b3a updated for version 7.0232
vimboss
parents: 623
diff changeset
175 " call Decho("curfile<".curfile.">")
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
176
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
177 new
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
178 if !exists("g:zip_nomax") || g:zip_nomax == 0
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
179 wincmd _
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
180 endif
557
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
181 let s:zipfile_{winnr()}= curfile
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
182 " call Decho("exe e ".fnameescape("zipfile:".zipfile.'::'.fname))
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
183 exe "e ".fnameescape("zipfile:".zipfile.'::'.fname)
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
184 filetype detect
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
185
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
186 let &report= repkeep
557
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
187 " call Dret("ZipBrowseSelect : s:zipfile_".winnr()."<".s:zipfile_{winnr()}.">")
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
188 endfun
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
189
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
190 " ---------------------------------------------------------------------
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
191 " zip#Read: {{{2
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
192 fun! zip#Read(fname,mode)
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
193 " call Dfunc("zip#Read(fname<".a:fname.">,mode=".a:mode.")")
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
194 let repkeep= &report
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
195 set report=10
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
196
857
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
197 if has("unix")
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
198 let zipfile = substitute(a:fname,'zipfile:\(.\{-}\)::[^\\].*$','\1','')
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
199 let fname = substitute(a:fname,'zipfile:.\{-}::\([^\\].*\)$','\1','')
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
200 else
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
201 let zipfile = substitute(a:fname,'^.\{-}zipfile:\(.\{-}\)::[^\\].*$','\1','')
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
202 let fname = substitute(a:fname,'^.\{-}zipfile:.\{-}::\([^\\].*\)$','\1','')
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
203 let fname = substitute(fname, '[', '[[]', 'g')
857
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
204 endif
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
205 " call Decho("zipfile<".zipfile.">")
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
206 " call Decho("fname <".fname.">")
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
207
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
208 " call Decho("exe r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fname,1))
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
209 exe "silent r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fname,1)
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
210
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
211 " cleanup
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
212 0d
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
213 set nomod
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
214
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
215 let &report= repkeep
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
216 " call Dret("zip#Read")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
217 endfun
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
218
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
219 " ---------------------------------------------------------------------
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
220 " zip#Write: {{{2
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
221 fun! zip#Write(fname)
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 804
diff changeset
222 " call Dfunc("zip#Write(fname<".a:fname.">) zipfile_".winnr()."<".s:zipfile_{winnr()}.">")
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
223 let repkeep= &report
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
224 set report=10
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
225
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
226 " sanity checks
1214
a91a2e0c4108 updated for version 7.1b
vimboss
parents: 1121
diff changeset
227 if !executable(g:zip_zipcmd)
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
228 redraw!
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
229 echohl Error | echo "***error*** (zip#Write) sorry, your system doesn't appear to have the zip pgm" | echohl None
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
230 " call inputsave()|call input("Press <cr> to continue")|call inputrestore()
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
231 let &report= repkeep
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
232 " call Dret("zip#Write")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
233 return
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
234 endif
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
235 if !exists("*mkdir")
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
236 redraw!
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
237 echohl Error | echo "***error*** (zip#Write) sorry, mkdir() doesn't work on your system" | echohl None
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
238 " call inputsave()|call input("Press <cr> to continue")|call inputrestore()
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
239 let &report= repkeep
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
240 " call Dret("zip#Write")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
241 return
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
242 endif
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
243
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
244 let curdir= getcwd()
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
245 let tmpdir= tempname()
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
246 " call Decho("orig tempname<".tmpdir.">")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
247 if tmpdir =~ '\.'
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
248 let tmpdir= substitute(tmpdir,'\.[^.]*$','','e')
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
249 endif
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
250 " call Decho("tmpdir<".tmpdir.">")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
251 call mkdir(tmpdir,"p")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
252
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
253 " attempt to change to the indicated directory
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
254 if s:ChgDir(tmpdir,s:ERROR,"(zip#Write) cannot cd to temporary directory")
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
255 let &report= repkeep
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
256 " call Dret("zip#Write")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
257 return
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
258 endif
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
259 " call Decho("current directory now: ".getcwd())
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
260
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
261 " place temporary files under .../_ZIPVIM_/
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
262 if isdirectory("_ZIPVIM_")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
263 call s:Rmdir("_ZIPVIM_")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
264 endif
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
265 call mkdir("_ZIPVIM_")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
266 cd _ZIPVIM_
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
267 " call Decho("current directory now: ".getcwd())
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
268
857
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
269 if has("unix")
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
270 let zipfile = substitute(a:fname,'zipfile:\(.\{-}\)::[^\\].*$','\1','')
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
271 let fname = substitute(a:fname,'zipfile:.\{-}::\([^\\].*\)$','\1','')
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
272 else
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
273 let zipfile = substitute(a:fname,'^.\{-}zipfile:\(.\{-}\)::[^\\].*$','\1','')
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
274 let fname = substitute(a:fname,'^.\{-}zipfile:.\{-}::\([^\\].*\)$','\1','')
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
275 endif
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
276 " call Decho("zipfile<".zipfile.">")
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
277 " call Decho("fname <".fname.">")
623
bd2fe62c9d77 updated for version 7.0178
vimboss
parents: 568
diff changeset
278
bd2fe62c9d77 updated for version 7.0178
vimboss
parents: 568
diff changeset
279 if fname =~ '/'
bd2fe62c9d77 updated for version 7.0178
vimboss
parents: 568
diff changeset
280 let dirpath = substitute(fname,'/[^/]\+$','','e')
bd2fe62c9d77 updated for version 7.0178
vimboss
parents: 568
diff changeset
281 if executable("cygpath")
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
282 let dirpath = substitute(system("cygpath ".s:Escape(dirpath,0)),'\n','','e')
623
bd2fe62c9d77 updated for version 7.0178
vimboss
parents: 568
diff changeset
283 endif
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 804
diff changeset
284 " call Decho("mkdir(dirpath<".dirpath.">,p)")
623
bd2fe62c9d77 updated for version 7.0178
vimboss
parents: 568
diff changeset
285 call mkdir(dirpath,"p")
bd2fe62c9d77 updated for version 7.0178
vimboss
parents: 568
diff changeset
286 endif
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
287 if zipfile !~ '/'
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
288 let zipfile= curdir.'/'.zipfile
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
289 endif
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
290 " call Decho("zipfile<".zipfile."> fname<".fname.">")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
291
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
292 exe "w! ".fnameescape(fname)
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
293 if executable("cygpath")
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
294 let zipfile = substitute(system("cygpath ".s:Escape(zipfile,0)),'\n','','e')
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
295 endif
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
296
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
297 if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
298 let fname = substitute(fname, '[', '[[]', 'g')
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
299 endif
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
300
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
301 " call Decho(g:zip_zipcmd." -u ".s:Escape(fnamemodify(zipfile,":p"),0)." ".s:Escape(fname,0))
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
302 call system(g:zip_zipcmd." -u ".s:Escape(fnamemodify(zipfile,":p"),0)." ".s:Escape(fname,0))
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
303 if v:shell_error != 0
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
304 redraw!
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
305 echohl Error | echo "***error*** (zip#Write) sorry, unable to update ".zipfile." with ".fname | echohl None
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
306 " call inputsave()|call input("Press <cr> to continue")|call inputrestore()
557
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
307
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
308 elseif s:zipfile_{winnr()} =~ '^\a\+://'
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
309 " support writing zipfiles across a network
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
310 let netzipfile= s:zipfile_{winnr()}
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
311 " call Decho("handle writing <".zipfile."> across network as <".netzipfile.">")
557
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
312 1split|enew
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
313 let binkeep= &binary
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
314 let eikeep = &ei
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
315 set binary ei=all
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
316 exe "e! ".fnameescape(zipfile)
557
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
317 call netrw#NetWrite(netzipfile)
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
318 let &ei = eikeep
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
319 let &binary = binkeep
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
320 q!
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
321 unlet s:zipfile_{winnr()}
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
322 endif
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
323
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
324 " cleanup and restore current directory
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
325 cd ..
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
326 call s:Rmdir("_ZIPVIM_")
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
327 call s:ChgDir(curdir,s:WARNING,"(zip#Write) unable to return to ".curdir."!")
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
328 call s:Rmdir(tmpdir)
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
329 setlocal nomod
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
330
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
331 let &report= repkeep
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
332 " call Dret("zip#Write")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
333 endfun
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
334
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
335 " ---------------------------------------------------------------------
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
336 " s:Escape: {{{2
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
337 fun! s:Escape(fname,isfilt)
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
338 " call Dfunc("QuoteFileDir(fname<".a:fname."> isfilt=".a:isfilt.")")
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
339 if exists("*shellescape")
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
340 if a:isfilt
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
341 let qnameq= shellescape(a:fname,1)
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
342 else
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
343 let qnameq= shellescape(a:fname)
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
344 endif
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
345 else
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
346 let qnameq= g:zip_shq.escape(a:fname,g:zip_shq).g:zip_shq
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
347 endif
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
348 " call Dret("QuoteFileDir <".qnameq.">")
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
349 return qnameq
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
350 endfun
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
351
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
352 " ---------------------------------------------------------------------
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
353 " ChgDir: {{{2
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
354 fun! s:ChgDir(newdir,errlvl,errmsg)
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
355 " call Dfunc("ChgDir(newdir<".a:newdir."> errlvl=".a:errlvl." errmsg<".a:errmsg.">)")
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
356
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
357 try
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
358 exe "cd ".fnameescape(a:newdir)
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
359 catch /^Vim\%((\a\+)\)\=:E344/
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
360 redraw!
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
361 if a:errlvl == s:NOTE
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
362 echo "***note*** ".a:errmsg
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
363 elseif a:errlvl == s:WARNING
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
364 echohl WarningMsg | echo "***warning*** ".a:errmsg | echohl NONE
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
365 elseif a:errlvl == s:ERROR
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
366 echohl Error | echo "***error*** ".a:errmsg | echohl NONE
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
367 endif
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
368 " call inputsave()|call input("Press <cr> to continue")|call inputrestore()
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
369 " call Dret("ChgDir 1")
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
370 return 1
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
371 endtry
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
372
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
373 " call Dret("ChgDir 0")
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
374 return 0
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
375 endfun
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
376
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
377 " ---------------------------------------------------------------------
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
378 " s:Rmdir: {{{2
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
379 fun! s:Rmdir(fname)
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
380 " call Dfunc("Rmdir(fname<".a:fname.">)")
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
381 if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
382 call system("rmdir /S/Q ".s:Escape(a:fname,0))
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
383 else
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
384 call system("/bin/rm -rf ".s:Escape(a:fname,0))
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
385 endif
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
386 " call Dret("Rmdir")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
387 endfun
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
388
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
389 " ------------------------------------------------------------------------
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
390 " Modelines And Restoration: {{{1
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
391 let &cpo= s:keepcpo
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
392 unlet s:keepcpo
1214
a91a2e0c4108 updated for version 7.1b
vimboss
parents: 1121
diff changeset
393 " vim:ts=8 fdm=marker