pi_tar.txt 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. *pi_tar.txt* For Vim version 8.2. Last change: 2020 Jan 07
  2. +====================+
  3. | Tar File Interface |
  4. +====================+
  5. Author: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
  6. (remove NOSPAM from Campbell's email first)
  7. Copyright 2005-2017: *tar-copyright*
  8. The VIM LICENSE (see |copyright|) applies to the files in this
  9. package, including tarPlugin.vim, tar.vim, and pi_tar.txt. Like
  10. anything else that's except use "tar.vim" instead of "VIM". Like
  11. anything else that's free, tar.vim and its associated files are
  12. provided *as is* and comes with no warranty of any kind, either
  13. expressed or implied. No guarantees of merchantability. No
  14. guarantees of suitability for any purpose. By using this plugin, you
  15. agree that in no event will the copyright holder be liable for any
  16. damages resulting from the use of this software. Use at your own risk!
  17. ==============================================================================
  18. 1. Contents *tar* *tar-contents*
  19. 1. Contents..................................................|tar-contents|
  20. 2. Usage.....................................................|tar-usage|
  21. 3. Options...................................................|tar-options|
  22. 4. History...................................................|tar-history|
  23. ==============================================================================
  24. 2. Usage *tar-usage* *tar-manual*
  25. When one edits a *.tar file, this plugin will handle displaying a
  26. contents page. Select a file to edit by moving the cursor atop
  27. the desired file, then hit the <return> key. After editing, one may
  28. also write to the file. Currently, one may not make a new file in
  29. tar archives via the plugin.
  30. *:Vimuntar*
  31. VIMUNTAR~
  32. :Vimuntar [vimhome]
  33. This command copies, if necessary, the tarball to the .vim or vimfiles
  34. directory using the first writable directory in the |'runtimepath'|
  35. when no [vimhome] is specified. Otherwise, the [vimhome] argument
  36. allows the user to specify that directory, instead.
  37. The copy is done using the command in *g:tar_copycmd* , which is >
  38. cp for cygwin, unix, macunix
  39. copy for windows (32, 95, 64, 16)
  40. < The extraction is done with the command specified with
  41. *g:tar_extractcmd* , which by default is >
  42. "tar -xf"
  43. <
  44. *:TarDiff*
  45. DIFFERENCING SUPPORT~
  46. :TarDiff [filename]
  47. This command will attempt to show the differences between the tarball
  48. version of a file and the associated file on the system. In order to
  49. find that file on the system, the script uses the path associated with
  50. the file mentioned in the tarball. If the current directory is not
  51. correct for that path, :TarDiff will fail to find the associated file.
  52. If the [filename] is given, that that filename (and path) will be used
  53. to specify the associated file.
  54. PREVENTING LOADING~
  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. let g:loaded_tarPlugin= 1
  59. let g:loaded_tar = 1
  60. <
  61. ==============================================================================
  62. 3. Options *tar-options*
  63. These options are variables that one may change, typically in one's
  64. <.vimrc> file.
  65. Default
  66. Variable Value Explanation
  67. *g:tar_browseoptions* "Ptf" used to get a list of contents
  68. *g:tar_readoptions* "OPxf" used to extract a file from a tarball
  69. *g:tar_cmd* "tar" the name of the tar program
  70. *g:tar_nomax* 0 if true, file window will not be maximized
  71. *g:tar_secure* undef if exists:
  72. "--"s will be used to prevent unwanted
  73. option expansion in tar commands.
  74. Please be sure that your tar command
  75. accepts "--"; Posix compliant tar
  76. utilities do accept them.
  77. if not exists:
  78. The tar plugin will reject any tar
  79. files or member files that begin with
  80. "-"
  81. Not all tar's support the "--" which is why
  82. it isn't default.
  83. *g:tar_writeoptions* "uf" used to update/replace a file
  84. ==============================================================================
  85. 4. History *tar-history*
  86. v31 Apr 02, 2017 * (klartext) reported that browsing encrypted
  87. files in a zip archive created unencrypted
  88. swap files. I am applying a similar fix
  89. used on zip.vim to tar.vim: new buffers
  90. are opened with |:noswapfile|.
  91. May 16, 2017 * When the mouse option isn't empty, the
  92. leftmouse can be used to select a file
  93. in the tar-file listing.
  94. v30 Apr 22, 2014 * .tgz files are ambiguous: they may have been
  95. compressed with either gzip or bzip2. Tar.vim
  96. disambiguates by using unix's "file" command.
  97. Feb 18, 2016 * Changed =~ to =~# where appropriate
  98. Feb 18, 2017 * Now also permits xz decompression
  99. v28 Jun 23, 2011 * a few more decompression options (tbz tb2 txz)
  100. v27 May 31, 2011 * moved cygwin detection before g:tar_copycmd
  101. handling
  102. * inserted additional |:keepj| modifiers
  103. * changed silent to sil! (|:silent|)
  104. v26 Aug 09, 2010 * uses buffer-local instead of window variables
  105. to hold tarfile name
  106. * inserted keepj before 0d to protect jump list
  107. v25 Jun 19, 2010 * (Jan Steffens) added support for xz
  108. compression
  109. v24 Apr 07, 2009 * :Untarvim command implemented
  110. Sep 28, 2009 * Added lzma support
  111. v22 Aug 08, 2008 * security fixes
  112. v16 Jun 06, 2008 * tarfile:: used instead of tarfile: when
  113. editing files inside tarballs. Fixes a
  114. problem with tarballs called things like
  115. c:\abc.tar. (tnx to Bill McCarthy)
  116. v14 May 09, 2008 * arno caught a security bug
  117. May 28, 2008 * various security improvements. Now requires
  118. patch 299 which provides the fnameescape()
  119. function
  120. May 30, 2008 * allows one to view *.gz and *.bz2 files that
  121. are in *.tar files.
  122. v12 Sep 07, 2007 * &shq now used if not the empty string for
  123. g:tar_shq
  124. v10 May 02, 2006 * now using "redraw then echo" to show messages,
  125. instead of "echo and prompt user"
  126. v9 May 02, 2006 * improved detection of masquerading as tar file
  127. v8 May 02, 2006 * allows editing of files that merely masquerade
  128. as tar files
  129. v7 Mar 22, 2006 * work on making tar plugin work across network
  130. Mar 27, 2006 * g:tar_cmd now available for users to change
  131. the name of the tar program to be used. By
  132. default, of course, it's "tar".
  133. v6 Dec 21, 2005 * writing to files not in directories caused
  134. problems - fixed (pointed out by
  135. Christian Robinson)
  136. v5 Nov 22, 2005 * report option workaround installed
  137. v3 Sep 16, 2005 * handles writing files in an archive back to
  138. the archive
  139. Oct 18, 2005 * <amatch> used instead of <afile> in autocmds
  140. Oct 18, 2005 * handles writing to compressed archives
  141. Nov 03, 2005 * handles writing tarfiles across a network
  142. using netrw#NetWrite()
  143. v2 * converted to use Vim7's new autoload feature
  144. by Bram Moolenaar
  145. v1 (original) * Michael Toren
  146. (see http://michael.toren.net/code/)
  147. ==============================================================================
  148. vim:tw=78:ts=8:noet:ft=help