" Avoid warning for the new version - by popular demand.
version 4.0

" Settings for Debian GNU/Linux:
set helpfile=/usr/doc/vim/vim_help.txt.gz

" Automagically enable editing of gzipped files:
" read ->   set binary mode before reading the file, gunzip in
"           buffer after reading.
" write ->  gzip after writing.
" append -> gunzip, append, gzip.
"
" From the sample vimrc in the upstream package.
" You may want to change gzip to gzip -9 for maximum compression -
" your mileage may vary. Experiment!

autocmd BufReadPre,FileReadPre		*.gz set bin
autocmd BufReadPost,FileReadPost	*.gz '[,']!gunzip
autocmd BufReadPost,FileReadPost	*.gz set nobin

autocmd BufWritePost,FileWritePost	*.gz !mv <afile> <afile>:r
autocmd BufWritePost,FileWritePost	*.gz !gzip <afile>:r

autocmd FileAppendPre			*.gz !gunzip <afile>
autocmd FileAppendPre			*.gz !mv <afile>:r <afile>
autocmd FileAppendPost			*.gz !mv <afile> <afile>:r
autocmd FileAppendPost			*.gz !gzip <afile>:r
