summaryrefslogtreecommitdiffstats
path: root/source/ap/vim/patches/7.2.394
blob: 50235e04ddb9328e374faa40999c34cea1381a98 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
To: vim-dev@vim.org
Subject: Patch 7.2.394
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.2.394
Problem:    .lzma and .xz files are not supported.
Solution:   Recognize .lzma and .xz files so that they can be edited.
Files:      runtime/plugin/gzip.vim


*** ../vim-7.2.393/runtime/plugin/gzip.vim	2005-07-27 23:12:49.000000000 +0200
--- runtime/plugin/gzip.vim	2010-03-10 17:07:22.000000000 +0100
***************
*** 1,6 ****
  " Vim plugin for editing compressed files.
  " Maintainer: Bram Moolenaar <Bram@vim.org>
! " Last Change: 2005 Jul 26
  
  " Exit quickly when:
  " - this plugin was already loaded
--- 1,6 ----
  " Vim plugin for editing compressed files.
  " Maintainer: Bram Moolenaar <Bram@vim.org>
! " Last Change: 2010 Mar 10
  
  " Exit quickly when:
  " - this plugin was already loaded
***************
*** 20,36 ****
    "
    " Set binary mode before reading the file.
    " Use "gzip -d", gunzip isn't always available.
!   autocmd BufReadPre,FileReadPre	*.gz,*.bz2,*.Z setlocal bin
    autocmd BufReadPost,FileReadPost	*.gz  call gzip#read("gzip -dn")
    autocmd BufReadPost,FileReadPost	*.bz2 call gzip#read("bzip2 -d")
    autocmd BufReadPost,FileReadPost	*.Z   call gzip#read("uncompress")
    autocmd BufWritePost,FileWritePost	*.gz  call gzip#write("gzip")
    autocmd BufWritePost,FileWritePost	*.bz2 call gzip#write("bzip2")
    autocmd BufWritePost,FileWritePost	*.Z   call gzip#write("compress -f")
    autocmd FileAppendPre			*.gz  call gzip#appre("gzip -dn")
    autocmd FileAppendPre			*.bz2 call gzip#appre("bzip2 -d")
    autocmd FileAppendPre			*.Z   call gzip#appre("uncompress")
    autocmd FileAppendPost		*.gz  call gzip#write("gzip")
    autocmd FileAppendPost		*.bz2 call gzip#write("bzip2")
    autocmd FileAppendPost		*.Z   call gzip#write("compress -f")
  augroup END
--- 20,44 ----
    "
    " Set binary mode before reading the file.
    " Use "gzip -d", gunzip isn't always available.
!   autocmd BufReadPre,FileReadPre	*.gz,*.bz2,*.Z,*.lzma,*.xz setlocal bin
    autocmd BufReadPost,FileReadPost	*.gz  call gzip#read("gzip -dn")
    autocmd BufReadPost,FileReadPost	*.bz2 call gzip#read("bzip2 -d")
    autocmd BufReadPost,FileReadPost	*.Z   call gzip#read("uncompress")
+   autocmd BufReadPost,FileReadPost	*.lzma call gzip#read("lzma -d")
+   autocmd BufReadPost,FileReadPost	*.xz  call gzip#read("xz -d")
    autocmd BufWritePost,FileWritePost	*.gz  call gzip#write("gzip")
    autocmd BufWritePost,FileWritePost	*.bz2 call gzip#write("bzip2")
    autocmd BufWritePost,FileWritePost	*.Z   call gzip#write("compress -f")
+   autocmd BufWritePost,FileWritePost	*.lzma call gzip#write("lzma -z")
+   autocmd BufWritePost,FileWritePost	*.xz  call gzip#write("xz -z")
    autocmd FileAppendPre			*.gz  call gzip#appre("gzip -dn")
    autocmd FileAppendPre			*.bz2 call gzip#appre("bzip2 -d")
    autocmd FileAppendPre			*.Z   call gzip#appre("uncompress")
+   autocmd FileAppendPre			*.lzma call gzip#appre("lzma -d")
+   autocmd FileAppendPre			*.xz   call gzip#appre("xz -d")
    autocmd FileAppendPost		*.gz  call gzip#write("gzip")
    autocmd FileAppendPost		*.bz2 call gzip#write("bzip2")
    autocmd FileAppendPost		*.Z   call gzip#write("compress -f")
+   autocmd FileAppendPost		*.lzma call gzip#write("lzma -z")
+   autocmd FileAppendPost		*.xz call gzip#write("xz -z")
  augroup END
*** ../vim-7.2.393/src/version.c	2010-03-10 16:27:27.000000000 +0100
--- src/version.c	2010-03-10 17:12:43.000000000 +0100
***************
*** 683,684 ****
--- 683,686 ----
  {   /* Add new patch number below this line */
+ /**/
+     394,
  /**/

-- 
ARTHUR:  Be quiet!
DENNIS:  --but by a two-thirds majority in the case of more--
ARTHUR:  Be quiet!  I order you to be quiet!
WOMAN:   Order, eh -- who does he think he is?
ARTHUR:  I am your king!
                                  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///