codekingpro/portable-devtools
115k
1" zipPlugin.vim: Handles browsing zipfiles2" PLUGIN PORTION3" Date: Dec 07, 20214" Maintainer: This runtime file is looking for a new maintainer.5" Former Maintainer: Charles E Campbell6" Last Change:7" 2025 Apr 02 by Vim Project: add *.whl to list of zip extensions (#17038)8" 2025 Oct 06 by MultisampledNight: add *.pkpass to list of zip extensions (#18501)9" License: Vim License (see vim's :help license)10" Copyright: Copyright (C) 2005-2016 Charles E. Campbell {{{111" Permission is hereby granted to use and distribute this code,12" with or without modifications, provided that this copyright13" notice is copied with it. Like anything else that's free,14" zipPlugin.vim is provided *as is* and comes with no warranty15" of any kind, either expressed or implied. By using this16" plugin, you agree that in no event will the copyright17" holder be liable for any damages resulting from the use18" of this software.19"20" (James 4:8 WEB) Draw near to God, and he will draw near to you.21" Cleanse your hands, you sinners; and purify your hearts, you double-minded.22" ---------------------------------------------------------------------23" Load Once: {{{124if &cp || exists("g:loaded_zipPlugin")25 finish26endif27let g:loaded_zipPlugin = "v33"28let s:keepcpo = &cpo29set cpo&vim30 31" ---------------------------------------------------------------------32" Options: {{{133if !exists("g:zipPlugin_ext")34 let g:zipPlugin_ext='*.aar,*.apk,*.celzip,*.crtx,*.docm,*.docx,*.dotm,*.dotx,*.ear,*.epub,*.gcsx,*.glox,*.gqsx,*.ja,*.jar,*.kmz,*.odb,*.odc,*.odf,*.odg,*.odi,*.odm,*.odp,*.ods,*.odt,*.otc,*.otf,*.otg,*.oth,*.oti,*.otp,*.ots,*.ott,*.oxt,*.pkpass,*.potm,*.potx,*.ppam,*.ppsm,*.ppsx,*.pptm,*.pptx,*.sldx,*.thmx,*.vdw,*.war,*.whl,*.wsz,*.xap,*.xlam,*.xlsb,*.xlsm,*.xlsx,*.xltm,*.xltx,*.xpi,*.zip'35endif36 37" ---------------------------------------------------------------------38" Public Interface: {{{139augroup zip40 au!41 au BufReadCmd zipfile:* call zip#Read(expand("<amatch>"), 1)42 au FileReadCmd zipfile:* call zip#Read(expand("<amatch>"), 0)43 au BufWriteCmd zipfile:* call zip#Write(expand("<amatch>"))44 au FileWriteCmd zipfile:* call zip#Write(expand("<amatch>"))45 46 if has("unix")47 au BufReadCmd zipfile:*/* call zip#Read(expand("<amatch>"), 1)48 au FileReadCmd zipfile:*/* call zip#Read(expand("<amatch>"), 0)49 au BufWriteCmd zipfile:*/* call zip#Write(expand("<amatch>"))50 au FileWriteCmd zipfile:*/* call zip#Write(expand("<amatch>"))51 endif52 53 exe "au BufReadCmd ".g:zipPlugin_ext.' call zip#Browse(expand("<amatch>"))'54augroup END55 56" ---------------------------------------------------------------------57" Restoration And Modelines: {{{158" vim: fdm=marker59let &cpo= s:keepcpo60unlet s:keepcpo61 