Mercurial > vim
annotate runtime/plugin/tarPlugin.vim @ 34190:4f8b57f8b07a v9.1.0046
patch 9.1.0046: :drop does not re-use empty buffer
Commit: https://github.com/vim/vim/commit/f96dc8d07f752ddd96d1447d85278a85255a1462
Author: Rocco Mao <dapeng.mao@qq.com>
Date: Tue Jan 23 21:27:19 2024 +0100
patch 9.1.0046: :drop does not re-use empty buffer
Problem: :drop does not re-use empty buffer
(Rocco Mao)
Solution: Make :drop re-use an empty buffer
(Rocco Mao)
fixes: #13851
closes: #13881
Signed-off-by: Rocco Mao <dapeng.mao@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 23 Jan 2024 21:30:05 +0100 |
parents | e003aedbf9e1 |
children |
rev | line source |
---|---|
528 | 1 " tarPlugin.vim -- a Vim plugin for browsing tarfiles |
1126 | 2 " Original was copyright (c) 2002, Michael C. Toren <mct@toren.net> |
4339 | 3 " Modified by Charles E. Campbell |
528 | 4 " Distributed under the GNU General Public License. |
5 " | |
6 " Updates are available from <http://michael.toren.net/code/>. If you | |
7 " find this script useful, or have suggestions for improvements, please | |
8 " let me know. | |
9 " Also look there for further comments and documentation. | |
10 " | |
11 " This part only sets the autocommands. The functions are in autoload/tar.vim. | |
1126 | 12 " --------------------------------------------------------------------- |
13 " Load Once: {{{1 | |
14 if &cp || exists("g:loaded_tarPlugin") | |
15 finish | |
16 endif | |
19099 | 17 let g:loaded_tarPlugin = "v32" |
1126 | 18 let s:keepcpo = &cpo |
19 set cpo&vim | |
528 | 20 |
1126 | 21 " --------------------------------------------------------------------- |
22 " Public Interface: {{{1 | |
557 | 23 augroup tar |
24 au! | |
1624 | 25 au BufReadCmd tarfile::* call tar#Read(expand("<amatch>"), 1) |
26 au FileReadCmd tarfile::* call tar#Read(expand("<amatch>"), 0) | |
27 au BufWriteCmd tarfile::* call tar#Write(expand("<amatch>")) | |
28 au FileWriteCmd tarfile::* call tar#Write(expand("<amatch>")) | |
528 | 29 |
557 | 30 if has("unix") |
1624 | 31 au BufReadCmd tarfile::*/* call tar#Read(expand("<amatch>"), 1) |
32 au FileReadCmd tarfile::*/* call tar#Read(expand("<amatch>"), 0) | |
33 au BufWriteCmd tarfile::*/* call tar#Write(expand("<amatch>")) | |
34 au FileWriteCmd tarfile::*/* call tar#Write(expand("<amatch>")) | |
557 | 35 endif |
528 | 36 |
2034 | 37 au BufReadCmd *.tar.gz call tar#Browse(expand("<amatch>")) |
38 au BufReadCmd *.tar call tar#Browse(expand("<amatch>")) | |
39 au BufReadCmd *.lrp call tar#Browse(expand("<amatch>")) | |
40 au BufReadCmd *.tar.bz2 call tar#Browse(expand("<amatch>")) | |
41 au BufReadCmd *.tar.Z call tar#Browse(expand("<amatch>")) | |
19099 | 42 au BufReadCmd *.tbz call tar#Browse(expand("<amatch>")) |
2034 | 43 au BufReadCmd *.tgz call tar#Browse(expand("<amatch>")) |
44 au BufReadCmd *.tar.lzma call tar#Browse(expand("<amatch>")) | |
2426 | 45 au BufReadCmd *.tar.xz call tar#Browse(expand("<amatch>")) |
46 au BufReadCmd *.txz call tar#Browse(expand("<amatch>")) | |
23047 | 47 au BufReadCmd *.tar.zst call tar#Browse(expand("<amatch>")) |
34102
e003aedbf9e1
runtime(tar): fix a few problems with the tar plugin
Christian Brabandt <cb@256bit.org>
parents:
23047
diff
changeset
|
48 au BufReadCmd *.tzst call tar#Browse(expand("<amatch>")) |
557 | 49 augroup END |
2034 | 50 com! -nargs=? -complete=file Vimuntar call tar#Vimuntar(<q-args>) |
528 | 51 |
1126 | 52 " --------------------------------------------------------------------- |
53 " Restoration And Modelines: {{{1 | |
54 " vim: fdm=marker | |
55 let &cpo= s:keepcpo | |
56 unlet s:keepcpo |