Mercurial > vim
annotate runtime/plugin/gzip.vim @ 10293:0bf1d211e441 v8.0.0043
commit https://github.com/vim/vim/commit/9ec7fa82a2c4f0283862ed704c2940959e6130ee
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Oct 18 13:06:41 2016 +0200
patch 8.0.0043
Problem: When using Insert mode completion with 'completeopt' containing
"noinsert" with CTRL-N the change is not saved for undo. (Tommy
Allen)
Solution: Call stop_arrow() before inserting for any key.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 18 Oct 2016 13:15:05 +0200 |
parents | aab202d244b6 |
children | 169a62d5bcb9 |
rev | line source |
---|---|
7 | 1 " Vim plugin for editing compressed files. |
2 " Maintainer: Bram Moolenaar <Bram@vim.org> | |
2111
aab202d244b6
updated for version 7.2.394
Bram Moolenaar <bram@zimbu.org>
parents:
2034
diff
changeset
|
3 " Last Change: 2010 Mar 10 |
7 | 4 |
5 " Exit quickly when: | |
6 " - this plugin was already loaded | |
7 " - when 'compatible' is set | |
8 " - some autocommands are already taking care of compressed files | |
9 if exists("loaded_gzip") || &cp || exists("#BufReadPre#*.gz") | |
10 finish | |
11 endif | |
12 let loaded_gzip = 1 | |
13 | |
14 augroup gzip | |
15 " Remove all gzip autocommands | |
16 au! | |
17 | |
446 | 18 " Enable editing of gzipped files. |
19 " The functions are defined in autoload/gzip.vim. | |
20 " | |
21 " Set binary mode before reading the file. | |
22 " Use "gzip -d", gunzip isn't always available. | |
2111
aab202d244b6
updated for version 7.2.394
Bram Moolenaar <bram@zimbu.org>
parents:
2034
diff
changeset
|
23 autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma,*.xz setlocal bin |
446 | 24 autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn") |
25 autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d") | |
26 autocmd BufReadPost,FileReadPost *.Z call gzip#read("uncompress") | |
2034 | 27 autocmd BufReadPost,FileReadPost *.lzma call gzip#read("lzma -d") |
2111
aab202d244b6
updated for version 7.2.394
Bram Moolenaar <bram@zimbu.org>
parents:
2034
diff
changeset
|
28 autocmd BufReadPost,FileReadPost *.xz call gzip#read("xz -d") |
446 | 29 autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip") |
30 autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2") | |
31 autocmd BufWritePost,FileWritePost *.Z call gzip#write("compress -f") | |
2034 | 32 autocmd BufWritePost,FileWritePost *.lzma call gzip#write("lzma -z") |
2111
aab202d244b6
updated for version 7.2.394
Bram Moolenaar <bram@zimbu.org>
parents:
2034
diff
changeset
|
33 autocmd BufWritePost,FileWritePost *.xz call gzip#write("xz -z") |
446 | 34 autocmd FileAppendPre *.gz call gzip#appre("gzip -dn") |
35 autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d") | |
36 autocmd FileAppendPre *.Z call gzip#appre("uncompress") | |
2034 | 37 autocmd FileAppendPre *.lzma call gzip#appre("lzma -d") |
2111
aab202d244b6
updated for version 7.2.394
Bram Moolenaar <bram@zimbu.org>
parents:
2034
diff
changeset
|
38 autocmd FileAppendPre *.xz call gzip#appre("xz -d") |
446 | 39 autocmd FileAppendPost *.gz call gzip#write("gzip") |
40 autocmd FileAppendPost *.bz2 call gzip#write("bzip2") | |
41 autocmd FileAppendPost *.Z call gzip#write("compress -f") | |
2034 | 42 autocmd FileAppendPost *.lzma call gzip#write("lzma -z") |
2111
aab202d244b6
updated for version 7.2.394
Bram Moolenaar <bram@zimbu.org>
parents:
2034
diff
changeset
|
43 autocmd FileAppendPost *.xz call gzip#write("xz -z") |
7 | 44 augroup END |