16b730e11SBram Moolenaar" zipPlugin.vim: Handles browsing zipfiles 26b730e11SBram Moolenaar" PLUGIN PORTION 32963456fSBram Moolenaar" Date: Jan 07, 2020 42963456fSBram Moolenaar" Maintainer: Charles E Campbell <[email protected]> 56b730e11SBram Moolenaar" License: Vim License (see vim's :help license) 6d0796909SBram Moolenaar" Copyright: Copyright (C) 2005-2016 Charles E. Campbell {{{1 76b730e11SBram Moolenaar" Permission is hereby granted to use and distribute this code, 86b730e11SBram Moolenaar" with or without modifications, provided that this copyright 96b730e11SBram Moolenaar" notice is copied with it. Like anything else that's free, 106b730e11SBram Moolenaar" zipPlugin.vim is provided *as is* and comes with no warranty 116b730e11SBram Moolenaar" of any kind, either expressed or implied. By using this 126b730e11SBram Moolenaar" plugin, you agree that in no event will the copyright 136b730e11SBram Moolenaar" holder be liable for any damages resulting from the use 146b730e11SBram Moolenaar" of this software. 159964e468SBram Moolenaar" 169964e468SBram Moolenaar" (James 4:8 WEB) Draw near to God, and he will draw near to you. 179964e468SBram Moolenaar" Cleanse your hands, you sinners; and purify your hearts, you double-minded. 186b730e11SBram Moolenaar" --------------------------------------------------------------------- 199964e468SBram Moolenaar" Load Once: {{{1 209964e468SBram Moolenaarif &cp || exists("g:loaded_zipPlugin") 219964e468SBram Moolenaar finish 229964e468SBram Moolenaarendif 23*cb80aa2dSBram Moolenaarlet g:loaded_zipPlugin = "v31" 246b730e11SBram Moolenaarlet s:keepcpo = &cpo 256b730e11SBram Moolenaarset cpo&vim 266b730e11SBram Moolenaar 276b730e11SBram Moolenaar" --------------------------------------------------------------------- 2894f76b7fSBram Moolenaar" Options: {{{1 2994f76b7fSBram Moolenaarif !exists("g:zipPlugin_ext") 30*cb80aa2dSBram Moolenaar 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,*.potm,*.potx,*.ppam,*.ppsm,*.ppsx,*.pptm,*.pptx,*.sldx,*.thmx,*.vdw,*.war,*.wsz,*.xap,*.xlam,*.xlam,*.xlsb,*.xlsm,*.xlsx,*.xltm,*.xltx,*.xpi,*.zip' 3194f76b7fSBram Moolenaarendif 3294f76b7fSBram Moolenaar 3394f76b7fSBram Moolenaar" --------------------------------------------------------------------- 346b730e11SBram Moolenaar" Public Interface: {{{1 356b730e11SBram Moolenaaraugroup zip 366b730e11SBram Moolenaar au! 37a5792f58SBram Moolenaar au BufReadCmd zipfile:* call zip#Read(expand("<amatch>"), 1) 38a5792f58SBram Moolenaar au FileReadCmd zipfile:* call zip#Read(expand("<amatch>"), 0) 39a5792f58SBram Moolenaar au BufWriteCmd zipfile:* call zip#Write(expand("<amatch>")) 40a5792f58SBram Moolenaar au FileWriteCmd zipfile:* call zip#Write(expand("<amatch>")) 416b730e11SBram Moolenaar 426b730e11SBram Moolenaar if has("unix") 43a5792f58SBram Moolenaar au BufReadCmd zipfile:*/* call zip#Read(expand("<amatch>"), 1) 44a5792f58SBram Moolenaar au FileReadCmd zipfile:*/* call zip#Read(expand("<amatch>"), 0) 45a5792f58SBram Moolenaar au BufWriteCmd zipfile:*/* call zip#Write(expand("<amatch>")) 46a5792f58SBram Moolenaar au FileWriteCmd zipfile:*/* call zip#Write(expand("<amatch>")) 476b730e11SBram Moolenaar endif 486b730e11SBram Moolenaar 4994f76b7fSBram Moolenaar exe "au BufReadCmd ".g:zipPlugin_ext.' call zip#Browse(expand("<amatch>"))' 506b730e11SBram Moolenaaraugroup END 516b730e11SBram Moolenaar 529964e468SBram Moolenaar" --------------------------------------------------------------------- 539964e468SBram Moolenaar" Restoration And Modelines: {{{1 549964e468SBram Moolenaar" vim: fdm=marker 556b730e11SBram Moolenaarlet &cpo= s:keepcpo 566b730e11SBram Moolenaarunlet s:keepcpo 57