0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00
vim/runtime/plugin/tar.vim

35 lines
1.4 KiB
VimL
Raw Normal View History

2005-07-27 21:13:01 +00:00
" tar.vim -- a Vim plugin for browsing tarfiles
2004-12-31 20:56:11 +00:00
" Copyright (c) 2002, Michael C. Toren <mct@toren.net>
2005-07-27 21:13:01 +00:00
" Distributed under the GNU General Public License.
"
" Version: 1.01
" Last Change: 2005 Jul 26
2004-12-31 20:56:11 +00:00
"
" Updates are available from <http://michael.toren.net/code/>. If you
" find this script useful, or have suggestions for improvements, please
" let me know.
2005-07-27 21:13:01 +00:00
" Also look there for further comments and documentation.
2004-12-31 20:56:11 +00:00
"
2005-07-27 21:13:01 +00:00
" This part only sets the autocommands. The functions are in autoload/tar.vim.
2004-12-31 20:56:11 +00:00
if has("autocmd")
2005-07-27 21:13:01 +00:00
augroup tar
au!
au BufReadCmd tarfile:* call tar#Read(expand("<afile>"), 1)
au BufReadCmd tarfile:*/* call tar#Read(expand("<afile>"), 1)
au FileReadCmd tarfile:* call tar#Read(expand("<afile>"), 0)
au FileReadCmd tarfile:*/* call tar#Read(expand("<afile>"), 0)
au BufWriteCmd tarfile:* call tar#Write(expand("<afile>"))
au BufWriteCmd tarfile:*/* call tar#Write(expand("<afile>"))
au FileWriteCmd tarfile:* call tar#Write(expand("<afile>"))
au FileWriteCmd tarfile:*/* call tar#Write(expand("<afile>"))
au BufReadCmd *.tar call tar#Browse(expand("<afile>"))
au BufReadCmd *.tar.gz call tar#Browse(expand("<afile>"))
au BufReadCmd *.tar.bz2 call tar#Browse(expand("<afile>"))
au BufReadCmd *.tar.Z call tar#Browse(expand("<afile>"))
au BufReadCmd *.tgz call tar#Browse(expand("<afile>"))
augroup END
2004-12-31 20:56:11 +00:00
endif