comparison runtime/autoload/zip.vim @ 623:bd2fe62c9d77

updated for version 7.0178
author vimboss
date Thu, 29 Dec 2005 22:48:26 +0000
parents db92c5cc4f66
children 95dac6af3b3a
comparison
equal deleted inserted replaced
622:4096208d2a50 623:bd2fe62c9d77
1 " zip.vim: Handles browsing zipfiles 1 " zip.vim: Handles browsing zipfiles
2 " AUTOLOAD PORTION 2 " AUTOLOAD PORTION
3 " Date: Nov 28, 2005 3 " Date: Dec 21, 2005
4 " Version: 5 4 " Version: 6
5 " Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz> 5 " Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
6 " License: Vim License (see vim's :help license) 6 " License: Vim License (see vim's :help license)
7 " Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1 7 " Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1
8 " Permission is hereby granted to use and distribute this code, 8 " Permission is hereby granted to use and distribute this code,
9 " with or without modifications, provided that this copyright 9 " with or without modifications, provided that this copyright
20 set cpo&vim 20 set cpo&vim
21 if exists("g:loaded_zip") 21 if exists("g:loaded_zip")
22 finish 22 finish
23 endif 23 endif
24 24
25 let g:loaded_zip= "v5" 25 let g:loaded_zip= "v6"
26 26
27 " ---------------- 27 " ----------------
28 " Functions: {{{1 28 " Functions: {{{1
29 " ---------------- 29 " ----------------
30 30
196 cd _ZIPVIM_ 196 cd _ZIPVIM_
197 " call Decho("current directory now: ".getcwd()) 197 " call Decho("current directory now: ".getcwd())
198 198
199 let zipfile = substitute(a:fname,'zipfile:\(.\{-}\):.*$','\1','') 199 let zipfile = substitute(a:fname,'zipfile:\(.\{-}\):.*$','\1','')
200 let fname = substitute(a:fname,'zipfile:.\{-}:\(.*\)$','\1','') 200 let fname = substitute(a:fname,'zipfile:.\{-}:\(.*\)$','\1','')
201 let dirpath = substitute(fname,'/[^/]\+$','','e') 201
202 if fname =~ '/'
203 let dirpath = substitute(fname,'/[^/]\+$','','e')
204 if executable("cygpath")
205 let dirpath = substitute(system("cygpath ".dirpath),'\n','','e')
206 endif
207 call mkdir(dirpath,"p")
208 endif
202 if zipfile !~ '/' 209 if zipfile !~ '/'
203 let zipfile= curdir.'/'.zipfile 210 let zipfile= curdir.'/'.zipfile
204 endif 211 endif
205 " call Decho("zipfile<".zipfile."> fname<".fname.">") 212 " call Decho("zipfile<".zipfile."> fname<".fname.">")
206 213
207 call mkdir(dirpath,"p")
208 exe "w! ".fname 214 exe "w! ".fname
209 if executable("cygpath") 215 if executable("cygpath")
210 let dirpath = substitute(system("cygpath ".dirpath),'\n','','e')
211 let zipfile = substitute(system("cygpath ".zipfile),'\n','','e') 216 let zipfile = substitute(system("cygpath ".zipfile),'\n','','e')
212 endif 217 endif
213 218
214 " call Decho("zip -u ".zipfile.".zip ".fname) 219 " call Decho("zip -u ".zipfile.".zip ".fname)
215 call system("zip -u ".zipfile.".zip ".fname) 220 call system("zip -u ".zipfile.".zip ".fname)