Home Explore Blog CI



neovim

2nd chunk of `runtime/doc/pi_zip.txt`
8b9e04f37ec5d19242e49966133908579a6263b12bfdd3ff00000001000009aa
 file from a zip archive.  By default, >
	let g:zip_extractcmd= g:zip_unzipcmd
<
							*g:zip_exec*
   For security reasons, one may prevent that Vim runs executables
   automatically when opening a buffer.  This option (default: "1")
   can be used to prevent executing the "unzip" command when set to
   "0": >
	let g:zip_exec=0
<
   PREVENTING LOADING~

   If for some reason you do not wish to use vim to examine zipped files,
   you may put the following two variables into your <.vimrc> to prevent
   the zip plugin from loading: >

	let g:loaded_zipPlugin= 1
	let g:loaded_zip      = 1
<

==============================================================================
3. Additional Extensions					*zip-extension*

   Apparently there are a number of archivers which generate zip files that
   don't use the .zip extension (.jar, .xpi, etc).  To handle such files,
   place a line in your <.vimrc> file: >

	au BufReadCmd *.jar,*.xpi call zip#Browse(expand("<amatch>"))
<
   One can simply extend this line to accommodate additional extensions that
   should be treated as zip files.

   Alternatively, one may change *g:zipPlugin_ext* in one's .vimrc.
   Currently (as of April 2025) it holds: >

        let g:zipPlugin_ext='*.aar,*.apk,*.celzip,*.crtx,*.docm,*.docx,
       \ *.dotm,*.dotx,*.ear,*.epub,*.gcsx,*.glox,*.gqsx,*.ja,*.jar,*.kmz,
       \ *.odb,*.odc,*.odf,*.odg,*.odi,*.odm,*.odp,*.ods,*.odt,*.otc,*.otf,
       \ *.otg,*.oth,*.oti,*.otp,*.ots,*.ott,*.oxt,*.potm,*.potx,*.ppam,
       \ *.ppsm,*.ppsx,*.pptm,*.pptx,*.sldx,*.thmx,*.vdw,*.war,*.whl,*.wsz,
       \ *.xap,*.xlam,*.xlsb,*.xlsm,*.xlsx,*.xltm,*.xltx,*.xpi,*.zip'

==============================================================================
4. History							*zip-history* {{{1
   v33 Dec 07, 2021 * `*.xlam` mentioned twice in zipPlugin
   v32 Oct 22, 2021 * to avoid an issue with a vim 8.2 patch, zipfile: has
		      been changed to zipfile:// . This often shows up
		      as zipfile:/// with zipped files that are root-based.
   v29 Apr 02, 2017 * (Klartext) reported that an encrypted zip file could
		      opened but the swapfile held unencrypted contents.
		      The solution is to edit the contents of a zip file
		      using the |:noswapfile| modifier.
   v28 Oct 08, 2014 * changed the sanity checks for executables to reflect
		      the command actually to be attempted in zip#Read()
		      and zip#Write()
		    * added the extraction of a file capability
       Nov 30,

Title: Zip Plugin Customization and History
Summary
This section details how to customize the zip plugin for Vim. It explains how to prevent automatic execution of commands for security and how to stop the plugin from loading altogether. It also describes how to handle zip files with non-standard extensions like '.jar' and '.xpi' by adding them to the list of recognized zip file types. It mentions the `g:zipPlugin_ext` variable. Finally, it provides a history of changes and updates to the zip plugin, including fixes for encryption issues and changes to executable sanity checks.