Mercurial > vim
diff runtime/plugin/tarPlugin.vim @ 557:862863033fdd v7.0158
updated for version 7.0158
author | vimboss |
---|---|
date | Wed, 23 Nov 2005 21:25:05 +0000 |
parents | 66475621f0bf |
children | c5c164b4c95c |
line wrap: on
line diff
--- a/runtime/plugin/tarPlugin.vim +++ b/runtime/plugin/tarPlugin.vim @@ -9,25 +9,25 @@ " " This part only sets the autocommands. The functions are in autoload/tar.vim. -if has("autocmd") - 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) +augroup tar + au! + au BufReadCmd tarfile:* call tar#Read(expand("<amatch>"), 1) + au FileReadCmd tarfile:* call tar#Read(expand("<amatch>"), 0) + au BufWriteCmd tarfile:* call tar#Write(expand("<amatch>")) + au FileWriteCmd tarfile:* call tar#Write(expand("<amatch>")) - 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>")) + if has("unix") + au BufReadCmd tarfile:*/* call tar#Read(expand("<amatch>"), 1) + au FileReadCmd tarfile:*/* call tar#Read(expand("<amatch>"), 0) + au BufWriteCmd tarfile:*/* call tar#Write(expand("<amatch>")) + au FileWriteCmd tarfile:*/* call tar#Write(expand("<amatch>")) + endif - 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 -endif + au BufReadCmd *.tar call tar#Browse(expand("<amatch>")) + au BufReadCmd *.tar.gz call tar#Browse(expand("<amatch>")) + au BufReadCmd *.tar.bz2 call tar#Browse(expand("<amatch>")) + au BufReadCmd *.tar.Z call tar#Browse(expand("<amatch>")) + au BufReadCmd *.tgz call tar#Browse(expand("<amatch>")) +augroup END " vim: ts=8