annotate runtime/doc/pi_zip.txt @ 9559:354168ab1997

Added tag v7.4.2056 for changeset b591a350f190312f78944b5ff8a6251f6eadb923
author Christian Brabandt <cb@256bit.org>
date Sun, 17 Jul 2016 15:15:07 +0200
parents 359743c1f59a
children 9f48eab77d62
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5294
359743c1f59a release version 7.4
Bram Moolenaar <bram@vim.org>
parents: 5247
diff changeset
1 *pi_zip.txt* For Vim version 7.4. Last change: 2013 Apr 17
799
6beb2c667935 updated for version 7.0b
vimboss
parents: 797
diff changeset
2
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 810
diff changeset
3 +====================+
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 810
diff changeset
4 | Zip File Interface |
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 810
diff changeset
5 +====================+
567
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
6
4339
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
7 Author: Charles E. Campbell <NdrOchip@ScampbellPfamily.AbizM>
567
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
8 (remove NOSPAM from Campbell's email first)
4339
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
9 Copyright: Copyright (C) 2005-2012 Charles E Campbell *zip-copyright*
3281
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3082
diff changeset
10 The VIM LICENSE (see |copyright|) applies to the files in this
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3082
diff changeset
11 package, including zipPlugin.vim, zip.vim, and pi_zip.vim. except use
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3082
diff changeset
12 "zip.vim" instead of "VIM". Like anything else that's free, zip.vim
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3082
diff changeset
13 and its associated files are provided *as is* and comes with no
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3082
diff changeset
14 warranty of any kind, either expressed or implied. No guarantees of
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3082
diff changeset
15 merchantability. No guarantees of suitability for any purpose. By
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3082
diff changeset
16 using this plugin, you agree that in no event will the copyright
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3082
diff changeset
17 holder be liable for any damages resulting from the use of this
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3082
diff changeset
18 software. Use at your own risk!
567
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
19
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
20 ==============================================================================
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2581
diff changeset
21 1. Contents *zip* *zip-contents*
1201
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
22 1. Contents................................................|zip-contents|
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
23 2. Usage...................................................|zip-usage|
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
24 3. Additional Extensions...................................|zip-extension|
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
25 4. History.................................................|zip-history|
567
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
26
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
27 ==============================================================================
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2581
diff changeset
28 2. Usage *zip-usage* *zip-manual*
567
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
29
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
30 When one edits a *.zip file, this plugin will handle displaying a
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
31 contents page. Select a file to edit by moving the cursor atop
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
32 the desired file, then hit the <return> key. After editing, one may
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
33 also write to the file. Currently, one may not make a new file in
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
34 zip archives via the plugin.
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
35
1201
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
36 OPTIONS
1620
73fe8baea242 updated for version 7.2a
vimboss
parents: 1246
diff changeset
37
73fe8baea242 updated for version 7.2a
vimboss
parents: 1246
diff changeset
38 *g:zip_nomax*
73fe8baea242 updated for version 7.2a
vimboss
parents: 1246
diff changeset
39
73fe8baea242 updated for version 7.2a
vimboss
parents: 1246
diff changeset
40 If this variable exists and is true, the file window will not be
73fe8baea242 updated for version 7.2a
vimboss
parents: 1246
diff changeset
41 automatically maximized when opened.
73fe8baea242 updated for version 7.2a
vimboss
parents: 1246
diff changeset
42
73fe8baea242 updated for version 7.2a
vimboss
parents: 1246
diff changeset
43 *g:zip_shq*
1201
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
44 Different operating systems may use one or more shells to execute
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
45 commands. Zip will try to guess the correct quoting mechanism to
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
46 allow spaces and whatnot in filenames; however, if it is incorrectly
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
47 guessing the quote to use for your setup, you may use >
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
48 g:zip_shq
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
49 < which by default is a single quote under Unix (') and a double quote
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
50 under Windows ("). If you'd rather have no quotes, simply set
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
51 g:zip_shq to the empty string (let g:zip_shq= "") in your <.vimrc>.
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
52
1201
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
53 *g:zip_unzipcmd*
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
54 Use this option to specify the program which does the duty of "unzip".
1620
73fe8baea242 updated for version 7.2a
vimboss
parents: 1246
diff changeset
55 It's used during browsing. By default: >
1201
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
56 let g:zip_unzipcmd= "unzip"
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
57 <
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
58 *g:zip_zipcmd*
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
59 Use this option to specify the program which does the duty of "zip".
1620
73fe8baea242 updated for version 7.2a
vimboss
parents: 1246
diff changeset
60 It's used during the writing (updating) of a file already in a zip
1201
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
61 file; by default: >
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
62 let g:zip_zipcmd= "zip"
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
63 <
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
64 PREVENTING LOADING~
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
65
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
66 If for some reason you do not wish to use vim to examine zipped files,
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
67 you may put the following two variables into your <.vimrc> to prevent
2581
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2577
diff changeset
68 the zip plugin from loading: >
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
69
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
70 let g:loaded_zipPlugin= 1
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
71 let g:loaded_zip = 1
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
72 <
1201
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
73
567
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
74 ==============================================================================
1201
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
75 3. Additional Extensions *zip-extension*
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
76
3281
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3082
diff changeset
77 Apparently there are a number of archivers which generate zip files that
1201
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
78 don't use the .zip extension (.jar, .xpi, etc). To handle such files,
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
79 place a line in your <.vimrc> file: >
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
80
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
81 au BufReadCmd *.jar,*.xpi call zip#Browse(expand("<amatch>"))
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
82 <
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1620
diff changeset
83 One can simply extend this line to accommodate additional extensions that
1620
73fe8baea242 updated for version 7.2a
vimboss
parents: 1246
diff changeset
84 should be treated as zip files.
1201
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
85
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
86 ==============================================================================
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2581
diff changeset
87 4. History *zip-history* {{{1
4339
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
88 v26 Nov 15, 2012 * (Jason Spiro) provided a lot of new extensions that
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
89 are synonyms for .zip
3281
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3082
diff changeset
90 v25 Jun 27, 2011 * using keepj with unzip -Z
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3082
diff changeset
91 (consistent with the -p variant)
4339
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
92 * (Ben Staniford) now uses
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
93 has("win32unix") && executable("cygpath")
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
94 before converting to cygwin-style paths
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2581
diff changeset
95 v24 Jun 21, 2010 * (Cédric Bosdonnat) unzip seems to need its filenames
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2581
diff changeset
96 fnameescape'd as well as shellquote'd
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2581
diff changeset
97 * (Motoya Kurotsu) inserted keepj before 0d to protect
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2581
diff changeset
98 jump list
1620
73fe8baea242 updated for version 7.2a
vimboss
parents: 1246
diff changeset
99 v17 May 09, 2008 * arno caught a security bug
73fe8baea242 updated for version 7.2a
vimboss
parents: 1246
diff changeset
100 v15 Sep 07, 2007 * &shq now used if not the empty string for g:zip_shq
1201
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
101 v14 May 07, 2007 * using b:zipfile instead of w:zipfile to avoid problem
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
102 when editing alternate file to bring up a zipfile
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
103 v10 May 02, 2006 * now using "redraw then echo" to show messages, instead
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
104 of "echo and prompt user"
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
105 * g:zip_shq provided to allow for quoting control for the
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
106 command being passed via :r! ... commands.
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 825
diff changeset
107 v8 Apr 10, 2006 * Bram Moolenaar reported that he received an error message
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
108 due to "Pattern not found: ^.*\%0c"; this was caused by
826
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 825
diff changeset
109 stridx finding a Name... at the beginning of the line;
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 825
diff changeset
110 zip.vim tried 4,$s/^.*\%0c//, but that doesn't work.
1cdd2661f34c updated for version 7.0d01
vimboss
parents: 825
diff changeset
111 Fixed.
797
a1a08851eac8 updated for version 7.0232
vimboss
parents: 622
diff changeset
112 v7 Mar 22, 2006 * escaped some characters that can cause filename handling
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
113 problems.
622
4096208d2a50 updated for version 7.0178
vimboss
parents: 567
diff changeset
114 v6 Dec 21, 2005 * writing to files not in directories caused problems -
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
115 fixed (pointed out by Christian Robinson)
567
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
116 v5 Nov 22, 2005 * report option workaround installed
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
117 v3 Oct 18, 2005 * <amatch> used instead of <afile> in autocmds
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
118 v2 Sep 16, 2005 * silenced some commands (avoiding hit-enter prompt)
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
119 * began testing under Windows; works thus far
567
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
120 * filetype detection fixed
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
121 Nov 03, 2005 * handles writing zipfiles across a network using
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
122 netrw#NetWrite()
567
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
123 v1 Sep 15, 2005 * Initial release, had browsing, reading, and writing
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
124
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
125 ==============================================================================
1201
4d2585cf5950 updated for version 7.1b
vimboss
parents: 1121
diff changeset
126 vim:tw=78:ts=8:ft=help:fdm=marker