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