aboutsummaryrefslogtreecommitdiff
path: root/runtime/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/plugin')
-rw-r--r--runtime/plugin/gzip.vim12
-rw-r--r--runtime/plugin/man.vim2
-rw-r--r--runtime/plugin/matchit.vim46
-rw-r--r--runtime/plugin/matchparen.vim22
-rw-r--r--runtime/plugin/rplugin.vim6
-rw-r--r--runtime/plugin/tarPlugin.vim1
-rw-r--r--runtime/plugin/zipPlugin.vim8
7 files changed, 66 insertions, 31 deletions
diff --git a/runtime/plugin/gzip.vim b/runtime/plugin/gzip.vim
index edef149537..5e13b92d1e 100644
--- a/runtime/plugin/gzip.vim
+++ b/runtime/plugin/gzip.vim
@@ -1,6 +1,6 @@
" Vim plugin for editing compressed files.
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2010 Mar 10
+" Last Change: 2016 Oct 30
" Exit quickly when:
" - this plugin was already loaded
@@ -20,25 +20,33 @@ augroup gzip
"
" 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 BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma,*.xz,*.lz,*.zst 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 BufReadPost,FileReadPost *.lz call gzip#read("lzip -d")
+ autocmd BufReadPost,FileReadPost *.zst call gzip#read("zstd -d --rm")
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 BufWritePost,FileWritePost *.lz call gzip#write("lzip")
+ autocmd BufWritePost,FileWritePost *.zst call gzip#write("zstd --rm")
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 FileAppendPre *.lz call gzip#appre("lzip -d")
+ autocmd FileAppendPre *.zst call gzip#appre("zstd -d --rm")
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")
+ autocmd FileAppendPost *.lz call gzip#write("lzip")
+ autocmd FileAppendPost *.zst call gzip#write("zstd --rm")
augroup END
diff --git a/runtime/plugin/man.vim b/runtime/plugin/man.vim
index 63faa15213..7bccd4a3b9 100644
--- a/runtime/plugin/man.vim
+++ b/runtime/plugin/man.vim
@@ -5,7 +5,7 @@ if exists('g:loaded_man')
endif
let g:loaded_man = 1
-command! -range=0 -complete=customlist,man#complete -nargs=* Man call man#open_page(v:count, v:count1, <q-mods>, <f-args>)
+command! -bar -range=0 -complete=customlist,man#complete -nargs=* Man call man#open_page(v:count, v:count1, <q-mods>, <f-args>)
augroup man
autocmd!
diff --git a/runtime/plugin/matchit.vim b/runtime/plugin/matchit.vim
index c0f1f08027..e3171e5cbb 100644
--- a/runtime/plugin/matchit.vim
+++ b/runtime/plugin/matchit.vim
@@ -1,8 +1,10 @@
" matchit.vim: (global plugin) Extended "%" matching
-" Last Change: Fri Jul 29 01:20 AM 2016 EST
+" Last Change: 2017 Sep 15
" Maintainer: Benji Fisher PhD <benji@member.AMS.org>
-" Version: 1.13.2, for Vim 6.3+
+" Version: 1.13.3, for Vim 6.3+
" Fix from Tommy Allen included.
+" Fix from Fernando Torres included.
+" Improvement from Ken Takata included.
" URL: http://www.vim.org/script.php?script_id=39
" Documentation:
@@ -44,6 +46,7 @@ endif
let loaded_matchit = 1
let s:last_mps = ""
let s:last_words = ":"
+let s:patBR = ""
let s:save_cpo = &cpo
set cpo&vim
@@ -87,12 +90,15 @@ let s:notslash = '\\\@<!\%(\\\\\)*'
function! s:Match_wrapper(word, forward, mode) range
" In s:CleanUp(), :execute "set" restore_options .
- let restore_options = (&ic ? " " : " no") . "ignorecase"
- if exists("b:match_ignorecase")
+ let restore_options = ""
+ if exists("b:match_ignorecase") && b:match_ignorecase != &ic
+ let restore_options .= (&ic ? " " : " no") . "ignorecase"
let &ignorecase = b:match_ignorecase
endif
- let restore_options = " ve=" . &ve . restore_options
- set ve=
+ if &ve != ''
+ let restore_options = " ve=" . &ve . restore_options
+ set ve=
+ endif
" If this function was called from Visual mode, make sure that the cursor
" is at the correct end of the Visual range:
if a:mode == "v"
@@ -121,8 +127,8 @@ function! s:Match_wrapper(word, forward, mode) range
execute "let match_words =" b:match_words
endif
" Thanks to Preben "Peppe" Guldberg and Bram Moolenaar for this suggestion!
- if (match_words != s:last_words) || (&mps != s:last_mps) ||
- \ exists("b:match_debug")
+ if (match_words != s:last_words) || (&mps != s:last_mps)
+ \ || exists("b:match_debug")
let s:last_mps = &mps
" The next several lines were here before
" BF started messing with this script.
@@ -148,6 +154,10 @@ function! s:Match_wrapper(word, forward, mode) range
if exists("b:match_debug")
let b:match_pat = s:pat
endif
+ " Reconstruct the version with unresolved backrefs.
+ let s:patBR = substitute(match_words.',',
+ \ s:notslash.'\zs[,:]*,[,:]*', ',', 'g')
+ let s:patBR = substitute(s:patBR, s:notslash.'\zs:\{2,}', ':', 'g')
endif
" Second step: set the following local variables:
@@ -192,14 +202,10 @@ function! s:Match_wrapper(word, forward, mode) range
" group = colon-separated list of patterns, one of which matches
" = ini:mid:fin or ini:fin
"
- " Reconstruct the version with unresolved backrefs.
- let patBR = substitute(match_words.',',
- \ s:notslash.'\zs[,:]*,[,:]*', ',', 'g')
- let patBR = substitute(patBR, s:notslash.'\zs:\{2,}', ':', 'g')
" Now, set group and groupBR to the matching group: 'if:endif' or
" 'while:endwhile' or whatever. A bit of a kluge: s:Choose() returns
" group . "," . groupBR, and we pick it apart.
- let group = s:Choose(s:pat, matchline, ",", ":", prefix, suffix, patBR)
+ let group = s:Choose(s:pat, matchline, ",", ":", prefix, suffix, s:patBR)
let i = matchend(group, s:notslash . ",")
let groupBR = strpart(group, i)
let group = strpart(group, 0, i-1)
@@ -280,7 +286,9 @@ endfun
" Restore options and do some special handling for Operator-pending mode.
" The optional argument is the tail of the matching group.
fun! s:CleanUp(options, mode, startline, startcol, ...)
- execute "set" a:options
+ if strlen(a:options)
+ execute "set" a:options
+ endif
" Open folds, if appropriate.
if a:mode != "o"
if &foldopen =~ "percent"
@@ -632,8 +640,9 @@ fun! s:MultiMatch(spflag, mode)
if !exists("b:match_words") || b:match_words == ""
return {}
end
- let restore_options = (&ic ? "" : "no") . "ignorecase"
- if exists("b:match_ignorecase")
+ let restore_options = ""
+ if exists("b:match_ignorecase") && b:match_ignorecase != &ic
+ let restore_options .= (&ic ? " " : " no") . "ignorecase"
let &ignorecase = b:match_ignorecase
endif
let startline = line(".")
@@ -656,6 +665,7 @@ fun! s:MultiMatch(spflag, mode)
\ exists("b:match_debug")
let s:last_words = match_words
let s:last_mps = &mps
+ let match_words = match_words . (strlen(match_words) ? "," : "") . default
if match_words !~ s:notslash . '\\\d'
let s:do_BR = 0
let s:pat = match_words
@@ -663,8 +673,8 @@ fun! s:MultiMatch(spflag, mode)
let s:do_BR = 1
let s:pat = s:ParseWords(match_words)
endif
- let s:all = '\%(' . substitute(s:pat . (strlen(s:pat)?",":"") . default,
- \ '[,:]\+','\\|','g') . '\)'
+ let s:all = '\%(' . substitute(s:pat . (strlen(s:pat) ? "," : "") . default,
+ \ '[,:]\+', '\\|', 'g') . '\)'
if exists("b:match_debug")
let b:match_pat = s:pat
endif
diff --git a/runtime/plugin/matchparen.vim b/runtime/plugin/matchparen.vim
index 5db1f64c78..4f68fd87bc 100644
--- a/runtime/plugin/matchparen.vim
+++ b/runtime/plugin/matchparen.vim
@@ -1,6 +1,6 @@
" Vim plugin for showing matching parens
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2016 Feb 16
+" Last Change: 2017 Sep 30
" Exit quickly when:
" - this plugin was already loaded (or disabled)
@@ -186,9 +186,23 @@ function! s:Highlight_Matching_Pair()
endfunction
" Define commands that will disable and enable the plugin.
-command! NoMatchParen windo silent! call matchdelete(3) | unlet! g:loaded_matchparen |
- \ au! matchparen
-command! DoMatchParen runtime plugin/matchparen.vim | windo doau CursorMoved
+command! DoMatchParen call s:DoMatchParen()
+command! NoMatchParen call s:NoMatchParen()
+
+func! s:NoMatchParen()
+ let w = winnr()
+ noau windo silent! call matchdelete(3)
+ unlet! g:loaded_matchparen
+ exe "noau ". w . "wincmd w"
+ au! matchparen
+endfunc
+
+func! s:DoMatchParen()
+ runtime plugin/matchparen.vim
+ let w = winnr()
+ silent windo doau CursorMoved
+ exe "noau ". w . "wincmd w"
+endfunc
let &cpo = s:cpo_save
unlet s:cpo_save
diff --git a/runtime/plugin/rplugin.vim b/runtime/plugin/rplugin.vim
index 7d83668a30..ca15ec82d1 100644
--- a/runtime/plugin/rplugin.vim
+++ b/runtime/plugin/rplugin.vim
@@ -17,9 +17,11 @@ function! s:GetManifestPath() abort
endif
let dest = fnamemodify(expand(dest), ':p')
- if !empty(dest) && !filereadable(dest)
+ if !empty(dest)
let dest .= ('/' ==# dest[-1:] ? '' : '/') . 'nvim'
- call mkdir(dest, 'p', 0700)
+ if !isdirectory(dest)
+ call mkdir(dest, 'p', 0700)
+ endif
let manifest_base = dest
endif
diff --git a/runtime/plugin/tarPlugin.vim b/runtime/plugin/tarPlugin.vim
index 034cbe225a..6d9e6bd540 100644
--- a/runtime/plugin/tarPlugin.vim
+++ b/runtime/plugin/tarPlugin.vim
@@ -40,6 +40,7 @@ augroup tar
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>"))
+ au BufReadCmd *.tbz call tar#Browse(expand("<amatch>"))
au BufReadCmd *.tar.lzma call tar#Browse(expand("<amatch>"))
au BufReadCmd *.tar.xz call tar#Browse(expand("<amatch>"))
au BufReadCmd *.txz call tar#Browse(expand("<amatch>"))
diff --git a/runtime/plugin/zipPlugin.vim b/runtime/plugin/zipPlugin.vim
index e9bd0dc4bd..c04d5344b1 100644
--- a/runtime/plugin/zipPlugin.vim
+++ b/runtime/plugin/zipPlugin.vim
@@ -1,9 +1,9 @@
" zipPlugin.vim: Handles browsing zipfiles
" PLUGIN PORTION
-" Date: Jun 07, 2013
+" Date: Sep 13, 2016
" Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
" License: Vim License (see vim's :help license)
-" Copyright: Copyright (C) 2005-2013 Charles E. Campbell {{{1
+" Copyright: Copyright (C) 2005-2016 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
" notice is copied with it. Like anything else that's free,
@@ -20,14 +20,14 @@
if &cp || exists("g:loaded_zipPlugin")
finish
endif
-let g:loaded_zipPlugin = "v27"
+let g:loaded_zipPlugin = "v28"
let s:keepcpo = &cpo
set cpo&vim
" ---------------------------------------------------------------------
" Options: {{{1
if !exists("g:zipPlugin_ext")
- let g:zipPlugin_ext= '*.zip,*.jar,*.xpi,*.ja,*.war,*.ear,*.celzip,*.oxt,*.kmz,*.wsz,*.xap,*.docx,*.docm,*.dotx,*.dotm,*.potx,*.potm,*.ppsx,*.ppsm,*.pptx,*.pptm,*.ppam,*.sldx,*.thmx,*.xlam,*.xlsx,*.xlsm,*.xlsb,*.xltx,*.xltm,*.xlam,*.crtx,*.vdw,*.glox,*.gcsx,*.gqsx'
+ let g:zipPlugin_ext='*.apk,*.celzip,*.crtx,*.docm,*.docx,*.dotm,*.dotx,*.ear,*.epub,*.gcsx,*.glox,*.gqsx,*.ja,*.jar,*.kmz,*.oxt,*.potm,*.potx,*.ppam,*.ppsm,*.ppsx,*.pptm,*.pptx,*.sldx,*.thmx,*.vdw,*.war,*.wsz,*.xap,*.xlam,*.xlam,*.xlsb,*.xlsm,*.xlsx,*.xltm,*.xltx,*.xpi,*.zip'
endif
" ---------------------------------------------------------------------