Skip to content

Commit 56957ed

Browse files
JimZhouZZYchrisbra
authored andcommitted
runtime(misc): add support for bzip3 to tar, vimball and gzip plugins
fixes: #16751 closes: #16755 Signed-off-by: Jim Zhou <[email protected]> Signed-off-by: Christian Brabandt <[email protected]>
1 parent a2c5559 commit 56957ed

7 files changed

Lines changed: 89 additions & 44 deletions

File tree

runtime/autoload/getscript.vim

Lines changed: 12 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
" autoloading search path fix
1313
" substitution of hardcoded commands with global variables
1414
" 2024 Nov 12 by Vim Project: fix problems on Windows (#16036)
15+
" 2025 Feb 28 by Vim Project: add support for bzip3 (#16755)
1516
" }}}
1617
"
1718
" GetLatestVimScripts: 642 1 :AutoInstall: getscript.vim
@@ -100,6 +101,10 @@ if !exists("g:GetLatestVimScripts_bunzip2")
100101
let g:GetLatestVimScripts_bunzip2= "bunzip2"
101102
endif
102103

104+
if !exists("g:GetLatestVimScripts_bunzip3")
105+
let g:GetLatestVimScripts_bunzip3= "bunzip3"
106+
endif
107+
103108
if !exists("g:GetLatestVimScripts_gunzip")
104109
let g:GetLatestVimScripts_gunzip= "gunzip"
105110
endif
@@ -565,73 +570,55 @@ fun! s:GetOneScript(...)
565570
" --------------------------------------------------------------------------
566571
" call Decho("checking if plugin requested autoinstall: doautoinstall=".doautoinstall)
567572
if doautoinstall
568-
" call Decho(" ")
569-
" call Decho("Autoinstall: getcwd<".getcwd()."> filereadable(".sname.")=".filereadable(sname))
570573
if filereadable(sname)
571-
" call Decho("<".sname."> is readable")
572-
" call Decho("exe silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall))
573574
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall)
574575
let curdir = fnameescape(substitute(getcwd(),'\','/','ge'))
575576
let installdir= curdir."/Installed"
576577
if !isdirectory(installdir)
577578
call mkdir(installdir)
578579
endif
579-
" call Decho("curdir<".curdir."> installdir<".installdir.">")
580-
" call Decho("exe cd ".fnameescape(s:autoinstall))
581580
exe "cd ".fnameescape(s:autoinstall)
582581

583582
" determine target directory for moves
584583
let firstdir= substitute(&rtp,',.*$','','')
585584
let pname = substitute(sname,'\..*','.vim','')
586-
" call Decho("determine tgtdir: is <".firstdir.'/AsNeeded/'.pname." readable?")
587585
if filereadable(firstdir.'/AsNeeded/'.pname)
588586
let tgtdir= "AsNeeded"
589587
else
590588
let tgtdir= "plugin"
591589
endif
592-
" call Decho("tgtdir<".tgtdir."> pname<".pname.">")
593-
590+
594591
" decompress
595592
if sname =~ '\.bz2$'
596-
" call Decho("decompress: attempt to bunzip2 ".sname)
597593
exe "sil !".g:GetLatestVimScripts_bunzip2." ".shellescape(sname)
598594
let sname= substitute(sname,'\.bz2$','','')
599-
" call Decho("decompress: new sname<".sname."> after bunzip2")
595+
elseif sname =~ '\.bz3$'
596+
exe "sil !".g:GetLatestVimScripts_bunzip3." ".shellescape(sname)
597+
let sname= substitute(sname,'\.bz3$','','')
600598
elseif sname =~ '\.gz$'
601-
" call Decho("decompress: attempt to gunzip ".sname)
602599
exe "sil !".g:GetLatestVimScripts_gunzip." ".shellescape(sname)
603600
let sname= substitute(sname,'\.gz$','','')
604-
" call Decho("decompress: new sname<".sname."> after gunzip")
605601
elseif sname =~ '\.xz$'
606-
" call Decho("decompress: attempt to unxz ".sname)
607602
exe "sil !".g:GetLatestVimScripts_unxz." ".shellescape(sname)
608603
let sname= substitute(sname,'\.xz$','','')
609-
" call Decho("decompress: new sname<".sname."> after unxz")
610604
else
611605
" call Decho("no decompression needed")
612606
endif
613-
607+
614608
" distribute archive(.zip, .tar, .vba, .vmb, ...) contents
615609
if sname =~ '\.zip$'
616-
" call Decho("dearchive: attempt to unzip ".sname)
617610
exe "silent !".g:GetLatestVimScripts_unzip." -o ".shellescape(sname)
618611
elseif sname =~ '\.tar$'
619-
" call Decho("dearchive: attempt to untar ".sname)
620612
exe "silent !tar -xvf ".shellescape(sname)
621613
elseif sname =~ '\.tgz$'
622-
" call Decho("dearchive: attempt to untar+gunzip ".sname)
623614
exe "silent !tar -zxvf ".shellescape(sname)
624615
elseif sname =~ '\.taz$'
625-
" call Decho("dearchive: attempt to untar+uncompress ".sname)
626616
exe "silent !tar -Zxvf ".shellescape(sname)
627617
elseif sname =~ '\.tbz$'
628-
" call Decho("dearchive: attempt to untar+bunzip2 ".sname)
629618
exe "silent !tar -jxvf ".shellescape(sname)
630619
elseif sname =~ '\.txz$'
631-
" call Decho("dearchive: attempt to untar+xz ".sname)
632620
exe "silent !tar -Jxvf ".shellescape(sname)
633621
elseif sname =~ '\.vba$\|\.vmb$'
634-
" call Decho("dearchive: attempt to handle a vimball: ".sname)
635622
silent 1split
636623
if exists("g:vimball_home")
637624
let oldvimballhome= g:vimball_home
@@ -648,25 +635,21 @@ fun! s:GetOneScript(...)
648635
else
649636
" call Decho("no dearchiving needed")
650637
endif
651-
638+
652639
" ---------------------------------------------
653640
" move plugin to plugin/ or AsNeeded/ directory
654641
" ---------------------------------------------
655642
if sname =~ '.vim$'
656-
" call Decho("dearchive: attempt to simply move ".sname." to ".tgtdir)
657643
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".tgtdir
658644
else
659-
" call Decho("dearchive: move <".sname."> to installdir<".installdir.">")
660645
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".installdir
661646
endif
662647
if tgtdir != "plugin"
663-
" call Decho("exe silent !".g:GetLatestVimScripts_mv." ".shellescape("plugin/".pname)." ".tgtdir)
664648
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape("plugin/".pname)." ".tgtdir
665649
endif
666-
650+
667651
" helptags step
668652
let docdir= substitute(&rtp,',.*','','e')."/doc"
669-
" call Decho("helptags: docdir<".docdir.">")
670653
exe "helptags ".fnameescape(docdir)
671654
exe "cd ".fnameescape(curdir)
672655
endif
@@ -681,13 +664,8 @@ fun! s:GetOneScript(...)
681664

682665
" update the data in the <GetLatestVimScripts.dat> file
683666
call setline(line("."),modline)
684-
" call Decho("update data in ".expand("%")."#".line(".").": modline<".modline.">")
685-
" else " Decho
686-
" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."], no need to update")
687667
endif
688668

689-
" call Dredir("BUFFER TEST (GetOneScript)","ls!")
690-
" call Dret("GetOneScript")
691669
endfun
692670

693671
" ---------------------------------------------------------------------

runtime/autoload/tar.vim

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
" tar.vim: Handles browsing tarfiles - AUTOLOAD PORTION
2-
" Date: Feb 06, 2025
2+
" Date: Feb 28, 2025
33
" Version: 32b (with modifications from the Vim Project)
44
" Maintainer: This runtime file is looking for a new maintainer.
55
" Former Maintainer: Charles E Campbell
66
" License: Vim License (see vim's :help license)
7+
" Last Change:
8+
" 2024 Jan 08 by Vim Project: fix a few problems (#138331, #12637, #8109)
9+
" 2024 Feb 19 by Vim Project: announce adoption
10+
" 2024 Nov 11 by Vim Project: support permissions (#7379)
11+
" 2025 Feb 06 by Vim Project: add support for lz4 (#16591)
12+
" 2025 Feb 28 by Vim Project: add support for bzip3 (#16755)
713
"
814
" Contains many ideas from Michael Toren's <tar.vim>
915
"
@@ -161,6 +167,8 @@ fun! tar#Browse(tarfile)
161167

162168
if filekind =~ "bzip2"
163169
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
170+
elseif filekind =~ "bzip3"
171+
exe "sil! r! bzip3 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
164172
elseif filekind =~ "XZ"
165173
exe "sil! r! xz -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
166174
elseif filekind =~ "Zstandard"
@@ -175,6 +183,8 @@ fun! tar#Browse(tarfile)
175183
exe "sil! r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - "
176184
elseif tarfile =~# '\.\(bz2\|tbz\|tb2\)$'
177185
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
186+
elseif tarfile =~# '\.\(bz3\|tb3\)$'
187+
exe "sil! r! bzip3 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
178188
elseif tarfile =~# '\.\(lzma\|tlz\)$'
179189
exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
180190
elseif tarfile =~# '\.\(xz\|txz\)$'
@@ -316,6 +326,9 @@ fun! tar#Read(fname,mode)
316326
if fname =~ '\.bz2$' && executable("bzcat")
317327
let decmp= "|bzcat"
318328
let doro = 1
329+
elseif fname =~ '\.bz3$' && executable("bz3cat")
330+
let decmp= "|bz3cat"
331+
let doro = 1
319332
elseif fname =~ '\.t\=gz$' && executable("zcat")
320333
let decmp= "|zcat"
321334
let doro = 1
@@ -334,7 +347,7 @@ fun! tar#Read(fname,mode)
334347
else
335348
let decmp=""
336349
let doro = 0
337-
if fname =~ '\.bz2$\|\.gz$\|\.lzma$\|\.xz$\|\.zip$\|\.Z$'
350+
if fname =~ '\.bz2$\|\.bz3$\|\.gz$\|\.lzma$\|\.xz$\|\.zip$\|\.Z$'
338351
setlocal bin
339352
endif
340353
endif
@@ -348,6 +361,9 @@ fun! tar#Read(fname,mode)
348361
if tarfile =~# '\.bz2$'
349362
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
350363
exe "read ".fname
364+
if tarfile =~# '\.bz3$'
365+
exe "sil! r! bzip3 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
366+
exe "read ".fname
351367
elseif tarfile =~# '\.\(gz\)$'
352368
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
353369
exe "read ".fname
@@ -360,6 +376,9 @@ fun! tar#Read(fname,mode)
360376
if filekind =~ "bzip2"
361377
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
362378
exe "read ".fname
379+
elseif filekind =~ "bzip3"
380+
exe "sil! r! bzip3 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
381+
exe "read ".fname
363382
elseif filekind =~ "XZ"
364383
exe "sil! r! xz -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
365384
exe "read ".fname
@@ -446,6 +465,10 @@ fun! tar#Write(fname)
446465
call system("bzip2 -d -- ".shellescape(tarfile,0))
447466
let tarfile = substitute(tarfile,'\.bz2','','e')
448467
let compress= "bzip2 -- ".shellescape(tarfile,0)
468+
elseif tarfile =~# '\.bz3'
469+
call system("bzip3 -d -- ".shellescape(tarfile,0))
470+
let tarfile = substitute(tarfile,'\.bz3','','e')
471+
let compress= "bzip3 -- ".shellescape(tarfile,0)
449472
elseif tarfile =~# '\.gz'
450473
call system("gzip -d -- ".shellescape(tarfile,0))
451474
let tarfile = substitute(tarfile,'\.gz','','e')
@@ -638,6 +661,15 @@ fun! tar#Extract()
638661
echo "***note*** successfully extracted ".fname
639662
endif
640663

664+
elseif filereadable(tarbase.".tar.bz3")
665+
let extractcmd= substitute(extractcmd,"-","-j","")
666+
call system(extractcmd." ".shellescape(tarbase).".tar.bz3 ".shellescape(fname))
667+
if v:shell_error != 0
668+
echohl Error | echo "***error*** ".extractcmd."j ".tarbase.".tar.bz3 ".fname.": failed!" | echohl NONE
669+
else
670+
echo "***note*** successfully extracted ".fname
671+
endif
672+
641673
elseif filereadable(tarbase.".txz")
642674
let extractcmd= substitute(extractcmd,"-","-J","")
643675
call system(extractcmd." ".shellescape(tarbase).".txz ".shellescape(fname))

runtime/autoload/vimball.vim

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
" Maintainer: This runtime file is looking for a new maintainer.
33
" Original Author: Charles E. Campbell
44
" Date: Apr 11, 2016
5-
" Version: 37
5+
" Version: 37 (with modifications from the Vim Project)
66
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
7+
" Last Change:
8+
" 2025 Feb 28 by Vim Project: add support for bzip3 (#16755)
79
" Copyright: (c) 2004-2011 by Charles E. Campbell
810
" The VIM LICENSE applies to Vimball.vim, and Vimball.txt
911
" (see |copyright|) except use "Vimball" instead of "Vim".
@@ -530,6 +532,26 @@ fun! vimball#Decompress(fname,...)
530532
exe "e ".escape(fname,' \')
531533
if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif
532534

535+
elseif expand("%") =~ '.*\.bz3' && executable("bunzip3")
536+
" handle *.bz3 with bunzip3
537+
silent exe "!bunzip3 ".shellescape(a:fname)
538+
if v:shell_error != 0
539+
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) bunzip3 may have failed with <".a:fname.">")
540+
endif
541+
let fname= substitute(a:fname,'\.bz3$','','')
542+
exe "e ".escape(fname,' \')
543+
if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif
544+
545+
elseif expand("%") =~ '.*\.bz3' && executable("bzip3")
546+
" handle *.bz3 with bzip3 -d
547+
silent exe "!bzip3 -d ".shellescape(a:fname)
548+
if v:shell_error != 0
549+
call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "bzip3 -d" may have failed with <'.a:fname.">")
550+
endif
551+
let fname= substitute(a:fname,'\.bz3$','','')
552+
exe "e ".escape(fname,' \')
553+
if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif
554+
533555
elseif expand("%") =~ '.*\.zip' && executable("unzip")
534556
" handle *.zip with unzip
535557
silent exe "!unzip ".shellescape(a:fname)

runtime/doc/pi_getscript.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*pi_getscript.txt* For Vim version 9.1. Last change: 2024 Oct 05
1+
*pi_getscript.txt* For Vim version 9.1. Last change: 2025 Feb 28
22
>
33
GETSCRIPT REFERENCE MANUAL by Charles E. Campbell
44
<
@@ -361,6 +361,11 @@ after/syntax/c.vim contained in it to overwrite a user's c.vim.
361361
< default= bunzip2
362362
This variable holds the name of the command to decompress .bz2
363363
files
364+
>
365+
g:GetLatestVimScripts_bunzip3
366+
< default= bunzip3
367+
This variable holds the name of the command to decompress .bz3
368+
files
364369
>
365370
g:GetLatestVimScripts_gunzip
366371
< default= gunzip
@@ -409,6 +414,8 @@ The AutoInstall process will:
409414
Windows: $HOME\vimfiles
410415
if the downloaded file ends with ".bz2"
411416
bunzip2 it
417+
else if the downloaded file ends with ".bz3"
418+
bunzip3 it
412419
else if the downloaded file ends with ".gz"
413420
gunzip it
414421
if the resulting file ends with ".zip"
@@ -422,6 +429,7 @@ The AutoInstall process will:
422429
==============================================================================
423430
9. GetLatestVimScripts History *getscript-history* *glvs-hist* {{{1
424431

432+
v38 Feb 25, 2025 : * handles additional decompression option for .bzip3 files.
425433
v37 Sep 23, 2024 : * Support for the new vimball's .vmb extension (old .vba
426434
extension conflicted with visual basic).
427435
* Support for |glvs-autoinstall| in ftplugins and packages.

runtime/plugin/gzip.vim

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
" Vim plugin for editing compressed files.
22
" Maintainer: The Vim Project <https://github.com/vim/vim>
3-
" Last Change: 2025 Feb 06
3+
" Last Change: 2025 Feb 28
44
" Former Maintainer: Bram Moolenaar <[email protected]>
55

66
" Exit quickly when:
@@ -20,11 +20,12 @@ augroup gzip
2020
" The functions are defined in autoload/gzip.vim.
2121
"
2222
" Set binary mode before reading the file.
23-
autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma,*.xz,*.lz,*.zst,*.br,*.lzo,*.lz4 setlocal bin
23+
autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.bz3,*.Z,*.lzma,*.xz,*.lz,*.zst,*.br,*.lzo,*.lz4 setlocal bin
2424

2525
" Use "gzip -d" and similar commands, gunzip isn't always available.
2626
autocmd BufReadPost,FileReadPost *.br call gzip#read("brotli -d --rm")
2727
autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d")
28+
autocmd BufReadPost,FileReadPost *.bz3 call gzip#read("bzip3 -d")
2829
autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn")
2930
autocmd BufReadPost,FileReadPost *.lz call gzip#read("lzip -d")
3031
autocmd BufReadPost,FileReadPost *.lz4 call gzip#read("lz4 -d -q --rm")
@@ -36,6 +37,7 @@ augroup gzip
3637

3738
autocmd BufWritePost,FileWritePost *.br call gzip#write("brotli --rm")
3839
autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2")
40+
autocmd BufWritePost,FileWritePost *.bz3 call gzip#write("bzip3")
3941
autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip")
4042
autocmd BufWritePost,FileWritePost *.lz call gzip#write("lzip")
4143
autocmd BufWritePost,FileWritePost *.lz4 call gzip#write("lz4 -q --rm")
@@ -47,6 +49,7 @@ augroup gzip
4749

4850
autocmd FileAppendPre *.br call gzip#appre("brotli -d --rm")
4951
autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d")
52+
autocmd FileAppendPre *.bz3 call gzip#appre("bzip3 -d")
5053
autocmd FileAppendPre *.gz call gzip#appre("gzip -dn")
5154
autocmd FileAppendPre *.lz call gzip#appre("lzip -d")
5255
autocmd FileAppendPre *.lz4 call gzip#appre("lz4 -d -q --rm")
@@ -58,6 +61,7 @@ augroup gzip
5861

5962
autocmd FileAppendPost *.br call gzip#write("brotli --rm")
6063
autocmd FileAppendPost *.bz2 call gzip#write("bzip2")
64+
autocmd FileAppendPost *.bz3 call gzip#write("bzip3")
6165
autocmd FileAppendPost *.gz call gzip#write("gzip")
6266
autocmd FileAppendPost *.lz call gzip#write("lzip")
6367
autocmd FileAppendPost *.lz4 call gzip#write("lz4 --rm")

runtime/plugin/tarPlugin.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ augroup tar
3838
au BufReadCmd *.lrp call tar#Browse(expand("<amatch>"))
3939
au BufReadCmd *.tar call tar#Browse(expand("<amatch>"))
4040
au BufReadCmd *.tar.bz2 call tar#Browse(expand("<amatch>"))
41+
au BufReadCmd *.tar.bz3 call tar#Browse(expand("<amatch>"))
4142
au BufReadCmd *.tar.gz call tar#Browse(expand("<amatch>"))
4243
au BufReadCmd *.tar.lz4 call tar#Browse(expand("<amatch>"))
4344
au BufReadCmd *.tar.lzma call tar#Browse(expand("<amatch>"))

runtime/plugin/vimballPlugin.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ com! -nargs=0 VimballList call vimball#Vimball(0)
2929
com! -nargs=* -complete=dir RmVimball call vimball#SaveSettings()|call vimball#RmVimball(<f-args>)|call vimball#RestoreSettings()
3030
augroup Vimball
3131
au!
32-
au BufEnter *.vba,*.vba.gz,*.vba.bz2,*.vba.zip,*.vba.xz
32+
au BufEnter *.vba,*.vba.gz,*.vba.bz2,*.vba.bz3,*.vba.zip,*.vba.xz
3333
\ if getline(1) =~ '^" Vimball Archiver' |
3434
\ setlocal bt=nofile fmr=[[[,]]] fdm=marker|if &ff != 'unix'|setlocal ma ff=unix noma|endif|if line('$') > 1|call vimball#ShowMesg(0, "Source this file to extract it! (:so %)")|endif |
3535
\ endif
36-
au SourceCmd *.vba.gz,*.vba.bz2,*.vba.zip,*.vba.xz let s:origfile=expand("%")|if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|endif|call vimball#Decompress(expand("<amatch>"))|so %|if s:origfile!=expand("<afile>")|close|endif
36+
au SourceCmd *.vba.gz,*.vba.bz2,*.vba.bz3,*.vba.zip,*.vba.xz let s:origfile=expand("%")|if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|endif|call vimball#Decompress(expand("<amatch>"))|so %|if s:origfile!=expand("<afile>")|close|endif
3737
au SourceCmd *.vba if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|call vimball#Vimball(1)|close|else|call vimball#Vimball(1)|endif
38-
au BufEnter *.vmb,*.vmb.gz,*.vmb.bz2,*.vmb.zip,*.vmb.xz
38+
au BufEnter *.vmb,*.vmb.gz,*.vmb.bz2,*.vmb.bz3,*.vmb.zip,*.vmb.xz
3939
\ if getline(1) =~ '^" Vimball Archiver' |
4040
\ setlocal bt=nofile fmr=[[[,]]] fdm=marker|if &ff != 'unix'|setlocal ma ff=unix noma|endif|if line('$') > 1|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)")|endif |
4141
\ endif
42-
au SourceCmd *.vmb.gz,*.vmb.bz2,*.vmb.zip,*.vmb.xz let s:origfile=expand("%")|if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|endif|call vimball#Decompress(expand("<amatch>"))|so %|if s:origfile!=expand("<afile>")|close|endif
42+
au SourceCmd *.vmb.gz,*.vmb.bz2,*.vmb.bz3,*.vmb.zip,*.vmb.xz let s:origfile=expand("%")|if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|endif|call vimball#Decompress(expand("<amatch>"))|so %|if s:origfile!=expand("<afile>")|close|endif
4343
au SourceCmd *.vmb if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|call vimball#Vimball(1)|close|else|call vimball#Vimball(1)|endif
4444
augroup END
4545

0 commit comments

Comments
 (0)