diff options
Diffstat (limited to 'runtime/plugin/tarPlugin.vim')
-rw-r--r-- | runtime/plugin/tarPlugin.vim | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/runtime/plugin/tarPlugin.vim b/runtime/plugin/tarPlugin.vim index b9a34aa07e..506b4313d3 100644 --- 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 |