blob: 63c547b4d88867a58ca7148ca96234367601d6d3 [file] [log] [blame]
Corpulent Robinb69cd522025-02-06 21:10:49 +01001*pi_gzip.txt* For Vim version 9.1. Last change: 2025 Feb 06
Bram Moolenaar071d4272004-06-13 20:20:40 +00002
3
4 VIM REFERENCE MANUAL by Bram Moolenaar
5
6
7Editing compressed files with Vim *gzip* *bzip2* *compress*
8
91. Autocommands |gzip-autocmd|
10
11The functionality mentioned here is a |standard-plugin|.
12This plugin is only available if 'compatible' is not set.
13You can avoid loading this plugin by setting the "loaded_gzip" variable: >
14 :let loaded_gzip = 1
Christian Brabandtda4e4332023-11-05 10:45:12 +010015<
16 *g:gzip_exec*
17
18For security reasons, one may prevent that Vim runs executables automatically
19when opening a buffer. This option (default: "1") can be used to prevent
20executing the executables command when set to "0": >
21 :let g:gzip_exec = 0
22<
Bram Moolenaar071d4272004-06-13 20:20:40 +000023
Bram Moolenaar071d4272004-06-13 20:20:40 +000024==============================================================================
Christian Brabandt30c762d2023-11-14 16:44:37 +0100251. Autocommands *gzip-autocmd*
Bram Moolenaar071d4272004-06-13 20:20:40 +000026
27The plugin installs autocommands to intercept reading and writing of files
28with these extensions:
29
30 extension compression ~
Bram Moolenaar071d4272004-06-13 20:20:40 +000031 *.bz2 bzip2
Corpulent Robinb69cd522025-02-06 21:10:49 +010032 *.gz gzip
33 *.lz lzip
34 *.lz4 lz4
Bram Moolenaar6c35bea2012-07-25 17:49:10 +020035 *.lzma lzma
36 *.xz xz
Corpulent Robinb69cd522025-02-06 21:10:49 +010037 *.Z compress (Lempel-Ziv)
Bram Moolenaarc0514bf2016-11-17 14:50:09 +010038 *.zst zstd
Bram Moolenaar071d4272004-06-13 20:20:40 +000039
40That's actually the only thing you need to know. There are no options.
41
42After decompressing a file, the filetype will be detected again. This will
43make a file like "foo.c.gz" get the "c" filetype.
44
45If you have 'patchmode' set, it will be appended after the extension for
46compression. Thus editing the patchmode file will not give you the automatic
47decompression. You have to rename the file if you want this.
48
49==============================================================================
Bram Moolenaar91f84f62018-07-29 15:07:52 +020050 vim:tw=78:ts=8:noet:ft=help:norl: