annotate runtime/doc/pi_tar.txt @ 5560:4b92012f6b18 v7.4.128

updated for version 7.4.128 Problem: Perl 5.18 for MSVC doesn't work. Solution: Add check in makefile and define __inline. (Ken Takata)
author Bram Moolenaar <bram@vim.org>
date Sat, 14 Dec 2013 11:50:35 +0100
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_tar.txt* For Vim version 7.4. Last change: 2013 Apr 17
799
6beb2c667935 updated for version 7.0b
vimboss
parents: 622
diff changeset
2
1620
73fe8baea242 updated for version 7.2a
vimboss
parents: 1245
diff changeset
3 +====================+
73fe8baea242 updated for version 7.2a
vimboss
parents: 1245
diff changeset
4 | Tar File Interface |
73fe8baea242 updated for version 7.2a
vimboss
parents: 1245
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)
3281
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2908
diff changeset
9 Copyright 2005-2012: *tar-copyright*
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2908
diff changeset
10 The VIM LICENSE (see |copyright|) applies to the files in this
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2908
diff changeset
11 package, including tarPlugin.vim, tar.vim, and pi_tar.txt. Like
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2908
diff changeset
12 anything else that's except use "tar.vim" instead of "VIM". Like
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2908
diff changeset
13 anything else that's free, tar.vim and its associated files are
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2908
diff changeset
14 provided *as is* and comes with no warranty of any kind, either
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2908
diff changeset
15 expressed or implied. No guarantees of merchantability. No
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2908
diff changeset
16 guarantees of suitability for any purpose. By using this plugin, you
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2908
diff changeset
17 agree that in no event will the copyright holder be liable for any
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2908
diff changeset
18 damages resulting from the use of this 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 ==============================================================================
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
21 1. Contents *tar* *tar-contents*
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
22 1. Contents..................................................|tar-contents|
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
23 2. Usage.....................................................|tar-usage|
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 810
diff changeset
24 3. Options...................................................|tar-options|
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 810
diff changeset
25 4. History...................................................|tar-history|
567
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
26
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
27 ==============================================================================
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
28 2. Usage *tar-usage* *tar-manual*
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 *.tar 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 tar archives via the plugin.
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
35
2426
e52d87a2bb3e More runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 2413
diff changeset
36 *:Vimuntar*
e52d87a2bb3e More runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 2413
diff changeset
37 VIMUNTAR~
2033
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
38
2426
e52d87a2bb3e More runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 2413
diff changeset
39 :Vimuntar [vimhome]
2033
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
40
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
41 This command copies, if necessary, the tarball to the .vim or vimfiles
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
42 directory using the first writable directory in the |'runtimepath'|
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
43 when no [vimhome] is specified. Otherwise, the [vimhome] argument
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
44 allows the user to specify that directory, instead.
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
45
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
46 The copy is done using the command in *g:tar_copycmd* , which is >
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
47 cp for cygwin, unix, macunix
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
48 copy for windows (32, 95, 64, 16)
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
49 < The extraction is done with the command specified with
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
50 *g:tar_extractcmd* , which by default is >
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
51 "tar -xf"
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
52 <
4339
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
53 *:TarDiff*
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
54 DIFFERENCING SUPPORT~
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
55
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
56 :TarDiff [filename]
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
57
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
58 This command will attempt to show the differences between the tarball
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
59 version of a file and the associated file on the system. In order to
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
60 find that file on the system, the script uses the path associated with
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
61 the file mentioned in the tarball. If the current directory is not
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
62 correct for that path, :TarDiff will fail to find the associated file.
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
63
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
64 If the [filename] is given, that that filename (and path) will be used
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
65 to specify the associated file.
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
66
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
67
2033
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
68 PREVENTING LOADING~
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
69
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
70 If for some reason you do not wish to use vim to examine tar'd files,
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
71 you may put the following two variables into your <.vimrc> to prevent
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
72 the tar plugin from loading: >
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
73
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
74 let g:loaded_tarPlugin= 1
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
75 let g:loaded_tar = 1
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
76 <
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
77
567
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
78 ==============================================================================
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 810
diff changeset
79 3. Options *tar-options*
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 810
diff changeset
80
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 810
diff changeset
81 These options are variables that one may change, typically in one's
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 810
diff changeset
82 <.vimrc> file.
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
83 Default
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
84 Variable Value Explanation
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2642
diff changeset
85 *g:tar_browseoptions* "Ptf" used to get a list of contents
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2642
diff changeset
86 *g:tar_readoptions* "OPxf" used to extract a file from a tarball
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2642
diff changeset
87 *g:tar_cmd* "tar" the name of the tar program
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2642
diff changeset
88 *g:tar_nomax* 0 if true, file window will not be maximized
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2642
diff changeset
89 *g:tar_secure* undef if exists:
2033
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
90 "--"s will be used to prevent unwanted
1702
5232b9862f23 updated for version 7.2-000
vimboss
parents: 1698
diff changeset
91 option expansion in tar commands.
5232b9862f23 updated for version 7.2-000
vimboss
parents: 1698
diff changeset
92 Please be sure that your tar command
5232b9862f23 updated for version 7.2-000
vimboss
parents: 1698
diff changeset
93 accepts "--"; Posix compliant tar
2033
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
94 utilities do accept them.
1702
5232b9862f23 updated for version 7.2-000
vimboss
parents: 1698
diff changeset
95 if not exists:
2033
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
96 The tar plugin will reject any tar
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
97 files or member files that begin with
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
98 "-"
1702
5232b9862f23 updated for version 7.2-000
vimboss
parents: 1698
diff changeset
99 Not all tar's support the "--" which is why
5232b9862f23 updated for version 7.2-000
vimboss
parents: 1698
diff changeset
100 it isn't default.
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2642
diff changeset
101 *g:tar_writeoptions* "uf" used to update/replace a file
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 810
diff changeset
102
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 810
diff changeset
103
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 810
diff changeset
104 ==============================================================================
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 810
diff changeset
105 4. History *tar-history*
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 810
diff changeset
106
2033
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
107
3281
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2908
diff changeset
108 v28 Jun 23, 2011 * a few more decompression options (tbz tb2 txz)
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2642
diff changeset
109 v27 May 31, 2011 * moved cygwin detection before g:tar_copycmd handling
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2642
diff changeset
110 * inserted additional |:keepj| modifiers
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2642
diff changeset
111 * changed silent to sil! (|:silent|)
2535
31e51111bd14 Runtime file updates. Fix tar plugin window split.
Bram Moolenaar <bram@vim.org>
parents: 2527
diff changeset
112 v26 Aug 09, 2010 * uses buffer-local instead of window variables to hold
31e51111bd14 Runtime file updates. Fix tar plugin window split.
Bram Moolenaar <bram@vim.org>
parents: 2527
diff changeset
113 tarfile name
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2642
diff changeset
114 * inserted keepj before 0d to protect jump list
2426
e52d87a2bb3e More runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 2413
diff changeset
115 v25 Jun 19, 2010 * (Jan Steffens) added support for xz compression
2033
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
116 v24 Apr 07, 2009 * :Untarvim command implemented
de5a43c5eedc Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
117 Sep 28, 2009 * Added lzma support
1702
5232b9862f23 updated for version 7.2-000
vimboss
parents: 1698
diff changeset
118 v22 Aug 08, 2008 * security fixes
1620
73fe8baea242 updated for version 7.2a
vimboss
parents: 1245
diff changeset
119 v16 Jun 06, 2008 * tarfile:: used instead of tarfile: when editing files
73fe8baea242 updated for version 7.2a
vimboss
parents: 1245
diff changeset
120 inside tarballs. Fixes a problem with tarballs called
73fe8baea242 updated for version 7.2a
vimboss
parents: 1245
diff changeset
121 things like c:\abc.tar. (tnx to Bill McCarthy)
73fe8baea242 updated for version 7.2a
vimboss
parents: 1245
diff changeset
122 v14 May 09, 2008 * arno caught a security bug
73fe8baea242 updated for version 7.2a
vimboss
parents: 1245
diff changeset
123 May 28, 2008 * various security improvements. Now requires patch 299
73fe8baea242 updated for version 7.2a
vimboss
parents: 1245
diff changeset
124 which provides the fnameescape() function
73fe8baea242 updated for version 7.2a
vimboss
parents: 1245
diff changeset
125 May 30, 2008 * allows one to view *.gz and *.bz2 files that are in
73fe8baea242 updated for version 7.2a
vimboss
parents: 1245
diff changeset
126 *.tar files.
73fe8baea242 updated for version 7.2a
vimboss
parents: 1245
diff changeset
127 v12 Sep 07, 2007 * &shq now used if not the empty string for g:tar_shq
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
128 v10 May 02, 2006 * now using "redraw then echo" to show messages, instead
1620
73fe8baea242 updated for version 7.2a
vimboss
parents: 1245
diff changeset
129 of "echo and prompt user"
857
b933657f7c9d updated for version 7.0g01
vimboss
parents: 856
diff changeset
130 v9 May 02, 2006 * improved detection of masquerading as tar file
b933657f7c9d updated for version 7.0g01
vimboss
parents: 856
diff changeset
131 v8 May 02, 2006 * allows editing of files that merely masquerade as tar
1620
73fe8baea242 updated for version 7.2a
vimboss
parents: 1245
diff changeset
132 files
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 810
diff changeset
133 v7 Mar 22, 2006 * work on making tar plugin work across network
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 810
diff changeset
134 Mar 27, 2006 * g:tar_cmd now available for users to change the name
1620
73fe8baea242 updated for version 7.2a
vimboss
parents: 1245
diff changeset
135 of the tar program to be used. By default, of course,
73fe8baea242 updated for version 7.2a
vimboss
parents: 1245
diff changeset
136 it's "tar".
622
4096208d2a50 updated for version 7.0178
vimboss
parents: 567
diff changeset
137 v6 Dec 21, 2005 * writing to files not in directories caused problems -
1620
73fe8baea242 updated for version 7.2a
vimboss
parents: 1245
diff changeset
138 fixed (pointed out by Christian Robinson)
567
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
139 v5 Nov 22, 2005 * report option workaround installed
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
140 v3 Sep 16, 2005 * handles writing files in an archive back to the
1620
73fe8baea242 updated for version 7.2a
vimboss
parents: 1245
diff changeset
141 archive
567
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
142 Oct 18, 2005 * <amatch> used instead of <afile> in autocmds
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
143 Oct 18, 2005 * handles writing to compressed archives
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
144 Nov 03, 2005 * handles writing tarfiles across a network using
1620
73fe8baea242 updated for version 7.2a
vimboss
parents: 1245
diff changeset
145 netrw#NetWrite()
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
146 v2 * converted to use Vim7's new autoload feature by
1620
73fe8baea242 updated for version 7.2a
vimboss
parents: 1245
diff changeset
147 Bram Moolenaar
567
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
148 v1 (original) * Michael Toren (see http://michael.toren.net/code/)
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
149
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
150 ==============================================================================
afd8e69dba19 updated for version 7.0161
vimboss
parents:
diff changeset
151 vim:tw=78:ts=8:ft=help