Mercurial > vim
comparison runtime/plugin/gzip.vim @ 2034:7bc41231fbc7
Update runtime files.
author | Bram Moolenaar <bram@zimbu.org> |
---|---|
date | Wed, 06 Jan 2010 20:54:52 +0100 |
parents | 7472c565592a |
children | aab202d244b6 |
comparison
equal
deleted
inserted
replaced
2033:de5a43c5eedc | 2034:7bc41231fbc7 |
---|---|
1 " Vim plugin for editing compressed files. | 1 " Vim plugin for editing compressed files. |
2 " Maintainer: Bram Moolenaar <Bram@vim.org> | 2 " Maintainer: Bram Moolenaar <Bram@vim.org> |
3 " Last Change: 2005 Jul 26 | 3 " Last Change: 2009 Jul 01 |
4 | 4 |
5 " Exit quickly when: | 5 " Exit quickly when: |
6 " - this plugin was already loaded | 6 " - this plugin was already loaded |
7 " - when 'compatible' is set | 7 " - when 'compatible' is set |
8 " - some autocommands are already taking care of compressed files | 8 " - some autocommands are already taking care of compressed files |
18 " Enable editing of gzipped files. | 18 " Enable editing of gzipped files. |
19 " The functions are defined in autoload/gzip.vim. | 19 " The functions are defined in autoload/gzip.vim. |
20 " | 20 " |
21 " Set binary mode before reading the file. | 21 " Set binary mode before reading the file. |
22 " Use "gzip -d", gunzip isn't always available. | 22 " Use "gzip -d", gunzip isn't always available. |
23 autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z setlocal bin | 23 autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma setlocal bin |
24 autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn") | 24 autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn") |
25 autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d") | 25 autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d") |
26 autocmd BufReadPost,FileReadPost *.Z call gzip#read("uncompress") | 26 autocmd BufReadPost,FileReadPost *.Z call gzip#read("uncompress") |
27 autocmd BufReadPost,FileReadPost *.lzma call gzip#read("lzma -d") | |
27 autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip") | 28 autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip") |
28 autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2") | 29 autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2") |
29 autocmd BufWritePost,FileWritePost *.Z call gzip#write("compress -f") | 30 autocmd BufWritePost,FileWritePost *.Z call gzip#write("compress -f") |
31 autocmd BufWritePost,FileWritePost *.lzma call gzip#write("lzma -z") | |
30 autocmd FileAppendPre *.gz call gzip#appre("gzip -dn") | 32 autocmd FileAppendPre *.gz call gzip#appre("gzip -dn") |
31 autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d") | 33 autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d") |
32 autocmd FileAppendPre *.Z call gzip#appre("uncompress") | 34 autocmd FileAppendPre *.Z call gzip#appre("uncompress") |
35 autocmd FileAppendPre *.lzma call gzip#appre("lzma -d") | |
33 autocmd FileAppendPost *.gz call gzip#write("gzip") | 36 autocmd FileAppendPost *.gz call gzip#write("gzip") |
34 autocmd FileAppendPost *.bz2 call gzip#write("bzip2") | 37 autocmd FileAppendPost *.bz2 call gzip#write("bzip2") |
35 autocmd FileAppendPost *.Z call gzip#write("compress -f") | 38 autocmd FileAppendPost *.Z call gzip#write("compress -f") |
39 autocmd FileAppendPost *.lzma call gzip#write("lzma -z") | |
36 augroup END | 40 augroup END |