blob: 944b84838eeb8018b758b781b63c75111056c3ca [file] [log] [blame]
Bram Moolenaar03d42252007-05-12 13:40:39 +00001*pi_zip.txt* For Vim version 7.1. Last change: 2007 May 11
Bram Moolenaarc01140a2006-03-24 22:21:52 +00002
Bram Moolenaar910f66f2006-04-05 20:41:53 +00003 +====================+
4 | Zip File Interface |
5 +====================+
Bram Moolenaar98358622005-11-28 22:58:23 +00006
7Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
8 (remove NOSPAM from Campbell's email first)
Bram Moolenaar7263a772007-05-10 17:35:54 +00009Copyright: Copyright (C) 2005,2006 Charles E Campbell, Jr *zip-copyright*
Bram Moolenaar9964e462007-05-05 17:54:07 +000010 Permission is hereby granted to use and distribute this code,
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011 with or without modifications, provided that this copyright
12 notice is copied with it. Like anything else that's free,
13 zip.vim, zipPlugin.vim, and pi_zip.txt are provided *as is*
14 and it comes with no warranty of any kind, either expressed or
15 implied. By using this plugin, you agree that in no event will
16 the copyright holder be liable for any damages resulting from
17 the use of this software.
Bram Moolenaar98358622005-11-28 22:58:23 +000018
19==============================================================================
201. Contents *zip* *zip-contents*
Bram Moolenaar7263a772007-05-10 17:35:54 +000021 1. Contents................................................|zip-contents|
22 2. Usage...................................................|zip-usage|
23 3. Additional Extensions...................................|zip-extension|
24 4. History.................................................|zip-history|
Bram Moolenaar98358622005-11-28 22:58:23 +000025
26==============================================================================
272. Usage *zip-usage* *zip-manual*
28
29 When one edits a *.zip file, this plugin will handle displaying a
30 contents page. Select a file to edit by moving the cursor atop
31 the desired file, then hit the <return> key. After editing, one may
32 also write to the file. Currently, one may not make a new file in
33 zip archives via the plugin.
34
Bram Moolenaar7263a772007-05-10 17:35:54 +000035 OPTIONS
36 *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
Bram Moolenaar9964e462007-05-05 17:54:07 +000042< 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
Bram Moolenaar7263a772007-05-10 17:35:54 +000046 *g:zip_unzipcmd*
47 Use this option to specify the program which does the duty of "unzip".
48 Its used during browsing. By default: >
49 let g:zip_unzipcmd= "unzip"
50<
51 *g:zip_zipcmd*
52 Use this option to specify the program which does the duty of "zip".
53 Its used during the writing (updating) of a file already in a zip
54 file; by default: >
55 let g:zip_zipcmd= "zip"
56<
57
Bram Moolenaar98358622005-11-28 22:58:23 +000058==============================================================================
Bram Moolenaar7263a772007-05-10 17:35:54 +0000593. Additional Extensions *zip-extension*
60
61 Apparently there are a number of archivers who generate zip files that
62 don't use the .zip extension (.jar, .xpi, etc). To handle such files,
63 place a line in your <.vimrc> file: >
64
65 au BufReadCmd *.jar,*.xpi call zip#Browse(expand("<amatch>"))
66<
Bram Moolenaar03d42252007-05-12 13:40:39 +000067 One can simply extend this line to accommodate additional extensions that
Bram Moolenaar7263a772007-05-10 17:35:54 +000068 are actually zip files.
69
70==============================================================================
714. History *zip-history* {{{1
72 v14 May 07, 2007 * using b:zipfile instead of w:zipfile to avoid problem
73 when editing alternate file to bring up a zipfile
Bram Moolenaar9964e462007-05-05 17:54:07 +000074 v10 May 02, 2006 * now using "redraw then echo" to show messages, instead
75 of "echo and prompt user"
76 * g:zip_shq provided to allow for quoting control for the
77 command being passed via :r! ... commands.
Bram Moolenaar4c3f5362006-04-11 21:38:50 +000078 v8 Apr 10, 2006 * Bram Moolenaar reported that he received an error message
Bram Moolenaar9964e462007-05-05 17:54:07 +000079 due to "Pattern not found: ^.*\%0c"; this was caused by
Bram Moolenaar4c3f5362006-04-11 21:38:50 +000080 stridx finding a Name... at the beginning of the line;
81 zip.vim tried 4,$s/^.*\%0c//, but that doesn't work.
82 Fixed.
Bram Moolenaar7b5f8322006-03-23 22:47:08 +000083 v7 Mar 22, 2006 * escaped some characters that can cause filename handling
Bram Moolenaar9964e462007-05-05 17:54:07 +000084 problems.
Bram Moolenaar86e01082005-12-29 22:45:34 +000085 v6 Dec 21, 2005 * writing to files not in directories caused problems -
Bram Moolenaar9964e462007-05-05 17:54:07 +000086 fixed (pointed out by Christian Robinson)
Bram Moolenaar98358622005-11-28 22:58:23 +000087 v5 Nov 22, 2005 * report option workaround installed
88 v3 Oct 18, 2005 * <amatch> used instead of <afile> in autocmds
89 v2 Sep 16, 2005 * silenced some commands (avoiding hit-enter prompt)
Bram Moolenaar9964e462007-05-05 17:54:07 +000090 * began testing under Windows; works thus far
Bram Moolenaar98358622005-11-28 22:58:23 +000091 * filetype detection fixed
92 Nov 03, 2005 * handles writing zipfiles across a network using
Bram Moolenaar9964e462007-05-05 17:54:07 +000093 netrw#NetWrite()
Bram Moolenaar98358622005-11-28 22:58:23 +000094 v1 Sep 15, 2005 * Initial release, had browsing, reading, and writing
95
96==============================================================================
Bram Moolenaar7263a772007-05-10 17:35:54 +000097vim:tw=78:ts=8:ft=help:fdm=marker