annotate runtime/autoload/zip.vim @ 4339:22fa3049e934

Updated runtime files.
author Bram Moolenaar <bram@vim.org>
date Wed, 24 Apr 2013 18:51:19 +0200
parents af1e8a1714c2
children 71e066e10a47
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
4339
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
3 " Date: Apr 17, 2013
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
4 " Version: 26
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
5 " Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
6 " License: Vim License (see vim's :help license)
4339
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
7 " Copyright: Copyright (C) 2005-2012 Charles E. Campbell {{{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
4339
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
22 let g:loaded_zip= "v26"
2152
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
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
106 call append(0, ['" zip.vim version '.g:loaded_zip,
3281
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2908
diff changeset
107 \ '" Browsing zipfile '.a:zipfile,
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2908
diff changeset
108 \ '" Select a file with cursor and press ENTER'])
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
109 keepj $
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
110
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
111 " call Decho("exe silent r! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1))
3281
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2908
diff changeset
112 exe "keepj sil! r! ".g:zip_unzipcmd." -Z -1 -- ".s:Escape(a:zipfile,1)
857
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
113 if v:shell_error != 0
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
114 redraw!
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
115 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
116 " call inputsave()|call input("Press <cr> to continue")|call inputrestore()
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
117 keepj sil! %d
857
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
118 let eikeep= &ei
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
119 set ei=BufReadCmd,FileReadCmd
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
120 exe "keepj r ".fnameescape(a:zipfile)
857
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
121 let &ei= eikeep
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
122 keepj 1d
857
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
123 " call Dret("zip#Browse")
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
124 return
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
125 endif
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
126
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
127 setlocal noma nomod ro
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
128 noremap <silent> <buffer> <cr> :call <SID>ZipBrowseSelect()<cr>
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
129
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
130 let &report= repkeep
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
131 " call Dret("zip#Browse")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
132 endfun
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
133
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
134 " ---------------------------------------------------------------------
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
135 " ZipBrowseSelect: {{{2
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
136 fun! s:ZipBrowseSelect()
1214
a91a2e0c4108 updated for version 7.1b
vimboss
parents: 1121
diff changeset
137 " call Dfunc("ZipBrowseSelect() zipfile<".b:zipfile."> curfile<".expand("%").">")
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
138 let repkeep= &report
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
139 set report=10
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
140 let fname= getline(".")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
141
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
142 " sanity check
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
143 if fname =~ '^"'
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
144 let &report= repkeep
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
145 " call Dret("ZipBrowseSelect")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
146 return
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
147 endif
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
148 if fname =~ '/$'
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
149 redraw!
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
150 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
151 " call inputsave()|call input("Press <cr> to continue")|call inputrestore()
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
152 let &report= repkeep
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
153 " call Dret("ZipBrowseSelect")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
154 return
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
155 endif
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
156
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
157 " call Decho("fname<".fname.">")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
158
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
159 " get zipfile to the new-window
1214
a91a2e0c4108 updated for version 7.1b
vimboss
parents: 1121
diff changeset
160 let zipfile = b:zipfile
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 804
diff changeset
161 let curfile= expand("%")
798
95dac6af3b3a updated for version 7.0232
vimboss
parents: 623
diff changeset
162 " call Decho("zipfile<".zipfile.">")
95dac6af3b3a updated for version 7.0232
vimboss
parents: 623
diff changeset
163 " call Decho("curfile<".curfile.">")
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
164
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
165 new
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
166 if !exists("g:zip_nomax") || g:zip_nomax == 0
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
167 wincmd _
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
168 endif
557
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
169 let s:zipfile_{winnr()}= curfile
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
170 " call Decho("exe e ".fnameescape("zipfile:".zipfile.'::'.fname))
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
171 exe "e ".fnameescape("zipfile:".zipfile.'::'.fname)
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
172 filetype detect
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
173
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
174 let &report= repkeep
557
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
175 " call Dret("ZipBrowseSelect : s:zipfile_".winnr()."<".s:zipfile_{winnr()}.">")
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
176 endfun
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
177
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
178 " ---------------------------------------------------------------------
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
179 " zip#Read: {{{2
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
180 fun! zip#Read(fname,mode)
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
181 " call Dfunc("zip#Read(fname<".a:fname.">,mode=".a:mode.")")
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
182 let repkeep= &report
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
183 set report=10
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
184
857
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
185 if has("unix")
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
186 let zipfile = substitute(a:fname,'zipfile:\(.\{-}\)::[^\\].*$','\1','')
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
187 let fname = substitute(a:fname,'zipfile:.\{-}::\([^\\].*\)$','\1','')
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
188 else
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
189 let zipfile = substitute(a:fname,'^.\{-}zipfile:\(.\{-}\)::[^\\].*$','\1','')
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
190 let fname = substitute(a:fname,'^.\{-}zipfile:.\{-}::\([^\\].*\)$','\1','')
4339
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
191 let fname = substitute(fname, '[', '[[]', 'g')
857
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
192 endif
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
193 " call Decho("zipfile<".zipfile.">")
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
194 " call Decho("fname <".fname.">")
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
195
4339
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
196 " the following code does much the same thing as
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
197 " exe "keepj sil! r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1)
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
198 " but allows zipfile:... entries in quickfix lists
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
199 let temp = tempname()
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
200 let fn = expand('%:p')
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
201 exe "sil! !".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1).' > '.temp
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
202 " call Decho("exe sil! !".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1).' > '.temp)
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
203 sil exe 'keepalt file '.temp
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
204 sil keepj e!
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
205 sil exe 'keepalt file '.fnameescape(fn)
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
206 call delete(temp)
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
207
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
208 filetype detect
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
209
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
210 " cleanup
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
211 keepj 0d
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
212 set nomod
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
213
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
214 let &report= repkeep
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
215 " call Dret("zip#Read")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
216 endfun
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
217
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
218 " ---------------------------------------------------------------------
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
219 " zip#Write: {{{2
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
220 fun! zip#Write(fname)
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 804
diff changeset
221 " call Dfunc("zip#Write(fname<".a:fname.">) zipfile_".winnr()."<".s:zipfile_{winnr()}.">")
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
222 let repkeep= &report
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
223 set report=10
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
224
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
225 " sanity checks
1214
a91a2e0c4108 updated for version 7.1b
vimboss
parents: 1121
diff changeset
226 if !executable(g:zip_zipcmd)
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
227 redraw!
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
228 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
229 " call inputsave()|call input("Press <cr> to continue")|call inputrestore()
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
230 let &report= repkeep
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
231 " call Dret("zip#Write")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
232 return
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
233 endif
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
234 if !exists("*mkdir")
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
235 redraw!
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
236 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
237 " call inputsave()|call input("Press <cr> to continue")|call inputrestore()
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
238 let &report= repkeep
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
239 " call Dret("zip#Write")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
240 return
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
241 endif
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
242
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
243 let curdir= getcwd()
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
244 let tmpdir= tempname()
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
245 " call Decho("orig tempname<".tmpdir.">")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
246 if tmpdir =~ '\.'
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
247 let tmpdir= substitute(tmpdir,'\.[^.]*$','','e')
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
248 endif
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
249 " call Decho("tmpdir<".tmpdir.">")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
250 call mkdir(tmpdir,"p")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
251
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
252 " attempt to change to the indicated directory
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
253 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
254 let &report= repkeep
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
255 " call Dret("zip#Write")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
256 return
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
257 endif
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
258 " call Decho("current directory now: ".getcwd())
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
259
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
260 " place temporary files under .../_ZIPVIM_/
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
261 if isdirectory("_ZIPVIM_")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
262 call s:Rmdir("_ZIPVIM_")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
263 endif
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
264 call mkdir("_ZIPVIM_")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
265 cd _ZIPVIM_
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
266 " call Decho("current directory now: ".getcwd())
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
267
857
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
268 if has("unix")
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
269 let zipfile = substitute(a:fname,'zipfile:\(.\{-}\)::[^\\].*$','\1','')
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
270 let fname = substitute(a:fname,'zipfile:.\{-}::\([^\\].*\)$','\1','')
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
271 else
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
272 let zipfile = substitute(a:fname,'^.\{-}zipfile:\(.\{-}\)::[^\\].*$','\1','')
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
273 let fname = substitute(a:fname,'^.\{-}zipfile:.\{-}::\([^\\].*\)$','\1','')
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
274 endif
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
275 " call Decho("zipfile<".zipfile.">")
b933657f7c9d updated for version 7.0g01
vimboss
parents: 826
diff changeset
276 " call Decho("fname <".fname.">")
623
bd2fe62c9d77 updated for version 7.0178
vimboss
parents: 568
diff changeset
277
bd2fe62c9d77 updated for version 7.0178
vimboss
parents: 568
diff changeset
278 if fname =~ '/'
bd2fe62c9d77 updated for version 7.0178
vimboss
parents: 568
diff changeset
279 let dirpath = substitute(fname,'/[^/]\+$','','e')
4339
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
280 if has("win32unix") && executable("cygpath")
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
281 let dirpath = substitute(system("cygpath ".s:Escape(dirpath,0)),'\n','','e')
623
bd2fe62c9d77 updated for version 7.0178
vimboss
parents: 568
diff changeset
282 endif
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 804
diff changeset
283 " call Decho("mkdir(dirpath<".dirpath.">,p)")
623
bd2fe62c9d77 updated for version 7.0178
vimboss
parents: 568
diff changeset
284 call mkdir(dirpath,"p")
bd2fe62c9d77 updated for version 7.0178
vimboss
parents: 568
diff changeset
285 endif
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
286 if zipfile !~ '/'
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
287 let zipfile= curdir.'/'.zipfile
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
288 endif
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
289 " call Decho("zipfile<".zipfile."> fname<".fname.">")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
290
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
291 exe "w! ".fnameescape(fname)
4339
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
292 if has("win32unix") && executable("cygpath")
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
293 let zipfile = substitute(system("cygpath ".s:Escape(zipfile,0)),'\n','','e')
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
294 endif
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
295
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
296 if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
297 let fname = substitute(fname, '[', '[[]', 'g')
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
298 endif
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
299
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
300 " 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
301 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
302 if v:shell_error != 0
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
303 redraw!
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
304 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
305 " call inputsave()|call input("Press <cr> to continue")|call inputrestore()
557
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
306
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
307 elseif s:zipfile_{winnr()} =~ '^\a\+://'
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
308 " support writing zipfiles across a network
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
309 let netzipfile= s:zipfile_{winnr()}
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
310 " call Decho("handle writing <".zipfile."> across network as <".netzipfile.">")
557
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
311 1split|enew
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
312 let binkeep= &binary
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
313 let eikeep = &ei
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
314 set binary ei=all
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
315 exe "e! ".fnameescape(zipfile)
557
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
316 call netrw#NetWrite(netzipfile)
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
317 let &ei = eikeep
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
318 let &binary = binkeep
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
319 q!
862863033fdd updated for version 7.0158
vimboss
parents: 530
diff changeset
320 unlet s:zipfile_{winnr()}
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
321 endif
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
322
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
323 " cleanup and restore current directory
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
324 cd ..
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
325 call s:Rmdir("_ZIPVIM_")
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
326 call s:ChgDir(curdir,s:WARNING,"(zip#Write) unable to return to ".curdir."!")
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
327 call s:Rmdir(tmpdir)
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
328 setlocal nomod
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
329
568
db92c5cc4f66 updated for version 7.0161
vimboss
parents: 557
diff changeset
330 let &report= repkeep
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
331 " call Dret("zip#Write")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
332 endfun
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
333
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
334 " ---------------------------------------------------------------------
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
335 " s:Escape: {{{2
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
336 fun! s:Escape(fname,isfilt)
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
337 " call Dfunc("QuoteFileDir(fname<".a:fname."> isfilt=".a:isfilt.")")
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
338 if exists("*shellescape")
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
339 if a:isfilt
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
340 let qnameq= shellescape(a:fname,1)
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
341 else
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
342 let qnameq= shellescape(a:fname)
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
343 endif
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
344 else
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
345 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
346 endif
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
347 " call Dret("QuoteFileDir <".qnameq.">")
82b5078be2dd updated for version 7.2a
vimboss
parents: 1214
diff changeset
348 return qnameq
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
349 endfun
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
350
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
351 " ---------------------------------------------------------------------
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
352 " ChgDir: {{{2
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
353 fun! s:ChgDir(newdir,errlvl,errmsg)
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
354 " call Dfunc("ChgDir(newdir<".a:newdir."> errlvl=".a:errlvl." errmsg<".a:errmsg.">)")
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
355
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
356 try
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
357 exe "cd ".fnameescape(a:newdir)
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
358 catch /^Vim\%((\a\+)\)\=:E344/
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
359 redraw!
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
360 if a:errlvl == s:NOTE
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
361 echo "***note*** ".a:errmsg
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
362 elseif a:errlvl == s:WARNING
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
363 echohl WarningMsg | echo "***warning*** ".a:errmsg | echohl NONE
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
364 elseif a:errlvl == s:ERROR
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
365 echohl Error | echo "***error*** ".a:errmsg | echohl NONE
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
366 endif
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
367 " call inputsave()|call input("Press <cr> to continue")|call inputrestore()
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
368 " call Dret("ChgDir 1")
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
369 return 1
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
370 endtry
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
371
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
372 " call Dret("ChgDir 0")
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
373 return 0
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
374 endfun
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
375
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
376 " ---------------------------------------------------------------------
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
377 " s:Rmdir: {{{2
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
378 fun! s:Rmdir(fname)
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
379 " call Dfunc("Rmdir(fname<".a:fname.">)")
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
380 if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
381 call system("rmdir /S/Q ".s:Escape(a:fname,0))
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 857
diff changeset
382 else
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1621
diff changeset
383 call system("/bin/rm -rf ".s:Escape(a:fname,0))
530
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
384 endif
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
385 " call Dret("Rmdir")
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
386 endfun
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
387
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
388 " ------------------------------------------------------------------------
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
389 " Modelines And Restoration: {{{1
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
390 let &cpo= s:keepcpo
339999b511a0 updated for version 7.0148
vimboss
parents:
diff changeset
391 unlet s:keepcpo
1214
a91a2e0c4108 updated for version 7.1b
vimboss
parents: 1121
diff changeset
392 " vim:ts=8 fdm=marker