From 8baab3c8d7a6f22888bd581cd5c6098fd2e4b5a8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 May 2024 04:44:24 +0200 Subject: Adding upstream version 2:8.1.0875. Signed-off-by: Daniel Baumann --- runtime/plugin/zipPlugin.vim | 56 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 runtime/plugin/zipPlugin.vim (limited to 'runtime/plugin/zipPlugin.vim') diff --git a/runtime/plugin/zipPlugin.vim b/runtime/plugin/zipPlugin.vim new file mode 100644 index 0000000..c04d534 --- /dev/null +++ b/runtime/plugin/zipPlugin.vim @@ -0,0 +1,56 @@ +" zipPlugin.vim: Handles browsing zipfiles +" PLUGIN PORTION +" Date: Sep 13, 2016 +" Maintainer: Charles E Campbell +" License: Vim License (see vim's :help license) +" Copyright: Copyright (C) 2005-2016 Charles E. Campbell {{{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. +" +" (James 4:8 WEB) Draw near to God, and he will draw near to you. +" Cleanse your hands, you sinners; and purify your hearts, you double-minded. +" --------------------------------------------------------------------- +" Load Once: {{{1 +if &cp || exists("g:loaded_zipPlugin") + finish +endif +let g:loaded_zipPlugin = "v28" +let s:keepcpo = &cpo +set cpo&vim + +" --------------------------------------------------------------------- +" Options: {{{1 +if !exists("g:zipPlugin_ext") + let g:zipPlugin_ext='*.apk,*.celzip,*.crtx,*.docm,*.docx,*.dotm,*.dotx,*.ear,*.epub,*.gcsx,*.glox,*.gqsx,*.ja,*.jar,*.kmz,*.oxt,*.potm,*.potx,*.ppam,*.ppsm,*.ppsx,*.pptm,*.pptx,*.sldx,*.thmx,*.vdw,*.war,*.wsz,*.xap,*.xlam,*.xlam,*.xlsb,*.xlsm,*.xlsx,*.xltm,*.xltx,*.xpi,*.zip' +endif + +" --------------------------------------------------------------------- +" Public Interface: {{{1 +augroup zip + au! + au BufReadCmd zipfile:* call zip#Read(expand(""), 1) + au FileReadCmd zipfile:* call zip#Read(expand(""), 0) + au BufWriteCmd zipfile:* call zip#Write(expand("")) + au FileWriteCmd zipfile:* call zip#Write(expand("")) + + if has("unix") + au BufReadCmd zipfile:*/* call zip#Read(expand(""), 1) + au FileReadCmd zipfile:*/* call zip#Read(expand(""), 0) + au BufWriteCmd zipfile:*/* call zip#Write(expand("")) + au FileWriteCmd zipfile:*/* call zip#Write(expand("")) + endif + + exe "au BufReadCmd ".g:zipPlugin_ext.' call zip#Browse(expand(""))' +augroup END + +" --------------------------------------------------------------------- +" Restoration And Modelines: {{{1 +" vim: fdm=marker +let &cpo= s:keepcpo +unlet s:keepcpo -- cgit v1.2.3