pi_zip.txt 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. *pi_zip.txt* Nvim
  2. +====================+
  3. | Zip File Interface |
  4. +====================+
  5. Author: Charles E. Campbell <NdrOchip@ScampbellPfamily.AbizM>
  6. (remove NOSPAM from Campbell's email first)
  7. Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright*
  8. The VIM LICENSE (see |copyright|) applies to the files in this
  9. package, including zipPlugin.vim, zip.vim, and pi_zip.vim. except use
  10. "zip.vim" instead of "VIM". Like anything else that's free, zip.vim
  11. and its associated files are provided *as is* and comes with no
  12. warranty of any kind, either expressed or implied. No guarantees of
  13. merchantability. No guarantees of suitability for any purpose. By
  14. using this plugin, you agree that in no event will the copyright
  15. holder be liable for any damages resulting from the use of this
  16. software. Use at your own risk!
  17. ==============================================================================
  18. 1. Contents *zip* *zip-contents*
  19. 1. Contents................................................|zip-contents|
  20. 2. Usage...................................................|zip-usage|
  21. 3. Additional Extensions...................................|zip-extension|
  22. 4. History.................................................|zip-history|
  23. ==============================================================================
  24. 2. Usage *zip-usage* *zip-manual*
  25. When one edits a *.zip file, this plugin will handle displaying a
  26. contents page. Select a file to edit by moving the cursor atop
  27. the desired file, then hit the <return> key. After editing, one may
  28. also write to the file. Currently, one may not make a new file in
  29. zip archives via the plugin.
  30. *zip-x*
  31. x : may extract a listed file when the cursor is atop it
  32. OPTIONS
  33. *g:zip_nomax*
  34. If this variable exists and is true, the file window will not be
  35. automatically maximized when opened.
  36. *g:zip_shq*
  37. Different operating systems may use one or more shells to execute
  38. commands. Zip will try to guess the correct quoting mechanism to
  39. allow spaces and whatnot in filenames; however, if it is incorrectly
  40. guessing the quote to use for your setup, you may use >
  41. g:zip_shq
  42. < which by default is a single quote under Unix (') and a double quote
  43. under Windows ("). If you'd rather have no quotes, simply set
  44. g:zip_shq to the empty string (let g:zip_shq= "") in your <.vimrc>.
  45. *g:zip_unzipcmd*
  46. Use this option to specify the program which does the duty of "unzip".
  47. It's used during browsing. By default: >
  48. let g:zip_unzipcmd= "unzip"
  49. <
  50. *g:zip_zipcmd*
  51. Use this option to specify the program which does the duty of "zip".
  52. It's used during the writing (updating) of a file already in a zip
  53. file; by default: >
  54. let g:zip_zipcmd= "zip"
  55. <
  56. *g:zip_extractcmd*
  57. This option specifies the program (and any options needed) used to
  58. extract a file from a zip archive. By default, >
  59. let g:zip_extractcmd= g:zip_unzipcmd
  60. <
  61. PREVENTING LOADING~
  62. If for some reason you do not wish to use vim to examine zipped files,
  63. you may put the following two variables into your <.vimrc> to prevent
  64. the zip plugin from loading: >
  65. let g:loaded_zipPlugin= 1
  66. let g:loaded_zip = 1
  67. <
  68. ==============================================================================
  69. 3. Additional Extensions *zip-extension*
  70. Apparently there are a number of archivers which generate zip files that
  71. don't use the .zip extension (.jar, .xpi, etc). To handle such files,
  72. place a line in your <.vimrc> file: >
  73. au BufReadCmd *.jar,*.xpi call zip#Browse(expand("<amatch>"))
  74. <
  75. One can simply extend this line to accommodate additional extensions that
  76. should be treated as zip files.
  77. Alternatively, one may change *g:zipPlugin_ext* in one's .vimrc.
  78. Currently (11/30/15) it holds: >
  79. let g:zipPlugin_ext= '*.zip,*.jar,*.xpi,*.ja,*.war,*.ear,*.celzip,
  80. \ *.oxt,*.kmz,*.wsz,*.xap,*.docx,*.docm,*.dotx,*.dotm,*.potx,*.potm,
  81. \ *.ppsx,*.ppsm,*.pptx,*.pptm,*.ppam,*.sldx,*.thmx,*.xlam,*.xlsx,*.xlsm,
  82. \ *.xlsb,*.xltx,*.xltm,*.xlam,*.crtx,*.vdw,*.glox,*.gcsx,*.gqsx,*.epub'
  83. ==============================================================================
  84. 4. History *zip-history* {{{1
  85. v28 Oct 08, 2014 * changed the sanity checks for executables to reflect
  86. the command actually to be attempted in zip#Read()
  87. and zip#Write()
  88. * added the extraction of a file capability
  89. Nov 30, 2015 * added *.epub to the |g:zipPlugin_ext| list
  90. Sep 13, 2016 * added *.apk to the |g:zipPlugin_ext| list and
  91. sorted the suffices.
  92. v27 Jul 02, 2013 * sanity check: zipfile must have "PK" as its first
  93. two bytes.
  94. * modified to allow zipfile: entries in quickfix lists
  95. v26 Nov 15, 2012 * (Jason Spiro) provided a lot of new extensions that
  96. are synonyms for .zip
  97. v25 Jun 27, 2011 * using keepj with unzip -Z
  98. (consistent with the -p variant)
  99. * (Ben Staniford) now uses
  100. has("win32unix") && executable("cygpath")
  101. before converting to cygwin-style paths
  102. v24 Jun 21, 2010 * (Cédric Bosdonnat) unzip seems to need its filenames
  103. fnameescape'd as well as shellquote'd
  104. * (Motoya Kurotsu) inserted keepj before 0d to protect
  105. jump list
  106. v17 May 09, 2008 * arno caught a security bug
  107. v15 Sep 07, 2007 * &shq now used if not the empty string for g:zip_shq
  108. v14 May 07, 2007 * using b:zipfile instead of w:zipfile to avoid problem
  109. when editing alternate file to bring up a zipfile
  110. v10 May 02, 2006 * now using "redraw then echo" to show messages, instead
  111. of "echo and prompt user"
  112. * g:zip_shq provided to allow for quoting control for the
  113. command being passed via :r! ... commands.
  114. v8 Apr 10, 2006 * Bram Moolenaar reported that he received an error message
  115. due to "Pattern not found: ^.*\%0c"; this was caused by
  116. stridx finding a Name... at the beginning of the line;
  117. zip.vim tried 4,$s/^.*\%0c//, but that doesn't work.
  118. Fixed.
  119. v7 Mar 22, 2006 * escaped some characters that can cause filename handling
  120. problems.
  121. v6 Dec 21, 2005 * writing to files not in directories caused problems -
  122. fixed (pointed out by Christian Robinson)
  123. v5 Nov 22, 2005 * report option workaround installed
  124. v3 Oct 18, 2005 * <amatch> used instead of <afile> in autocmds
  125. v2 Sep 16, 2005 * silenced some commands (avoiding hit-enter prompt)
  126. * began testing under Windows; works thus far
  127. * filetype detection fixed
  128. Nov 03, 2005 * handles writing zipfiles across a network using
  129. netrw#NetWrite()
  130. v1 Sep 15, 2005 * Initial release, had browsing, reading, and writing
  131. ==============================================================================
  132. vim:tw=78:ts=8:noet:ft=help:fdm=marker