aboutsummaryrefslogtreecommitdiff
path: root/runtime/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/plugin')
-rw-r--r--runtime/plugin/getscriptPlugin.vim41
-rw-r--r--runtime/plugin/matchit.vim2
-rw-r--r--runtime/plugin/matchparen.vim13
-rw-r--r--runtime/plugin/netrwPlugin.vim24
-rw-r--r--runtime/plugin/rplugin.vim17
-rw-r--r--runtime/plugin/shada.vim39
-rw-r--r--runtime/plugin/spellfile.vim7
-rw-r--r--runtime/plugin/tohtml.vim35
8 files changed, 93 insertions, 85 deletions
diff --git a/runtime/plugin/getscriptPlugin.vim b/runtime/plugin/getscriptPlugin.vim
deleted file mode 100644
index fb0fbeab7b..0000000000
--- a/runtime/plugin/getscriptPlugin.vim
+++ /dev/null
@@ -1,41 +0,0 @@
-" ---------------------------------------------------------------------
-" getscriptPlugin.vim
-" Author: Charles E. Campbell
-" Date: Nov 29, 2013
-" Installing: :help glvs-install
-" Usage: :help glvs
-"
-" GetLatestVimScripts: 642 1 :AutoInstall: getscript.vim
-"
-" (Rom 15:11 WEB) Again, "Praise the Lord, all you Gentiles! Let
-" all the peoples praise Him."
-" ---------------------------------------------------------------------
-" Initialization: {{{1
-" if you're sourcing this file, surely you can't be
-" expecting vim to be in its vi-compatible mode
-if exists("g:loaded_getscriptPlugin")
- finish
-endif
-if &cp
- if &verbose
- echo "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
- endif
- finish
-endif
-let g:loaded_getscriptPlugin = "v36"
-let s:keepcpo = &cpo
-set cpo&vim
-
-" ---------------------------------------------------------------------
-" Public Interface: {{{1
-com! -nargs=0 GetLatestVimScripts call getscript#GetLatestVimScripts()
-com! -nargs=0 GetScripts call getscript#GetLatestVimScripts()
-silent! com -nargs=0 GLVS call getscript#GetLatestVimScripts()
-
-" ---------------------------------------------------------------------
-" Restore Options: {{{1
-let &cpo= s:keepcpo
-unlet s:keepcpo
-
-" ---------------------------------------------------------------------
-" vim: ts=8 sts=2 fdm=marker nowrap
diff --git a/runtime/plugin/matchit.vim b/runtime/plugin/matchit.vim
index 74c1a1eb92..70867b1f93 100644
--- a/runtime/plugin/matchit.vim
+++ b/runtime/plugin/matchit.vim
@@ -303,7 +303,7 @@ fun! s:CleanUp(options, mode, startline, startcol, ...)
let regexp = s:Wholematch(matchline, a:1, currcol-1)
let endcol = matchend(matchline, regexp)
if endcol > currcol " This is NOT off by one!
- execute "normal!" . (endcol - currcol) . "l"
+ call cursor(0, endcol)
endif
endif " a:0
endif " a:mode != "o" && etc.
diff --git a/runtime/plugin/matchparen.vim b/runtime/plugin/matchparen.vim
index 3804ab949a..873302efee 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: 2014 Jul 19
+" Last Change: 2015 Dec 31
" Exit quickly when:
" - this plugin was already loaded (or disabled)
@@ -55,14 +55,19 @@ function! s:Highlight_Matching_Pair()
let before = 0
let text = getline(c_lnum)
- let c = text[c_col - 1]
+ let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)')
+ if empty(matches)
+ let [c_before, c] = ['', '']
+ else
+ let [c_before, c] = matches[1:2]
+ endif
let plist = split(&matchpairs, '.\zs[:,]')
let i = index(plist, c)
if i < 0
" not found, in Insert mode try character before the cursor
if c_col > 1 && (mode() == 'i' || mode() == 'R')
- let before = 1
- let c = text[c_col - 2]
+ let before = strlen(c_before)
+ let c = c_before
let i = index(plist, c)
endif
if i < 0
diff --git a/runtime/plugin/netrwPlugin.vim b/runtime/plugin/netrwPlugin.vim
index cad4d31a04..3776ac30f8 100644
--- a/runtime/plugin/netrwPlugin.vim
+++ b/runtime/plugin/netrwPlugin.vim
@@ -20,19 +20,7 @@
if &cp || exists("g:loaded_netrwPlugin")
finish
endif
-let g:loaded_netrwPlugin = "v153"
-if v:version < 702
- echohl WarningMsg
- echo "***warning*** you need vim version 7.2 for this version of netrw"
- echohl None
- finish
-endif
-if v:version < 703 || (v:version == 703 && !has("patch465"))
- echohl WarningMsg
- echo "***warning*** this version of netrw needs vim 7.3.465 or later"
- echohl Normal
- finish
-endif
+let g:loaded_netrwPlugin = "v154"
let s:keepcpo = &cpo
set cpo&vim
"DechoRemOn
@@ -102,6 +90,12 @@ if !exists("g:netrw_nogx")
vno <silent> <Plug>NetrwBrowseXVis :<c-u>call netrw#BrowseXVis()<cr>
endif
endif
+if exists("g:netrw_usetab") && g:netrw_usetab
+ if maparg('<c-tab>','n') == ""
+ nmap <unique> <c-tab> <Plug>NetrwShrink
+ endif
+ nno <silent> <Plug>NetrwShrink :call netrw#Shrink()<cr>
+endif
" ---------------------------------------------------------------------
" LocalBrowse: invokes netrw#LocalBrowseCheck() on directory buffers {{{2
@@ -135,15 +129,19 @@ fun! s:LocalBrowse(dirname)
elseif isdirectory(a:dirname)
" call Decho("(LocalBrowse) dirname<".a:dirname."> ft=".&ft." (isdirectory, not amiga)")
" call Dredir("LocalBrowse ft last set: ","verbose set ft")
+" call Decho("(s:LocalBrowse) COMBAK#23: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
sil! call netrw#LocalBrowseCheck(a:dirname)
+" call Decho("(s:LocalBrowse) COMBAK#24: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt
exe w:netrw_bannercnt
+" call Decho("(s:LocalBrowse) COMBAK#25: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
endif
else
" not a directory, ignore it
" call Decho("(LocalBrowse) dirname<".a:dirname."> not a directory, ignoring...")
endif
+" call Decho("(s:LocalBrowse) COMBAK#26: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
" call Dret("s:LocalBrowse")
endfun
diff --git a/runtime/plugin/rplugin.vim b/runtime/plugin/rplugin.vim
index 2b2d333738..b4b03032b3 100644
--- a/runtime/plugin/rplugin.vim
+++ b/runtime/plugin/rplugin.vim
@@ -1,5 +1,16 @@
-if exists('loaded_remote_plugins') || &cp
+if exists('g:loaded_remote_plugins')
finish
endif
-let loaded_remote_plugins = 1
-call remote#host#LoadRemotePlugins()
+let g:loaded_remote_plugins = 1
+
+command! UpdateRemotePlugins call remote#host#UpdateRemotePlugins()
+
+augroup nvim-rplugin
+ autocmd!
+ autocmd FuncUndefined *
+ \ call remote#host#LoadRemotePluginsEvent(
+ \ 'FuncUndefined', expand('<amatch>'))
+ autocmd CmdUndefined *
+ \ call remote#host#LoadRemotePluginsEvent(
+ \ 'CmdUndefined', expand('<amatch>'))
+augroup END
diff --git a/runtime/plugin/shada.vim b/runtime/plugin/shada.vim
new file mode 100644
index 0000000000..ae08e01dcb
--- /dev/null
+++ b/runtime/plugin/shada.vim
@@ -0,0 +1,39 @@
+if exists('g:loaded_shada_plugin')
+ finish
+endif
+let g:loaded_shada_plugin = 1
+
+augroup ShaDaCommands
+ autocmd!
+ autocmd BufReadCmd *.shada,*.shada.tmp.[a-z]
+ \ :if !empty(v:cmdarg)|throw '++opt not supported'|endif
+ \ |call setline('.', shada#get_strings(readfile(expand('<afile>'),'b')))
+ \ |setlocal filetype=shada
+ autocmd FileReadCmd *.shada,*.shada.tmp.[a-z]
+ \ :if !empty(v:cmdarg)|throw '++opt not supported'|endif
+ \ |call append("'[", shada#get_strings(readfile(expand('<afile>'), 'b')))
+ autocmd BufWriteCmd *.shada,*.shada.tmp.[a-z]
+ \ :if !empty(v:cmdarg)|throw '++opt not supported'|endif
+ \ |if writefile(shada#get_binstrings(getline(1, '$')),
+ \expand('<afile>'), 'b') == 0
+ \ | let &l:modified = (expand('<afile>') is# bufname(+expand('<abuf>'))
+ \? 0
+ \: stridx(&cpoptions, '+') != -1)
+ \ |endif
+ autocmd FileWriteCmd *.shada,*.shada.tmp.[a-z]
+ \ :if !empty(v:cmdarg)|throw '++opt not supported'|endif
+ \ |call writefile(
+ \shada#get_binstrings(getline(min([line("'["), line("']")]),
+ \max([line("'["), line("']")]))),
+ \expand('<afile>'),
+ \'b')
+ autocmd FileAppendCmd *.shada,*.shada.tmp.[a-z]
+ \ :if !empty(v:cmdarg)|throw '++opt not supported'|endif
+ \ |call writefile(
+ \shada#get_binstrings(getline(min([line("'["), line("']")]),
+ \max([line("'["), line("']")]))),
+ \expand('<afile>'),
+ \'ab')
+ autocmd SourceCmd *.shada,*.shada.tmp.[a-z]
+ \ :execute 'rshada' fnameescape(expand('<afile>'))
+augroup END
diff --git a/runtime/plugin/spellfile.vim b/runtime/plugin/spellfile.vim
index 437296090c..e03659d6d6 100644
--- a/runtime/plugin/spellfile.vim
+++ b/runtime/plugin/spellfile.vim
@@ -1,15 +1,8 @@
" Vim plugin for downloading spell files
-" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2006 Feb 01
-" Exit quickly when:
-" - this plugin was already loaded
-" - when 'compatible' is set
-" - some autocommands are already taking care of spell files
if exists("loaded_spellfile_plugin") || &cp || exists("#SpellFileMissing")
finish
endif
let loaded_spellfile_plugin = 1
-" The function is in the autoload directory.
autocmd SpellFileMissing * call spellfile#LoadFile(expand('<amatch>'))
diff --git a/runtime/plugin/tohtml.vim b/runtime/plugin/tohtml.vim
index eb47b1a7c3..b438dea811 100644
--- a/runtime/plugin/tohtml.vim
+++ b/runtime/plugin/tohtml.vim
@@ -1,6 +1,6 @@
" Vim plugin for converting a syntax highlighted file to HTML.
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
-" Last Change: 2013 Jul 08
+" Last Change: 2015 Sep 08
"
" The core of the code is in $VIMRUNTIME/autoload/tohtml.vim and
" $VIMRUNTIME/syntax/2html.vim
@@ -67,20 +67,24 @@
if exists('g:loaded_2html_plugin')
finish
endif
-let g:loaded_2html_plugin = 'vim7.4_v1'
+let g:loaded_2html_plugin = 'vim7.4_v2'
"
" Changelog: {{{
-" 7.4_v1 (this version): Fix modeline mangling for new "Vim:" format, and
+" 7.4_v2 (this version): Fix error raised when converting a diff containing
+" an empty buffer. Jan Stocker: allow g:html_font to
+" take a list so it is easier to specfiy fallback
+" fonts in the generated CSS.
+" 7.4_v1 (Vim 7.4.0000): Fix modeline mangling for new "Vim:" format, and
" also for version-specific modelines like "vim>703:".
"
" 7.3 updates: {{{
-" 7.3_v14 (ad6996a23e3e): Allow suppressing line number anchors using
+" 7.3_v14 (Vim 7.3.1246): Allow suppressing line number anchors using
" g:html_line_ids=0. Allow customizing
" important IDs (like line IDs and fold IDs) using
" g:html_id_expr evalutated when the buffer conversion
" is started.
-" 7.3_v13 (2eb30f341e8d): Keep foldmethod at manual in the generated file and
+" 7.3_v13 (Vim 7.3.1088): Keep foldmethod at manual in the generated file and
" insert modeline to set it to manual.
" Fix bug: diff mode with 2 unsaved buffers creates a
" duplicate of one buffer instead of including both.
@@ -91,7 +95,7 @@ let g:loaded_2html_plugin = 'vim7.4_v1'
" Fix XML validation error: &nsbp; not part of XML.
" Allow TOhtml to chain together with other commands
" using |.
-" 7.3_v12 (9910cbff5f16): Fix modeline mangling to also work for when multiple
+" 7.3_v12 (Vim 7.3.0616): Fix modeline mangling to also work for when multiple
" highlight groups make up the start-of-modeline text.
" Improve render time of page with uncopyable regions
" by not using one-input-per-char. Change name of
@@ -117,23 +121,23 @@ let g:loaded_2html_plugin = 'vim7.4_v1'
" http://groups.google.com/d/topic/vim_dev/B6FSGfq9VoI/discussion.
" This patch has not yet been included in Vim, thus
" these changes are removed in the next version.
-" 7.3_v10 (fd09a9c8468e): Fix error E684 when converting a range wholly inside
+" 7.3_v10 (Vim 7.3.0227): Fix error E684 when converting a range wholly inside
" multiple nested folds with dynamic folding on.
" Also fix problem with foldtext in this situation.
-" 7.3_v9 (0877b8d6370e): Add html_pre_wrap option active with html_use_css
+" 7.3_v9 (Vim 7.3.0170): Add html_pre_wrap option active with html_use_css
" and without html_no_pre, default value same as
" 'wrap' option, (Andy Spencer). Don't use
" 'fileencoding' for converted document encoding if
" 'buftype' indicates a special buffer which isn't
" written.
-" 7.3_v8 (85c5a72551e2): Add html_expand_tabs option to allow leaving tab
+" 7.3_v8 (Vim 7.3.0100): Add html_expand_tabs option to allow leaving tab
" characters in generated output (Andy Spencer).
" Escape text that looks like a modeline so Vim
" doesn't use anything in the converted HTML as a
" modeline. Bugfixes: Fix folding when a fold starts
" before the conversion range. Remove fold column when
" there are no folds.
-" 7.3_v7 (840c3cadb842): see betas released on vim_dev below:
+" 7.3_v7 (Vim 7-3-0063): see betas released on vim_dev below:
" 7.3_v7b3: Fixed bug, convert Unicode to UTF-8 all the way.
" 7.3_v7b2: Remove automatic detection of encodings that are not
" supported by all major browsers according to
@@ -147,23 +151,22 @@ let g:loaded_2html_plugin = 'vim7.4_v1'
" charset, and make sure the 'fenc' of the generated
" file matches its indicated charset. Add charsets for
" all of Vim's natively supported encodings.
-" 7.3_v6 (0d3f0e3d289b): Really fix bug with 'nowrapscan', 'magic' and other
+" 7.3_v6 (Vim 7.3.0000): Really fix bug with 'nowrapscan', 'magic' and other
" user settings interfering with diff mode generation,
" trailing whitespace (e.g. line number column) when
" using html_no_pre, and bugs when using
" html_hover_unfold.
" 7.3_v5 ( unreleased ): Fix bug with 'nowrapscan' and also with out-of-sync
" folds in diff mode when first line was folded.
-" 7.3_v4 (7e008c174cc3): Bugfixes, especially for xhtml markup, and diff mode
-" 7.3_v3 (a29075150aee): Refactor option handling and make html_use_css
+" 7.3_v4 (Vim 7.3.0000): Bugfixes, especially for xhtml markup, and diff mode
+" 7.3_v3 (Vim 7.3.0000): Refactor option handling and make html_use_css
" default to true when not set to anything. Use strict
" doctypes where possible. Rename use_xhtml option to
" html_use_xhtml for consistency. Use .xhtml extension
" when using this option. Add meta tag for settings.
-" 7.3_v2 (80229a724a11): Fix syntax highlighting in diff mode to use both the
+" 7.3_v2 (Vim 7.3.0000): Fix syntax highlighting in diff mode to use both the
" diff colors and the normal syntax colors
-" 7.3_v1 (e7751177126b): Add conceal support and meta tags in output
-" Pre-v1 baseline: Mercurial changeset 3c9324c0800e
+" 7.3_v1 (Vim 7.3.0000): Add conceal support and meta tags in output
"}}}
"}}}