diff options
Diffstat (limited to 'runtime/plugin')
-rw-r--r-- | runtime/plugin/health.vim | 8 | ||||
-rw-r--r-- | runtime/plugin/man.vim | 11 | ||||
-rw-r--r-- | runtime/plugin/matchit.vim | 32 | ||||
-rw-r--r-- | runtime/plugin/matchparen.vim | 2 | ||||
-rw-r--r-- | runtime/plugin/netrwPlugin.vim | 10 | ||||
-rw-r--r-- | runtime/plugin/vimballPlugin.vim | 40 |
6 files changed, 33 insertions, 70 deletions
diff --git a/runtime/plugin/health.vim b/runtime/plugin/health.vim new file mode 100644 index 0000000000..e3482cb0fe --- /dev/null +++ b/runtime/plugin/health.vim @@ -0,0 +1,8 @@ +function! s:complete(lead, _line, _pos) abort + return sort(filter(map(globpath(&runtimepath, 'autoload/health/*', 1, 1), + \ 'fnamemodify(v:val, ":t:r")'), + \ 'empty(a:lead) || v:val[:strlen(a:lead)-1] ==# a:lead')) +endfunction + +command! -nargs=* -complete=customlist,s:complete CheckHealth + \ call health#check([<f-args>]) diff --git a/runtime/plugin/man.vim b/runtime/plugin/man.vim index 8e5062a209..63faa15213 100644 --- a/runtime/plugin/man.vim +++ b/runtime/plugin/man.vim @@ -1,6 +1,13 @@ -if get(g:, 'loaded_man', 0) +" Maintainer: Anmol Sethi <anmol@aubble.com> + +if exists('g:loaded_man') finish endif let g:loaded_man = 1 -command! -count=0 -nargs=+ Man call man#get_page(<count>, <f-args>) +command! -range=0 -complete=customlist,man#complete -nargs=* Man call man#open_page(v:count, v:count1, <q-mods>, <f-args>) + +augroup man + autocmd! + autocmd BufReadCmd man://* call man#read_page(matchstr(expand('<amatch>'), 'man://\zs.*')) +augroup END diff --git a/runtime/plugin/matchit.vim b/runtime/plugin/matchit.vim index 70867b1f93..c0f1f08027 100644 --- a/runtime/plugin/matchit.vim +++ b/runtime/plugin/matchit.vim @@ -1,7 +1,8 @@ " matchit.vim: (global plugin) Extended "%" matching -" Last Change: Fri Jan 25 10:00 AM 2008 EST +" Last Change: Fri Jul 29 01:20 AM 2016 EST " Maintainer: Benji Fisher PhD <benji@member.AMS.org> " Version: 1.13.2, for Vim 6.3+ +" Fix from Tommy Allen included. " URL: http://www.vim.org/script.php?script_id=39 " Documentation: @@ -122,7 +123,6 @@ function! s:Match_wrapper(word, forward, mode) range " 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") - let s:last_words = match_words let s:last_mps = &mps " The next several lines were here before " BF started messing with this script. @@ -134,6 +134,7 @@ function! s:Match_wrapper(word, forward, mode) range \ '\/\*:\*\/,#\s*if\%(def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>' " s:all = pattern with all the keywords let match_words = match_words . (strlen(match_words) ? "," : "") . default + let s:last_words = match_words if match_words !~ s:notslash . '\\\d' let s:do_BR = 0 let s:pat = match_words @@ -254,12 +255,7 @@ function! s:Match_wrapper(word, forward, mode) range " Fifth step: actually start moving the cursor and call searchpair(). " Later, :execute restore_cursor to get to the original screen. - let restore_cursor = virtcol(".") . "|" - normal! g0 - let restore_cursor = line(".") . "G" . virtcol(".") . "|zs" . restore_cursor - normal! H - let restore_cursor = "normal!" . line(".") . "Gzt" . restore_cursor - execute restore_cursor + let view = winsaveview() call cursor(0, curcol + 1) " normal! 0 " if curcol @@ -273,7 +269,7 @@ function! s:Match_wrapper(word, forward, mode) range let sp_return = searchpair(ini, mid, fin, flag, skip) let final_position = "call cursor(" . line(".") . "," . col(".") . ")" " Restore cursor position and original screen. - execute restore_cursor + call winrestview(view) normal! m' if sp_return > 0 execute final_position @@ -634,7 +630,7 @@ endfun " idea to give it its own matching patterns. fun! s:MultiMatch(spflag, mode) if !exists("b:match_words") || b:match_words == "" - return "" + return {} end let restore_options = (&ic ? "" : "no") . "ignorecase" if exists("b:match_ignorecase") @@ -694,15 +690,7 @@ fun! s:MultiMatch(spflag, mode) let skip = 's:comment\|string' endif let skip = s:ParseSkip(skip) - " let restore_cursor = line(".") . "G" . virtcol(".") . "|" - " normal! H - " let restore_cursor = "normal!" . line(".") . "Gzt" . restore_cursor - let restore_cursor = virtcol(".") . "|" - normal! g0 - let restore_cursor = line(".") . "G" . virtcol(".") . "|zs" . restore_cursor - normal! H - let restore_cursor = "normal!" . line(".") . "Gzt" . restore_cursor - execute restore_cursor + let view = winsaveview() " Third step: call searchpair(). " Replace '\('--but not '\\('--with '\%(' and ',' with '\|'. @@ -720,14 +708,14 @@ fun! s:MultiMatch(spflag, mode) while level if searchpair(openpat, '', closepat, a:spflag, skip) < 1 call s:CleanUp(restore_options, a:mode, startline, startcol) - return "" + return {} endif let level = level - 1 endwhile - " Restore options and return a string to restore the original position. + " Restore options and return view dict to restore the original position. call s:CleanUp(restore_options, a:mode, startline, startcol) - return restore_cursor + return view endfun " Search backwards for "if" or "while" or "<tag>" or ... diff --git a/runtime/plugin/matchparen.vim b/runtime/plugin/matchparen.vim index 873302efee..5db1f64c78 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: 2015 Dec 31 +" Last Change: 2016 Feb 16 " Exit quickly when: " - this plugin was already loaded (or disabled) diff --git a/runtime/plugin/netrwPlugin.vim b/runtime/plugin/netrwPlugin.vim index 3776ac30f8..28e1c3ecf8 100644 --- a/runtime/plugin/netrwPlugin.vim +++ b/runtime/plugin/netrwPlugin.vim @@ -1,6 +1,6 @@ " netrwPlugin.vim: Handles file transfer and remote directory listing across a network " PLUGIN SECTION -" Date: Nov 07, 2014 +" Date: Feb 08, 2016 " Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM> " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim " Copyright: Copyright (C) 1999-2013 Charles E. Campbell {{{1 @@ -20,7 +20,7 @@ if &cp || exists("g:loaded_netrwPlugin") finish endif -let g:loaded_netrwPlugin = "v154" +let g:loaded_netrwPlugin = "v156" let s:keepcpo = &cpo set cpo&vim "DechoRemOn @@ -55,10 +55,10 @@ augroup Network augroup END " Commands: :Nread, :Nwrite, :NetUserPass {{{2 -com! -count=1 -nargs=* Nread call netrw#SavePosn()<bar>call netrw#NetRead(<count>,<f-args>)<bar>call netrw#RestorePosn() -com! -range=% -nargs=* Nwrite call netrw#SavePosn()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call netrw#RestorePosn() +com! -count=1 -nargs=* Nread let s:svpos= winsaveview()<bar>call netrw#NetRead(<count>,<f-args>)<bar>call winrestview(s:svpos) +com! -range=% -nargs=* Nwrite let s:svpos= winsaveview()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call winrestview(s:svpos) com! -nargs=* NetUserPass call NetUserPass(<f-args>) -com! -nargs=* Nsource call netrw#SavePosn()<bar>call netrw#NetSource(<f-args>)<bar>call netrw#RestorePosn() +com! -nargs=* Nsource let s:svpos= winsaveview()<bar>call netrw#NetSource(<f-args>)<bar>call winrestview(s:svpos) com! -nargs=? Ntree call netrw#SetTreetop(<q-args>) " Commands: :Explore, :Sexplore, Hexplore, Vexplore, Lexplore {{{2 diff --git a/runtime/plugin/vimballPlugin.vim b/runtime/plugin/vimballPlugin.vim deleted file mode 100644 index 59279774ca..0000000000 --- a/runtime/plugin/vimballPlugin.vim +++ /dev/null @@ -1,40 +0,0 @@ -" vimballPlugin : construct a file containing both paths and files -" Author: Charles E. Campbell, Jr. -" Copyright: (c) 2004-2010 by Charles E. Campbell, Jr. -" The VIM LICENSE applies to Vimball.vim, and Vimball.txt -" (see |copyright|) except use "Vimball" instead of "Vim". -" No warranty, express or implied. -" *** *** Use At-Your-Own-Risk! *** *** -" -" (Rom 2:1 WEB) Therefore you are without excuse, O man, whoever you are who -" judge. For in that which you judge another, you condemn yourself. For -" you who judge practice the same things. -" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim - -" --------------------------------------------------------------------- -" Load Once: {{{1 -if &cp || exists("g:loaded_vimballPlugin") - finish -endif -let g:loaded_vimballPlugin = "v35" -let s:keepcpo = &cpo -set cpo&vim - -" ------------------------------------------------------------------------------ -" Public Interface: {{{1 -com! -ra -complete=file -na=+ -bang MkVimball call vimball#MkVimball(<line1>,<line2>,<bang>0,<f-args>) -com! -na=? -complete=dir UseVimball call vimball#Vimball(1,<f-args>) -com! -na=0 VimballList call vimball#Vimball(0) -com! -na=* -complete=dir RmVimball call vimball#SaveSettings()|call vimball#RmVimball(<f-args>)|call vimball#RestoreSettings() -au BufEnter *.vba,*.vba.gz,*.vba.bz2,*.vba.zip,*.vba.xz setlocal bt=nofile fmr=[[[,]]] fdm=marker|if &ff != 'unix'|setlocal ma ff=unix noma|endif|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)") -au SourceCmd *.vba.gz,*.vba.bz2,*.vba.zip,*.vba.xz if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|endif|call vimball#Decompress(expand("<amatch>"))|so %|if expand("%")!=expand("<afile>")|close|endif -au SourceCmd *.vba if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|call vimball#Vimball(1)|close|else|call vimball#Vimball(1)|endif -au BufEnter *.vmb,*.vmb.gz,*.vmb.bz2,*.vmb.zip,*.vmb.xz setlocal bt=nofile fmr=[[[,]]] fdm=marker|if &ff != 'unix'|setlocal ma ff=unix noma|endif|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)") -au SourceCmd *.vmb.gz,*.vmb.bz2,*.vmb.zip,*.vmb.xz if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|endif|call vimball#Decompress(expand("<amatch>"))|so %|if expand("%")!=expand("<afile>")|close|endif -au SourceCmd *.vmb if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|call vimball#Vimball(1)|close|else|call vimball#Vimball(1)|endif - -" ===================================================================== -" Restoration And Modelines: {{{1 -" vim: fdm=marker -let &cpo= s:keepcpo -unlet s:keepcpo |