robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
e29af9c32f
master
1" zipPlugin.vim: Handles browsing zipfiles 2" PLUGIN PORTION 3" Date: Dec 07, 2021 4" Maintainer: This runtime file is looking for a new maintainer. 5" Former Maintainer: Charles E Campbell 6" 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" 2026 May 16 by Vim Project: add .cbz extension (#20206) 10" License: Vim License (see vim's :help license) 11" Copyright: Copyright (C) 2005-2016 Charles E. Campbell {{{1 12" Permission is hereby granted to use and distribute this code, 13" with or without modifications, provided that this copyright 14" notice is copied with it. Like anything else that's free, 15" zipPlugin.vim is provided *as is* and comes with no warranty 16" of any kind, either expressed or implied. By using this 17" plugin, you agree that in no event will the copyright 18" holder be liable for any damages resulting from the use 19" of this software. 20" 21" (James 4:8 WEB) Draw near to God, and he will draw near to you. 22" Cleanse your hands, you sinners; and purify your hearts, you double-minded. 23" --------------------------------------------------------------------- 24" Load Once: {{{1 25if & cp || exists ( "g:loaded_zipPlugin" ) 26finish 27endif 28let g: loaded_zipPlugin = "v33" 29let s: keepcpo = & cpo 30set cpo & vim 31 32" --------------------------------------------------------------------- 33" Options: {{{1 34if ! exists ( "g:zipPlugin_ext" ) 35let g: zipPlugin_ext = '*.aar,*.apk,*.cbz,*.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' 36endif 37 38" --------------------------------------------------------------------- 39" Public Interface: {{{1 40augroup zip 41au ! 42au BufReadCmd zipfile: * call zip#Read ( expand ( "<amatch>" ), 1 ) 43au FileReadCmd zipfile: * call zip#Read ( expand ( "<amatch>" ), 0 ) 44au BufWriteCmd zipfile: * call zip#Write ( expand ( "<amatch>" )) 45au FileWriteCmd zipfile: * call zip#Write ( expand ( "<amatch>" )) 46 47if has ( "unix" ) 48au BufReadCmd zipfile: * / * call zip#Read ( expand ( "<amatch>" ), 1 ) 49au FileReadCmd zipfile: * / * call zip#Read ( expand ( "<amatch>" ), 0 ) 50au BufWriteCmd zipfile: * / * call zip#Write ( expand ( "<amatch>" )) 51au FileWriteCmd zipfile: * / * call zip#Write ( expand ( "<amatch>" )) 52endif 53 54exe "au BufReadCmd " . g: zipPlugin_ext . ' call zip#Browse(expand("<amatch>"))' 55augroup END 56 57" --------------------------------------------------------------------- 58" Restoration And Modelines: {{{1 59" vim: fdm=marker 60let & cpo = s: keepcpo 61unlet s: keepcpo