annotate runtime/plugin/tarPlugin.vim @ 10773:bda1d67f83f3 v8.0.0276

patch 8.0.0276: unnecessary #ifdefs commit https://github.com/vim/vim/commit/3954e3c4b5d2bfda4c481c076fbc39ab06be7639 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Feb 1 11:50:09 2017 +0100 patch 8.0.0276: unnecessary #ifdefs Problem: Checking for FEAT_GUI_GNOME inside GTK 3 code is unnecessary. Solution: Remove the #ifdef. (Kazunobu Kuriyama)
author Christian Brabandt <cb@256bit.org>
date Wed, 01 Feb 2017 12:00:04 +0100
parents 22fa3049e934
children 1218c5353e2b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
528
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
1 " tarPlugin.vim -- a Vim plugin for browsing tarfiles
1126
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
2 " Original was copyright (c) 2002, Michael C. Toren <mct@toren.net>
4339
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
3 " Modified by Charles E. Campbell
528
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
4 " Distributed under the GNU General Public License.
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
5 "
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
6 " Updates are available from <http://michael.toren.net/code/>. If you
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
7 " find this script useful, or have suggestions for improvements, please
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
8 " let me know.
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
9 " Also look there for further comments and documentation.
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
10 "
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
11 " This part only sets the autocommands. The functions are in autoload/tar.vim.
1126
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
12 " ---------------------------------------------------------------------
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
13 " Load Once: {{{1
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
14 if &cp || exists("g:loaded_tarPlugin")
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
15 finish
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
16 endif
4339
22fa3049e934 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3281
diff changeset
17 let g:loaded_tarPlugin = "v29"
1126
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
18 let s:keepcpo = &cpo
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
19 set cpo&vim
528
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
20
1126
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
21 " ---------------------------------------------------------------------
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
22 " Public Interface: {{{1
557
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
23 augroup tar
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
24 au!
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
25 au BufReadCmd tarfile::* call tar#Read(expand("<amatch>"), 1)
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
26 au FileReadCmd tarfile::* call tar#Read(expand("<amatch>"), 0)
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
27 au BufWriteCmd tarfile::* call tar#Write(expand("<amatch>"))
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
28 au FileWriteCmd tarfile::* call tar#Write(expand("<amatch>"))
528
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
29
557
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
30 if has("unix")
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
31 au BufReadCmd tarfile::*/* call tar#Read(expand("<amatch>"), 1)
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
32 au FileReadCmd tarfile::*/* call tar#Read(expand("<amatch>"), 0)
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
33 au BufWriteCmd tarfile::*/* call tar#Write(expand("<amatch>"))
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
34 au FileWriteCmd tarfile::*/* call tar#Write(expand("<amatch>"))
557
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
35 endif
528
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
36
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
37 au BufReadCmd *.tar.gz call tar#Browse(expand("<amatch>"))
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
38 au BufReadCmd *.tar call tar#Browse(expand("<amatch>"))
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
39 au BufReadCmd *.lrp call tar#Browse(expand("<amatch>"))
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
40 au BufReadCmd *.tar.bz2 call tar#Browse(expand("<amatch>"))
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
41 au BufReadCmd *.tar.Z call tar#Browse(expand("<amatch>"))
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
42 au BufReadCmd *.tgz call tar#Browse(expand("<amatch>"))
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
43 au BufReadCmd *.tar.lzma call tar#Browse(expand("<amatch>"))
2426
e52d87a2bb3e More runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
44 au BufReadCmd *.tar.xz call tar#Browse(expand("<amatch>"))
e52d87a2bb3e More runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
45 au BufReadCmd *.txz call tar#Browse(expand("<amatch>"))
557
862863033fdd updated for version 7.0158
vimboss
parents: 528
diff changeset
46 augroup END
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1702
diff changeset
47 com! -nargs=? -complete=file Vimuntar call tar#Vimuntar(<q-args>)
528
66475621f0bf updated for version 7.0147
vimboss
parents:
diff changeset
48
1126
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
49 " ---------------------------------------------------------------------
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
50 " Restoration And Modelines: {{{1
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
51 " vim: fdm=marker
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
52 let &cpo= s:keepcpo
c5c164b4c95c updated for version 7.1a
vimboss
parents: 557
diff changeset
53 unlet s:keepcpo