home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 March / PCWELT_3_2006.ISO / base / 05_common.mo / usr / share / elvis-2.2_0 / scripts / augz.ex < prev    next >
Encoding:
Text File  |  2004-02-22  |  763 b   |  17 lines

  1. " This file contains a set of autocmds which allow elvis to read & write
  2. " files that are compressed via gzip.
  3. augroup gzip
  4.   au!
  5.   au BufReadPre,FileReadPre    *.gz set reol=binary
  6.   au BufReadPost        *.gz %!gunzip
  7.   au FileReadPost        *.gz '[,']!gunzip
  8.   au BufReadPost,FileReadPost    *.gz set reol=text nomodified bufdisplay=normal
  9.   au BufReadPost        *.gz eval doau BufReadPost (basename(filename))
  10.   au BufWritePost,FileWritePost    *.gz eval mv (afile) (basename(afile))
  11.   au BufWritePost,FileWritePost    *.gz eval !gzip (basename(afile))
  12.   au FileAppendPre        *.gz eval !gunzip (afile)
  13.   au FileAppendPre        *.gz eval !mv (basename(afile)) (afile)
  14.   au FileAppendPost        *.gz eval !mv (afile) (basename(afile))
  15.   au FileAppendPost        *.gz eval !gzip (basename(afile))
  16. augroup END
  17.