diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-09-16 21:47:57 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-09-16 21:47:57 +0000 |
commit | 6b730e111c329caccbb16f08c5b6bbc41d3b5690 (patch) | |
tree | da7ce9db19f11624913c41b8d68002ad1c301c4d /runtime/plugin | |
parent | 58071af793eee8eaaf4d3e60ddf652227bfe79c3 (diff) | |
download | vim-git-6b730e111c329caccbb16f08c5b6bbc41d3b5690.tar.gz |
updated for version 7.0148
Diffstat (limited to 'runtime/plugin')
-rw-r--r-- | runtime/plugin/zipPlugin.vim | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/runtime/plugin/zipPlugin.vim b/runtime/plugin/zipPlugin.vim new file mode 100644 index 000000000..608edb554 --- /dev/null +++ b/runtime/plugin/zipPlugin.vim @@ -0,0 +1,44 @@ +" zipPlugin.vim: Handles browsing zipfiles +" PLUGIN PORTION +" Date: Sep 14, 2005 +" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz> +" License: Vim License (see vim's :help license) +" Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1 +" Permission is hereby granted to use and distribute this code, +" with or without modifications, provided that this copyright +" notice is copied with it. Like anything else that's free, +" zipPlugin.vim is provided *as is* and comes with no warranty +" of any kind, either expressed or implied. By using this +" plugin, you agree that in no event will the copyright +" holder be liable for any damages resulting from the use +" of this software. + +" --------------------------------------------------------------------- +" Initialization: {{{1 +let s:keepcpo= &cpo +set cpo&vim + +" --------------------------------------------------------------------- +" Public Interface: {{{1 +augroup zip + au! + au BufReadCmd zipfile:* call zip#Read(expand("<afile>"), 1) + au FileReadCmd zipfile:* call zip#Read(expand("<afile>"), 0) + au BufWriteCmd zipfile:* call zip#Write(expand("<afile>")) + au FileWriteCmd zipfile:* call zip#Write(expand("<afile>")) + + if has("unix") + au BufReadCmd zipfile:*/* call zip#Read(expand("<afile>"), 1) + au FileReadCmd zipfile:*/* call zip#Read(expand("<afile>"), 0) + au BufWriteCmd zipfile:*/* call zip#Write(expand("<afile>")) + au FileWriteCmd zipfile:*/* call zip#Write(expand("<afile>")) + endif + + au BufReadCmd *.zip call zip#Browse(expand("<afile>")) +augroup END + +" ------------------------------------------------------------------------ +" Modelines And Restoration: {{{1 +let &cpo= s:keepcpo +unlet s:keepcpo +" vim:ts=8 fdm=marker |