Skip to content

Instantly share code, notes, and snippets.

@sharkoz
Created March 6, 2014 15:45
Show Gist options
  • Save sharkoz/9392572 to your computer and use it in GitHub Desktop.
Save sharkoz/9392572 to your computer and use it in GitHub Desktop.
Allow vim to open *ZIP files as zip files.
augroup ZIP
au BufReadPre *ZIP setlocal bin
au BufReadCmd *ZIP call zip#Browse(expand("<amatch>"))
au BufWriteCmd *ZIP call zip#Write(expand("<amatch>"))
au FileReadCmd *ZIP zip#Read(expand("<amatch>"), 0)
au FileReadPre *ZIP setlocal bin
au FileWriteCmd *ZIP call zip#Write(expand("<amatch>"))
augroup END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment