blob: 71e76cc2833e0baf7618a435259068d5ec9f21df [file] [log] [blame]
Christian Brabandt30c762d2023-11-14 16:44:37 +01001*pi_gzip.txt* For Vim version 9.0. Last change: 2023 Nov 14
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 ~
31 *.Z compress (Lempel-Ziv)
32 *.gz gzip
33 *.bz2 bzip2
Bram Moolenaar6c35bea2012-07-25 17:49:10 +020034 *.lzma lzma
35 *.xz xz
Bram Moolenaarb4ada792016-10-30 21:55:26 +010036 *.lz lzip
Bram Moolenaarc0514bf2016-11-17 14:50:09 +010037 *.zst zstd
Bram Moolenaar071d4272004-06-13 20:20:40 +000038
39That's actually the only thing you need to know. There are no options.
40
41After decompressing a file, the filetype will be detected again. This will
42make a file like "foo.c.gz" get the "c" filetype.
43
44If you have 'patchmode' set, it will be appended after the extension for
45compression. Thus editing the patchmode file will not give you the automatic
46decompression. You have to rename the file if you want this.
47
48==============================================================================
Bram Moolenaar91f84f62018-07-29 15:07:52 +020049 vim:tw=78:ts=8:noet:ft=help:norl: