| 
									
										
										
										
											2005-09-16 21:47:57 +00:00
										 |  |  | " zipPlugin.vim: Handles browsing zipfiles | 
					
						
							|  |  |  | "            PLUGIN PORTION | 
					
						
							| 
									
										
										
										
											2020-01-09 21:46:04 +01:00
										 |  |  | " Date:			Jan 07, 2020 | 
					
						
							|  |  |  | " Maintainer:	Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM> | 
					
						
							| 
									
										
										
										
											2005-09-16 21:47:57 +00:00
										 |  |  | " License:		Vim License  (see vim's :help license) | 
					
						
							| 
									
										
										
										
											2016-09-16 20:02:31 +02:00
										 |  |  | " Copyright:    Copyright (C) 2005-2016 Charles E. Campbell {{{1 | 
					
						
							| 
									
										
										
										
											2005-09-16 21:47:57 +00:00
										 |  |  | "               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. | 
					
						
							| 
									
										
										
										
											2007-05-05 17:54:07 +00:00
										 |  |  | " | 
					
						
							|  |  |  | " (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. | 
					
						
							| 
									
										
										
										
											2005-09-16 21:47:57 +00:00
										 |  |  | " --------------------------------------------------------------------- | 
					
						
							| 
									
										
										
										
											2007-05-05 17:54:07 +00:00
										 |  |  | " Load Once: {{{1 | 
					
						
							|  |  |  | if &cp || exists("g:loaded_zipPlugin") | 
					
						
							|  |  |  |  finish | 
					
						
							|  |  |  | endif | 
					
						
							| 
									
										
										
										
											2020-10-26 21:12:46 +01:00
										 |  |  | let g:loaded_zipPlugin = "v31" | 
					
						
							| 
									
										
										
										
											2007-05-05 17:54:07 +00:00
										 |  |  | let s:keepcpo          = &cpo | 
					
						
							| 
									
										
										
										
											2005-09-16 21:47:57 +00:00
										 |  |  | set cpo&vim | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-07-04 22:50:40 +02:00
										 |  |  | " --------------------------------------------------------------------- | 
					
						
							|  |  |  | " Options: {{{1 | 
					
						
							|  |  |  | if !exists("g:zipPlugin_ext") | 
					
						
							| 
									
										
										
										
											2020-10-26 21:12:46 +01:00
										 |  |  |  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' | 
					
						
							| 
									
										
										
										
											2013-07-04 22:50:40 +02:00
										 |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-09-16 21:47:57 +00:00
										 |  |  | " --------------------------------------------------------------------- | 
					
						
							|  |  |  | " Public Interface: {{{1 | 
					
						
							|  |  |  | augroup zip | 
					
						
							|  |  |  |  au! | 
					
						
							| 
									
										
										
										
											2005-11-23 21:25:05 +00:00
										 |  |  |  au BufReadCmd   zipfile:*	call zip#Read(expand("<amatch>"), 1) | 
					
						
							|  |  |  |  au FileReadCmd  zipfile:*	call zip#Read(expand("<amatch>"), 0) | 
					
						
							|  |  |  |  au BufWriteCmd  zipfile:*	call zip#Write(expand("<amatch>")) | 
					
						
							|  |  |  |  au FileWriteCmd zipfile:*	call zip#Write(expand("<amatch>")) | 
					
						
							| 
									
										
										
										
											2005-09-16 21:47:57 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |  if has("unix") | 
					
						
							| 
									
										
										
										
											2005-11-23 21:25:05 +00:00
										 |  |  |   au BufReadCmd   zipfile:*/*	call zip#Read(expand("<amatch>"), 1) | 
					
						
							|  |  |  |   au FileReadCmd  zipfile:*/*	call zip#Read(expand("<amatch>"), 0) | 
					
						
							|  |  |  |   au BufWriteCmd  zipfile:*/*	call zip#Write(expand("<amatch>")) | 
					
						
							|  |  |  |   au FileWriteCmd zipfile:*/*	call zip#Write(expand("<amatch>")) | 
					
						
							| 
									
										
										
										
											2005-09-16 21:47:57 +00:00
										 |  |  |  endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-07-04 22:50:40 +02:00
										 |  |  |  exe "au BufReadCmd ".g:zipPlugin_ext.' call zip#Browse(expand("<amatch>"))' | 
					
						
							| 
									
										
										
										
											2005-09-16 21:47:57 +00:00
										 |  |  | augroup END | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-05-05 17:54:07 +00:00
										 |  |  | " --------------------------------------------------------------------- | 
					
						
							|  |  |  | "  Restoration And Modelines: {{{1 | 
					
						
							|  |  |  | "  vim: fdm=marker | 
					
						
							| 
									
										
										
										
											2005-09-16 21:47:57 +00:00
										 |  |  | let &cpo= s:keepcpo | 
					
						
							|  |  |  | unlet s:keepcpo |