Hi,
2013/06/08 Sat 0:05:47 UTC+9 Charles Campbell wrote:
> mattn wrote:
> > Remove *.ja from the extension list, and add new option to know which
> > the file extensions are zip or not.
>
> v27a of the zip plugin
> (http://www.drchip.org/astronaut/vim/index.html#ZIP) incorporates both
> methods:
>
> * checks that the first line of zip files starts with "PK"
> * sets up a default value for a variable: g:zipPlugin_ext which
> incorporates all the currently supported synonyms for zip. The user may
> change that list at his/her whim prior to invocation of the zip plugin.
Thank you for updating the zip plugin, but checking "PK" doesn't work well.
When I try to open a file which matches g:zipPlugin_ext but doesn't start
with "PK", an empty buffer is opened. I think the file should be read
by the plugin as same as unzip command returns an error.
diff --git a/runtime/autoload/zip.vim b/runtime/autoload/zip.vim
--- a/runtime/autoload/zip.vim
+++ b/runtime/autoload/zip.vim
@@ -63,6 +63,12 @@
" sanity check: insure that the zipfile has "PK" as its first two letters
" (required for proper zip file format)
if readfile(a:zipfile, "", 1)[0] !~ '^PK'
+ keepj sil! %d
+ let eikeep= &ei
+ set ei=BufReadCmd,FileReadCmd
+ exe "keepj r ".fnameescape(a:zipfile)
+ let &ei= eikeep
+ keepj 1d
" call Dret("zip#Browse : not a zipfile<".a:zipfile.">")
return
endif
Thanks,
Ken Takata
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.