Permalink
Browse files

Applied some of the debian patches.

  • Loading branch information...
1 parent b190a43 commit 07df6fc11f0fe0f2a91c58506c6fa2aeff5cf3d9 @mbert committed Dec 10, 2011
Showing with 22 additions and 0 deletions.
  1. +22 −0 data/scripts/augz.ex
View
22 data/scripts/augz.ex
@@ -0,0 +1,22 @@
+" This file contains a set of autocmds which allow elvis to read & write
+" files that are compressed via gzip.
+augroup gzip
+ au!
+ au BufReadPre,FileReadPre *.gz set reol=binary
+ au BufReadPost *.gz %!gunzip
+ au FileReadPost *.gz '[,']!gunzip 2>/dev/null
+ au BufReadPost,FileReadPost *.gz {
+ set reol=text nomodified
+ file! (basename(filename))
+ source! (elvispath("elvis.arf"))
+ file! (filename).gz
+ set edited
+ }
+ au BufReadPost *.gz eval doau BufReadPost (basename(filename))
+ au BufWritePost,FileWritePost *.gz eval mv (afile) (basename(afile))
+ au BufWritePost,FileWritePost *.gz eval !gzip (basename(afile))
+ au FileAppendPre *.gz eval !gunzip (afile)
+ au FileAppendPre *.gz eval !mv (basename(afile)) (afile)
+ au FileAppendPost *.gz eval !mv (afile) (basename(afile))
+ au FileAppendPost *.gz eval !gzip (basename(afile))
+augroup END

0 comments on commit 07df6fc

Please sign in to comment.