Mercurial > vim
comparison runtime/autoload/vimball.vim @ 843:9f279ebda751 v7.0f01
updated for version 7.0f01
author | vimboss |
---|---|
date | Tue, 25 Apr 2006 22:13:59 +0000 |
parents | a209672376fd |
children | d3bbb5dd3913 |
comparison
equal
deleted
inserted
replaced
842:a209672376fd | 843:9f279ebda751 |
---|---|
1 " vimball : construct a file containing both paths and files | 1 " vimball : construct a file containing both paths and files |
2 " Author: Charles E. Campbell, Jr. | 2 " Author: Charles E. Campbell, Jr. |
3 " Date: Apr 24, 2006 | 3 " Date: Apr 25, 2006 |
4 " Version: 7 | 4 " Version: 8 |
5 " GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim | 5 " GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim |
6 " Copyright: (c) 2004-2006 by Charles E. Campbell, Jr. | 6 " Copyright: (c) 2004-2006 by Charles E. Campbell, Jr. |
7 " The VIM LICENSE applies to Vimball.vim, and Vimball.txt | 7 " The VIM LICENSE applies to Vimball.vim, and Vimball.txt |
8 " (see |copyright|) except use "Vimball" instead of "Vim". | 8 " (see |copyright|) except use "Vimball" instead of "Vim". |
9 " No warranty, express or implied. | 9 " No warranty, express or implied. |
13 " Load Once: {{{1 | 13 " Load Once: {{{1 |
14 if &cp || exists("g:loaded_vimball") | 14 if &cp || exists("g:loaded_vimball") |
15 finish | 15 finish |
16 endif | 16 endif |
17 let s:keepcpo = &cpo | 17 let s:keepcpo = &cpo |
18 let g:loaded_vimball = "v7" | 18 let g:loaded_vimball = "v8" |
19 set cpo&vim | 19 set cpo&vim |
20 | 20 |
21 " ===================================================================== | 21 " ===================================================================== |
22 " Functions: {{{1 | 22 " Functions: {{{1 |
23 | 23 |
253 exe "cd ".curdir | 253 exe "cd ".curdir |
254 | 254 |
255 " call Dret("Vimball") | 255 " call Dret("Vimball") |
256 endfun | 256 endfun |
257 | 257 |
258 " --------------------------------------------------------------------- | |
259 " vimball#Decompress: attempts to automatically decompress vimballs {{{2 | |
260 fun! vimball#Decompress(fname) | |
261 " call Dfunc("Decompress(fname<".a:fname.">)") | |
262 | |
263 " decompression: | |
264 if expand("%") =~ '.*\.gz' && executable("gunzip") | |
265 exe "!gunzip ".a:fname | |
266 let fname= substitute(a:fname,'\.gz$','','') | |
267 exe "e ".fname | |
268 echohl WarningMsg | echo "Source this file to extract it! (:so ".fname.")" | echohl None | |
269 elseif expand("%") =~ '.*\.bz2' && executable("bunzip2") | |
270 exe "!bunzip2 ".a:fname | |
271 let fname= substitute(a:fname,'\.bz2$','','') | |
272 exe "e ".fname | |
273 echohl WarningMsg | echo "Source this file to extract it! (:so ".fname.")" | echohl None | |
274 elseif expand("%") =~ '.*\.zip' && executable("unzip") | |
275 exe "!unzip ".a:fname | |
276 let fname= substitute(a:fname,'\.zip$','','') | |
277 exe "e ".fname | |
278 echohl WarningMsg | echo "Source this file to extract it! (:so ".fname.")" | echohl None | |
279 endif | |
280 | |
281 " call Dret("Decompress") | |
282 endfun | |
283 | |
258 let &cpo= s:keepcpo | 284 let &cpo= s:keepcpo |
259 unlet s:keepcpo | 285 unlet s:keepcpo |
260 " ===================================================================== | 286 " ===================================================================== |
261 " Modelines: {{{1 | 287 " Modelines: {{{1 |
262 " vim: fdm=marker | 288 " vim: fdm=marker |