blob: 1ff4d7c4ca3e5feb789d603a2fbbd8e5e869f2fd [file] [log] [blame]
Bram Moolenaar6be7f872012-01-20 21:08:56 +01001*pi_tar.txt* For Vim version 7.3. Last change: 2012 Jan 17
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 Moolenaar6be7f872012-01-20 21:08:56 +01009Copyright 2005-2012: *tar-copyright*
10 The VIM LICENSE (see |copyright|) applies to the files in this
11 package, including tarPlugin.vim, tar.vim, and pi_tar.txt. Like
12 anything else that's except use "tar.vim" instead of "VIM". Like
13 anything else that's free, tar.vim and its associated files are
14 provided *as is* and comes with no warranty of any kind, either
15 expressed or implied. No guarantees of merchantability. No
16 guarantees of suitability for any purpose. By using this plugin, you
17 agree that in no event will the copyright holder be liable for any
18 damages resulting from the use of this software. Use at your own risk!
Bram Moolenaar98358622005-11-28 22:58:23 +000019
20==============================================================================
211. Contents *tar* *tar-contents*
22 1. Contents..................................................|tar-contents|
23 2. Usage.....................................................|tar-usage|
Bram Moolenaar910f66f2006-04-05 20:41:53 +000024 3. Options...................................................|tar-options|
25 4. History...................................................|tar-history|
Bram Moolenaar98358622005-11-28 22:58:23 +000026
27==============================================================================
282. Usage *tar-usage* *tar-manual*
29
30 When one edits a *.tar 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 tar archives via the plugin.
35
Bram Moolenaar477db062010-07-28 18:17:41 +020036 *:Vimuntar*
37 VIMUNTAR~
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +010038
Bram Moolenaar477db062010-07-28 18:17:41 +020039 :Vimuntar [vimhome]
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +010040
41 This command copies, if necessary, the tarball to the .vim or vimfiles
42 directory using the first writable directory in the |'runtimepath'|
43 when no [vimhome] is specified. Otherwise, the [vimhome] argument
44 allows the user to specify that directory, instead.
45
46 The copy is done using the command in *g:tar_copycmd* , which is >
47 cp for cygwin, unix, macunix
48 copy for windows (32, 95, 64, 16)
49< The extraction is done with the command specified with
50 *g:tar_extractcmd* , which by default is >
51 "tar -xf"
52<
53 PREVENTING LOADING~
54
55 If for some reason you do not wish to use vim to examine tar'd files,
56 you may put the following two variables into your <.vimrc> to prevent
57 the tar plugin from loading: >
58
59 let g:loaded_tarPlugin= 1
60 let g:loaded_tar = 1
61<
62
Bram Moolenaar98358622005-11-28 22:58:23 +000063==============================================================================
Bram Moolenaar910f66f2006-04-05 20:41:53 +0000643. Options *tar-options*
65
66 These options are variables that one may change, typically in one's
67 <.vimrc> file.
Bram Moolenaar9964e462007-05-05 17:54:07 +000068 Default
69 Variable Value Explanation
Bram Moolenaar251e1912011-06-19 05:09:16 +020070 *g:tar_browseoptions* "Ptf" used to get a list of contents
71 *g:tar_readoptions* "OPxf" used to extract a file from a tarball
72 *g:tar_cmd* "tar" the name of the tar program
73 *g:tar_nomax* 0 if true, file window will not be maximized
74 *g:tar_secure* undef if exists:
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +010075 "--"s will be used to prevent unwanted
Bram Moolenaared39e1d2008-08-09 17:55:22 +000076 option expansion in tar commands.
77 Please be sure that your tar command
78 accepts "--"; Posix compliant tar
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +010079 utilities do accept them.
Bram Moolenaared39e1d2008-08-09 17:55:22 +000080 if not exists:
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +010081 The tar plugin will reject any tar
82 files or member files that begin with
83 "-"
Bram Moolenaared39e1d2008-08-09 17:55:22 +000084 Not all tar's support the "--" which is why
85 it isn't default.
Bram Moolenaar251e1912011-06-19 05:09:16 +020086 *g:tar_writeoptions* "uf" used to update/replace a file
Bram Moolenaar910f66f2006-04-05 20:41:53 +000087
88
89==============================================================================
904. History *tar-history*
91
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +010092
Bram Moolenaar6be7f872012-01-20 21:08:56 +010093 v28 Jun 23, 2011 * a few more decompression options (tbz tb2 txz)
Bram Moolenaar251e1912011-06-19 05:09:16 +020094 v27 May 31, 2011 * moved cygwin detection before g:tar_copycmd handling
95 * inserted additional |:keepj| modifiers
96 * changed silent to sil! (|:silent|)
Bram Moolenaar7fc0c062010-08-10 21:43:35 +020097 v26 Aug 09, 2010 * uses buffer-local instead of window variables to hold
98 tarfile name
Bram Moolenaar251e1912011-06-19 05:09:16 +020099 * inserted keepj before 0d to protect jump list
Bram Moolenaar477db062010-07-28 18:17:41 +0200100 v25 Jun 19, 2010 * (Jan Steffens) added support for xz compression
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100101 v24 Apr 07, 2009 * :Untarvim command implemented
102 Sep 28, 2009 * Added lzma support
Bram Moolenaared39e1d2008-08-09 17:55:22 +0000103 v22 Aug 08, 2008 * security fixes
Bram Moolenaar3577c6f2008-06-24 21:16:56 +0000104 v16 Jun 06, 2008 * tarfile:: used instead of tarfile: when editing files
105 inside tarballs. Fixes a problem with tarballs called
106 things like c:\abc.tar. (tnx to Bill McCarthy)
107 v14 May 09, 2008 * arno caught a security bug
108 May 28, 2008 * various security improvements. Now requires patch 299
109 which provides the fnameescape() function
110 May 30, 2008 * allows one to view *.gz and *.bz2 files that are in
111 *.tar files.
112 v12 Sep 07, 2007 * &shq now used if not the empty string for g:tar_shq
Bram Moolenaar9964e462007-05-05 17:54:07 +0000113 v10 May 02, 2006 * now using "redraw then echo" to show messages, instead
Bram Moolenaar3577c6f2008-06-24 21:16:56 +0000114 of "echo and prompt user"
Bram Moolenaard68071d2006-05-02 22:08:30 +0000115 v9 May 02, 2006 * improved detection of masquerading as tar file
116 v8 May 02, 2006 * allows editing of files that merely masquerade as tar
Bram Moolenaar3577c6f2008-06-24 21:16:56 +0000117 files
Bram Moolenaar910f66f2006-04-05 20:41:53 +0000118 v7 Mar 22, 2006 * work on making tar plugin work across network
119 Mar 27, 2006 * g:tar_cmd now available for users to change the name
Bram Moolenaar3577c6f2008-06-24 21:16:56 +0000120 of the tar program to be used. By default, of course,
121 it's "tar".
Bram Moolenaar86e01082005-12-29 22:45:34 +0000122 v6 Dec 21, 2005 * writing to files not in directories caused problems -
Bram Moolenaar3577c6f2008-06-24 21:16:56 +0000123 fixed (pointed out by Christian Robinson)
Bram Moolenaar98358622005-11-28 22:58:23 +0000124 v5 Nov 22, 2005 * report option workaround installed
125 v3 Sep 16, 2005 * handles writing files in an archive back to the
Bram Moolenaar3577c6f2008-06-24 21:16:56 +0000126 archive
Bram Moolenaar98358622005-11-28 22:58:23 +0000127 Oct 18, 2005 * <amatch> used instead of <afile> in autocmds
128 Oct 18, 2005 * handles writing to compressed archives
129 Nov 03, 2005 * handles writing tarfiles across a network using
Bram Moolenaar3577c6f2008-06-24 21:16:56 +0000130 netrw#NetWrite()
Bram Moolenaar9964e462007-05-05 17:54:07 +0000131 v2 * converted to use Vim7's new autoload feature by
Bram Moolenaar3577c6f2008-06-24 21:16:56 +0000132 Bram Moolenaar
Bram Moolenaar98358622005-11-28 22:58:23 +0000133 v1 (original) * Michael Toren (see http://michael.toren.net/code/)
134
135==============================================================================
136vim:tw=78:ts=8:ft=help