Hi Charles,
2013/06/01 Sat 15:25:15 UTC+9 Dominique Pelle wrote:
> Ken Takata <[email protected]> wrote:
>
> > Hi Charles,
> >
> > After updating Vim to 7.3.919 or later, I can't open *.ja including
> > README.ja (a README file written in Japanese).
> > When I try to open *.ja, I get the following message:
> >
> > ***error*** (zip#Browse) unzip not available on your system
> >
> > (I haven't installed unzip command on my Windows system.)
> > I'm annoyed by this behavior.
> >
> > The file name *.ja is sometime used for Japanese text,
> > because "ja" is defined as Japanese language code by ISO 639-1.
> > E.g. Ruby's source code: https://github.com/ruby/ruby
> >
> > Please consider adding a way to open *.ja as a plain text
> > even if unzip isn't available. I think one of the following will do:
> >
> > 1. Remove "*.ja" from runtime/plugin/zipPlugin.vim.
> > 2. Add a setting for which file should be handled by zipPlugin.
> > 3. Open *.ja as a plain text and do not display the error,
> > if unzip isn't available.
>
> Another possibility would be to check the magic number
> at the start of the file. A ZIP file must begin with "PK".
I wrote a patch for this problem using the method 3.
I'm not sure this is the best solution.
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.
# HG changeset patch
# Parent 7dc5799794d2c90e7fcf1c7b96a30ba870d96691
fix problem when opening *.ja
Open a file when unzip is not available.
diff --git a/runtime/autoload/zip.vim b/runtime/autoload/zip.vim
--- a/runtime/autoload/zip.vim
+++ b/runtime/autoload/zip.vim
@@ -75,6 +75,12 @@
echohl Error | echo "***error*** (zip#Browse) unzip not available on your system"
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
+ 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")
return
endif