blob: d24de09324c4e3e693c49385ac7bffab8a102e87 [file] [log] [blame]
Bram Moolenaar166af9b2010-11-16 20:34:40 +01001*pi_tar.txt* For Vim version 7.3. Last change: 2010 Nov 03
Bram Moolenaarc01140a2006-03-24 22:21:52 +00002
Bram Moolenaar3577c6f2008-06-24 21:16:56 +00003 +====================+
4 | Tar 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 Moolenaar477db062010-07-28 18:17:41 +02009Copyright 2005-2010: The GPL (gnu public license) applies to *tar-copyright*
Bram Moolenaar3577c6f2008-06-24 21:16:56 +000010 tar.vim, tarPlugin.vim, and pi_tar.txt.
Bram Moolenaar98358622005-11-28 22:58:23 +000011 No warranty, express or implied. Use At-Your-Own-Risk.
12
13==============================================================================
141. Contents *tar* *tar-contents*
15 1. Contents..................................................|tar-contents|
16 2. Usage.....................................................|tar-usage|
Bram Moolenaar910f66f2006-04-05 20:41:53 +000017 3. Options...................................................|tar-options|
18 4. History...................................................|tar-history|
Bram Moolenaar98358622005-11-28 22:58:23 +000019
20==============================================================================
212. Usage *tar-usage* *tar-manual*
22
23 When one edits a *.tar file, this plugin will handle displaying a
24 contents page. Select a file to edit by moving the cursor atop
25 the desired file, then hit the <return> key. After editing, one may
26 also write to the file. Currently, one may not make a new file in
27 tar archives via the plugin.
28
Bram Moolenaar477db062010-07-28 18:17:41 +020029 *:Vimuntar*
30 VIMUNTAR~
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +010031
Bram Moolenaar477db062010-07-28 18:17:41 +020032 :Vimuntar [vimhome]
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +010033
34 This command copies, if necessary, the tarball to the .vim or vimfiles
35 directory using the first writable directory in the |'runtimepath'|
36 when no [vimhome] is specified. Otherwise, the [vimhome] argument
37 allows the user to specify that directory, instead.
38
39 The copy is done using the command in *g:tar_copycmd* , which is >
40 cp for cygwin, unix, macunix
41 copy for windows (32, 95, 64, 16)
42< The extraction is done with the command specified with
43 *g:tar_extractcmd* , which by default is >
44 "tar -xf"
45<
46 PREVENTING LOADING~
47
48 If for some reason you do not wish to use vim to examine tar'd files,
49 you may put the following two variables into your <.vimrc> to prevent
50 the tar plugin from loading: >
51
52 let g:loaded_tarPlugin= 1
53 let g:loaded_tar = 1
54<
55
Bram Moolenaar98358622005-11-28 22:58:23 +000056==============================================================================
Bram Moolenaar910f66f2006-04-05 20:41:53 +0000573. Options *tar-options*
58
59 These options are variables that one may change, typically in one's
60 <.vimrc> file.
Bram Moolenaar9964e462007-05-05 17:54:07 +000061 Default
62 Variable Value Explanation
Bram Moolenaar166af9b2010-11-16 20:34:40 +010063 *g:tar_browseoptions* "Ptf" used to get a list of contents
64 *g:tar_readoptions* "OPxf" used to extract a file from a tarball
65 *g:tar_cmd* "tar" the name of the tar program
66 *g:tar_nomax* 0 if true, file window will not be maximized
67 *g:tar_secure* undef if exists:
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +010068 "--"s will be used to prevent unwanted
Bram Moolenaared39e1d2008-08-09 17:55:22 +000069 option expansion in tar commands.
70 Please be sure that your tar command
71 accepts "--"; Posix compliant tar
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +010072 utilities do accept them.
Bram Moolenaared39e1d2008-08-09 17:55:22 +000073 if not exists:
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +010074 The tar plugin will reject any tar
75 files or member files that begin with
76 "-"
Bram Moolenaared39e1d2008-08-09 17:55:22 +000077 Not all tar's support the "--" which is why
78 it isn't default.
Bram Moolenaar166af9b2010-11-16 20:34:40 +010079 *g:tar_writeoptions* "uf" used to update/replace a file
Bram Moolenaar910f66f2006-04-05 20:41:53 +000080
81
82==============================================================================
834. History *tar-history*
84
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +010085
Bram Moolenaar7fc0c062010-08-10 21:43:35 +020086 v26 Aug 09, 2010 * uses buffer-local instead of window variables to hold
87 tarfile name
Bram Moolenaar477db062010-07-28 18:17:41 +020088 v25 Jun 19, 2010 * (Jan Steffens) added support for xz compression
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +010089 v24 Apr 07, 2009 * :Untarvim command implemented
90 Sep 28, 2009 * Added lzma support
Bram Moolenaared39e1d2008-08-09 17:55:22 +000091 v22 Aug 08, 2008 * security fixes
Bram Moolenaar3577c6f2008-06-24 21:16:56 +000092 v16 Jun 06, 2008 * tarfile:: used instead of tarfile: when editing files
93 inside tarballs. Fixes a problem with tarballs called
94 things like c:\abc.tar. (tnx to Bill McCarthy)
95 v14 May 09, 2008 * arno caught a security bug
96 May 28, 2008 * various security improvements. Now requires patch 299
97 which provides the fnameescape() function
98 May 30, 2008 * allows one to view *.gz and *.bz2 files that are in
99 *.tar files.
100 v12 Sep 07, 2007 * &shq now used if not the empty string for g:tar_shq
Bram Moolenaar9964e462007-05-05 17:54:07 +0000101 v10 May 02, 2006 * now using "redraw then echo" to show messages, instead
Bram Moolenaar3577c6f2008-06-24 21:16:56 +0000102 of "echo and prompt user"
Bram Moolenaard68071d2006-05-02 22:08:30 +0000103 v9 May 02, 2006 * improved detection of masquerading as tar file
104 v8 May 02, 2006 * allows editing of files that merely masquerade as tar
Bram Moolenaar3577c6f2008-06-24 21:16:56 +0000105 files
Bram Moolenaar910f66f2006-04-05 20:41:53 +0000106 v7 Mar 22, 2006 * work on making tar plugin work across network
107 Mar 27, 2006 * g:tar_cmd now available for users to change the name
Bram Moolenaar3577c6f2008-06-24 21:16:56 +0000108 of the tar program to be used. By default, of course,
109 it's "tar".
Bram Moolenaar86e01082005-12-29 22:45:34 +0000110 v6 Dec 21, 2005 * writing to files not in directories caused problems -
Bram Moolenaar3577c6f2008-06-24 21:16:56 +0000111 fixed (pointed out by Christian Robinson)
Bram Moolenaar98358622005-11-28 22:58:23 +0000112 v5 Nov 22, 2005 * report option workaround installed
113 v3 Sep 16, 2005 * handles writing files in an archive back to the
Bram Moolenaar3577c6f2008-06-24 21:16:56 +0000114 archive
Bram Moolenaar98358622005-11-28 22:58:23 +0000115 Oct 18, 2005 * <amatch> used instead of <afile> in autocmds
116 Oct 18, 2005 * handles writing to compressed archives
117 Nov 03, 2005 * handles writing tarfiles across a network using
Bram Moolenaar3577c6f2008-06-24 21:16:56 +0000118 netrw#NetWrite()
Bram Moolenaar9964e462007-05-05 17:54:07 +0000119 v2 * converted to use Vim7's new autoload feature by
Bram Moolenaar3577c6f2008-06-24 21:16:56 +0000120 Bram Moolenaar
Bram Moolenaar98358622005-11-28 22:58:23 +0000121 v1 (original) * Michael Toren (see http://michael.toren.net/code/)
122
123==============================================================================
124vim:tw=78:ts=8:ft=help