annotate runtime/plugin/gzip.vim @ 5223:91d478da863e v7.4a.037

updated for version 7.4a.037 Problem: Win32: When mouse is hidden and in the toolbar, moving it won't make it appear. (Sami Salonen) Solution: Add tabline_wndproc() and toolbar_wndproc(). (Ken Takata)
author Bram Moolenaar <bram@vim.org>
date Sun, 21 Jul 2013 17:46:43 +0200
parents aab202d244b6
children 169a62d5bcb9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim plugin for editing compressed files.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Maintainer: Bram Moolenaar <Bram@vim.org>
2111
aab202d244b6 updated for version 7.2.394
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
3 " Last Change: 2010 Mar 10
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Exit quickly when:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " - this plugin was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " - when 'compatible' is set
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " - some autocommands are already taking care of compressed files
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 if exists("loaded_gzip") || &cp || exists("#BufReadPre#*.gz")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 let loaded_gzip = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 augroup gzip
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 " Remove all gzip autocommands
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 au!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
446
7472c565592a updated for version 7.0117
vimboss
parents: 271
diff changeset
18 " Enable editing of gzipped files.
7472c565592a updated for version 7.0117
vimboss
parents: 271
diff changeset
19 " The functions are defined in autoload/gzip.vim.
7472c565592a updated for version 7.0117
vimboss
parents: 271
diff changeset
20 "
7472c565592a updated for version 7.0117
vimboss
parents: 271
diff changeset
21 " Set binary mode before reading the file.
7472c565592a updated for version 7.0117
vimboss
parents: 271
diff changeset
22 " Use "gzip -d", gunzip isn't always available.
2111
aab202d244b6 updated for version 7.2.394
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
23 autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma,*.xz setlocal bin
446
7472c565592a updated for version 7.0117
vimboss
parents: 271
diff changeset
24 autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn")
7472c565592a updated for version 7.0117
vimboss
parents: 271
diff changeset
25 autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d")
7472c565592a updated for version 7.0117
vimboss
parents: 271
diff changeset
26 autocmd BufReadPost,FileReadPost *.Z call gzip#read("uncompress")
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 446
diff changeset
27 autocmd BufReadPost,FileReadPost *.lzma call gzip#read("lzma -d")
2111
aab202d244b6 updated for version 7.2.394
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
28 autocmd BufReadPost,FileReadPost *.xz call gzip#read("xz -d")
446
7472c565592a updated for version 7.0117
vimboss
parents: 271
diff changeset
29 autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip")
7472c565592a updated for version 7.0117
vimboss
parents: 271
diff changeset
30 autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2")
7472c565592a updated for version 7.0117
vimboss
parents: 271
diff changeset
31 autocmd BufWritePost,FileWritePost *.Z call gzip#write("compress -f")
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 446
diff changeset
32 autocmd BufWritePost,FileWritePost *.lzma call gzip#write("lzma -z")
2111
aab202d244b6 updated for version 7.2.394
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
33 autocmd BufWritePost,FileWritePost *.xz call gzip#write("xz -z")
446
7472c565592a updated for version 7.0117
vimboss
parents: 271
diff changeset
34 autocmd FileAppendPre *.gz call gzip#appre("gzip -dn")
7472c565592a updated for version 7.0117
vimboss
parents: 271
diff changeset
35 autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d")
7472c565592a updated for version 7.0117
vimboss
parents: 271
diff changeset
36 autocmd FileAppendPre *.Z call gzip#appre("uncompress")
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 446
diff changeset
37 autocmd FileAppendPre *.lzma call gzip#appre("lzma -d")
2111
aab202d244b6 updated for version 7.2.394
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
38 autocmd FileAppendPre *.xz call gzip#appre("xz -d")
446
7472c565592a updated for version 7.0117
vimboss
parents: 271
diff changeset
39 autocmd FileAppendPost *.gz call gzip#write("gzip")
7472c565592a updated for version 7.0117
vimboss
parents: 271
diff changeset
40 autocmd FileAppendPost *.bz2 call gzip#write("bzip2")
7472c565592a updated for version 7.0117
vimboss
parents: 271
diff changeset
41 autocmd FileAppendPost *.Z call gzip#write("compress -f")
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 446
diff changeset
42 autocmd FileAppendPost *.lzma call gzip#write("lzma -z")
2111
aab202d244b6 updated for version 7.2.394
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
43 autocmd FileAppendPost *.xz call gzip#write("xz -z")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 augroup END