summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-03-24 15:09:13 +0100
committerBram Moolenaar <Bram@vim.org>2019-03-24 15:09:13 +0100
commit63b74a8362b14576b21d342dc424d0396ca8ea27 (patch)
treeef1a162503974f7209058ad2430484c892409344 /runtime
parentdb77b84ac2b6373ae4200d47945fc6ca64337e31 (diff)
Update runtime files.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/autoload/dist/ft.vim2
-rw-r--r--runtime/doc/channel.txt9
-rw-r--r--runtime/doc/eval.txt4
-rw-r--r--runtime/doc/index.txt7
-rw-r--r--runtime/doc/options.txt14
-rw-r--r--runtime/doc/tags3
-rw-r--r--runtime/doc/tagsrch.txt5
-rw-r--r--runtime/doc/todo.txt27
-rw-r--r--runtime/doc/various.txt4
-rw-r--r--runtime/filetype.vim6
-rw-r--r--runtime/ftplugin/cobol.vim5
-rw-r--r--runtime/ftplugin/python.vim133
-rw-r--r--runtime/indent/cobol.vim11
-rw-r--r--runtime/indent/html.vim11
-rw-r--r--runtime/indent/sh.vim4
-rw-r--r--runtime/indent/testdir/README.txt6
-rw-r--r--runtime/indent/testdir/html.ok6
-rw-r--r--runtime/indent/testdir/runtest.vim2
-rw-r--r--runtime/indent/testdir/xml.ok4
-rw-r--r--runtime/indent/xml.vim63
-rw-r--r--runtime/syntax/cobol.vim164
21 files changed, 345 insertions, 145 deletions
diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim
index a97bad3b56..e85ffc763b 100644
--- a/runtime/autoload/dist/ft.vim
+++ b/runtime/autoload/dist/ft.vim
@@ -1,7 +1,7 @@
" Vim functions for file type detection
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2019 Jan 18
+" Last Change: 2019 Mar 08
" These functions are moved here from runtime/filetype.vim to make startup
" faster.
diff --git a/runtime/doc/channel.txt b/runtime/doc/channel.txt
index fd08cd4974..cb6f781804 100644
--- a/runtime/doc/channel.txt
+++ b/runtime/doc/channel.txt
@@ -1,4 +1,4 @@
-*channel.txt* For Vim version 8.1. Last change: 2018 Apr 18
+*channel.txt* For Vim version 8.1. Last change: 2019 Mar 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -308,9 +308,10 @@ higher.
Command "redraw" ~
-The other commands do not update the screen, so that you can send a sequence
-of commands without the cursor moving around. You must end with the "redraw"
-command to show any changed text and show the cursor where it belongs.
+The other commands do not explicitly update the screen, so that you can send a
+sequence of commands without the cursor moving around. A redraw can happen as
+a side effect of some commands. You must end with the "redraw" command to
+show any changed text and show the cursor where it belongs.
The argument is normally an empty string:
["redraw", ""] ~
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 6238723268..1294481daf 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 8.1. Last change: 2019 Mar 02
+*eval.txt* For Vim version 8.1. Last change: 2019 Mar 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -10337,8 +10337,6 @@ tag_binary Compiled with binary searching in tags files
|tag-binary-search|.
tag_old_static Compiled with support for old static tags
|tag-old-static|.
-tag_any_white Compiled with support for any white characters in tags
- files |tag-any-white|.
tcl Compiled with Tcl interface.
termguicolors Compiled with true color in terminal support.
terminal Compiled with |terminal| support.
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index 2406a279a5..ca52a34542 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -1,4 +1,4 @@
-*index.txt* For Vim version 8.1. Last change: 2019 Mar 17
+*index.txt* For Vim version 8.1. Last change: 2019 Mar 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1042,10 +1042,11 @@ tag command action in Command-line editing mode ~
command-line from history.
|c_CTRL-Q| CTRL-Q same as CTRL-V, unless it's used for terminal
control flow
-|c_CTRL-R| CTRL-R {0-9a-z"%#*:= CTRL-F CTRL-P CTRL-W CTRL-A}
+|c_CTRL-R| CTRL-R {regname}
insert the contents of a register or object
under the cursor as if typed
-|c_CTRL-R_CTRL-R| CTRL-R CTRL-R {0-9a-z"%#*:= CTRL-F CTRL-P CTRL-W CTRL-A}
+|c_CTRL-R_CTRL-R| CTRL-R CTRL-R {regname}
+|c_CTRL-R_CTRL-O| CTRL-R CTRL-O {regname}
insert the contents of a register or object
under the cursor literally
CTRL-S (used for terminal control flow)
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 97dbb5af1f..66a9e17f46 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 8.1. Last change: 2019 Mar 08
+*options.txt* For Vim version 8.1. Last change: 2019 Mar 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2538,7 +2538,15 @@ A jump table for the options with a short description can be found at |Q_op|.
The default value is for C programs. For C++ this value would be
useful, to include const type declarations: >
^\(#\s*define\|[a-z]*\s*const\s*[a-z]*\)
+< You can also use "\ze" just before the name and continue the pattern
+ to check what is following. E.g. for Javascript, if a function is
+ defined with "func_name = function(args)": >
+ ^\s*\ze\i\+\s*=\s*function(
+< If the function is defined with "func_name : function() {...": >
+ ^\s*\ze\i\+\s*[:]\s*(*function\s*(
< When using the ":set" command, you need to double the backslashes!
+ To avoid that use `:let` with a single quote string: >
+ let &l:define = '^\s*\ze\k\+\s*=\s*function('
*'delcombine'* *'deco'* *'nodelcombine'* *'nodeco'*
'delcombine' 'deco' boolean (default off)
@@ -7682,7 +7690,9 @@ A jump table for the options with a short description can be found at |Q_op|.
pages.
split If included, split the current window before loading
a buffer for a |quickfix| command that display errors.
- Otherwise: do not split, use current window.
+ Otherwise: do not split, use current window (when used
+ in the quickfix window: the previously used window or
+ split if there is no other window).
vsplit Just like "split" but split vertically.
newtab Like "split", but open a new tab page. Overrules
"split" when both are present.
diff --git a/runtime/doc/tags b/runtime/doc/tags
index a9df438c2b..f3726e9cc0 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -7401,6 +7401,7 @@ love intro.txt /*love*
lowercase change.txt /*lowercase*
lpc.vim syntax.txt /*lpc.vim*
lua if_lua.txt /*lua*
+lua-blob if_lua.txt /*lua-blob*
lua-buffer if_lua.txt /*lua-buffer*
lua-commands if_lua.txt /*lua-commands*
lua-dict if_lua.txt /*lua-dict*
@@ -9023,7 +9024,6 @@ tabpagenr() eval.txt /*tabpagenr()*
tabpagewinnr() eval.txt /*tabpagewinnr()*
tag tagsrch.txt /*tag*
tag-! tagsrch.txt /*tag-!*
-tag-any-white tagsrch.txt /*tag-any-white*
tag-binary-search tagsrch.txt /*tag-binary-search*
tag-blocks motion.txt /*tag-blocks*
tag-commands tagsrch.txt /*tag-commands*
@@ -9203,6 +9203,7 @@ test_null_partial() eval.txt /*test_null_partial()*
test_null_string() eval.txt /*test_null_string()*
test_option_not_set() eval.txt /*test_option_not_set()*
test_override() eval.txt /*test_override()*
+test_refcount() eval.txt /*test_refcount()*
test_scrollbar() eval.txt /*test_scrollbar()*
test_settime() eval.txt /*test_settime()*
testing eval.txt /*testing*
diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt
index ef1e5158e6..950fd62bd9 100644
--- a/runtime/doc/tagsrch.txt
+++ b/runtime/doc/tagsrch.txt
@@ -1,4 +1,4 @@
-*tagsrch.txt* For Vim version 8.1. Last change: 2019 Feb 25
+*tagsrch.txt* For Vim version 8.1. Last change: 2019 Mar 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -558,8 +558,7 @@ only supported by new versions of ctags (such as Exuberant ctags).
be any identifier. It cannot contain a <Tab>.
{TAB} One <Tab> character. Note: previous versions allowed any
white space here. This has been abandoned to allow spaces in
- {tagfile}. It can be re-enabled by including the
- |+tag_any_white| feature at compile time. *tag-any-white*
+ {tagfile}.
{tagfile} The file that contains the definition of {tagname}. It can
have an absolute or relative path. It may contain environment
variables and wildcards (although the use of wildcards is
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 7f512ea4c7..d3318eee40 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 8.1. Last change: 2019 Mar 14
+*todo.txt* For Vim version 8.1. Last change: 2019 Mar 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -38,16 +38,6 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs*
-------------------- Known bugs and current work -----------------------
-Patch to add Farsi handling to arabic.c (Ali Gholami Rudi, 2009 May 2)
-Added test, updates, June 23.
-Updated for 7.4: http://litcave.rudi.ir/farsi_vim.diff
-Remark from Ameretat Reith (2014 Oct 13) with patch on top.
-Updated patch from Ameretat Reith, 2019 Mar 1.
-
-Timer test doesn't work on MS-Windows console, any way to make it work?
-
-Drop FEAT_TAG_ANYWHITE ? It should not be a compile time option.
-
'incsearch' with :s: (#3321)
- Get E20 when using command history to get "'<,'>s/a/b" and no Visual area
was set. (#3837)
@@ -121,6 +111,8 @@ Support for popup widows:
Adding "10" to 'spellsuggest' causes spell suggestions to become very slow.
(#4087)
+Patch to add complete_info() Shougo - #3866. Ready to include. Now #4106
+
Problem with Visual yank when 'linebreak' and 'showbreak' are set.
Patch with tests, but it's not clear how it is supposed to work. (tommm, 2018
Nov 17) Asked about this, Dec 22. Christian will have a look.
@@ -137,6 +129,8 @@ Test doesn't fail without patch?
Patch to add ruby cflags. (#4050, fixes #1081)
Needs modification.
+Patch to add src/README.md. (WenxuanHuang, #4141) Replace README.txt?
+
Crash when mixing matchadd and substitute()? (Max Christian Pohle, 2018 May
13, #2910) Can't reproduce?
@@ -224,6 +218,9 @@ Patch on the issue by Hongbo Liu, 2019 Feb 19 #4013
More warnings from static analysis:
https://lgtm.com/projects/g/vim/vim/alerts/?mode=list
+Drop FEAT_TAG_OLDSTATIC? Anybody using this format should be able to get a
+newer version of ctags.
+
Still a E315 error when using terminal. (Masato Nishihata, #3959)
When using 'k' in 'guioptions' gvim may open with a tiny window. (#3808)
@@ -231,9 +228,15 @@ Suggested patch on the issue.
nvo-mode mapping works on Windows, not on Linux. (#3678)
+Patch to have tutor check $LC_MESSAGES. (#4112)
+
Patch to fix modify_fname() does not work well with some 'encoding's.
(Ken Takata, #4007)
+Patch to add more info to OptionSet. Should mention what triggered the change
+":set", ":setlocal", ":setglobal", "modeline"; and the old global value.
+#4118
+
Patch to make vim_getenv() work with wide API. (Ken Takata, #4008)
How to make (async) complete function depending on completion type?
@@ -315,8 +318,6 @@ Invalid memory access with old regexp engine. (Dominique Pelle, 2018 Sep 3,
#3405) Introduced by 8.0.1517, which was fixing another memory access error.
(Sep 8)
-Patch to add complete_info Shougo - #3866. Ready to include.
-
Patch to make winnr() return the window above/below/beside a window.
(Yegappan Lakshmanan, #3993)
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index eb50bdc179..428a7348e7 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -1,4 +1,4 @@
-*various.txt* For Vim version 8.1. Last change: 2019 Jan 17
+*various.txt* For Vim version 8.1. Last change: 2019 Mar 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -443,7 +443,7 @@ N *+syntax* Syntax highlighting |syntax|
*+system()* Unix only: opposite of |+fork|
T *+tag_binary* binary searching in tags file |tag-binary-search|
N *+tag_old_static* old method for static tags |tag-old-static|
-m *+tag_any_white* any white space allowed in tags file |tag-any-white|
+m *+tag_any_white* Removed; was to allow any white space in tags files
m *+tcl* Tcl interface |tcl|
m *+tcl/dyn* Tcl interface |tcl-dynamic| |/dyn|
m *+terminal* Support for terminal window |terminal|
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 26f5483243..cc4faf72e3 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2019 Feb 07
+" Last Change: 2019 Mar 19
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -1617,6 +1617,10 @@ au BufNewFile,BufRead */etc/sysctl.conf,*/etc/sysctl.d/*.conf setf sysctl
" Systemd unit files
au BufNewFile,BufRead */systemd/*.{automount,mount,path,service,socket,swap,target,timer} setf systemd
+" Systemd overrides
+au BufNewFile,BufRead /etc/systemd/system/*.d/*.conf setf systemd
+" Systemd temp files
+au BufNewFile,BufRead /etc/systemd/system/*.d/.#* setf systemd
" Synopsys Design Constraints
au BufNewFile,BufRead *.sdc setf sdc
diff --git a/runtime/ftplugin/cobol.vim b/runtime/ftplugin/cobol.vim
index 11ad3ad727..d96a1bf281 100644
--- a/runtime/ftplugin/cobol.vim
+++ b/runtime/ftplugin/cobol.vim
@@ -1,7 +1,8 @@
" Vim filetype plugin file
" Language: cobol
-" Author: Tim Pope <vimNOSPAM@tpope.info>
-" Last Update: By ZyX: use shiftwidth()
+" Maintainer: Ankit Jain <ajatkj@yahoo.co.in>
+" (formerly Tim Pope <vimNOSPAM@tpope.info>)
+" Last Update: By Ankit Jain (changed maintainer) on 22.03.2019
" Insert mode mappings: <C-T> <C-D> <Tab>
" Normal mode mappings: < > << >> [[ ]] [] ][
diff --git a/runtime/ftplugin/python.vim b/runtime/ftplugin/python.vim
index 5c4a59b1a9..64c1a87a69 100644
--- a/runtime/ftplugin/python.vim
+++ b/runtime/ftplugin/python.vim
@@ -3,7 +3,7 @@
" Maintainer: Tom Picton <tom@tompicton.co.uk>
" Previous Maintainer: James Sully <sullyj3@gmail.com>
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
-" Last Change: Sun, 15 April 2018
+" Last Change: Sun 17 Mar 2019
" https://github.com/tpict/vim-ftplugin-python
if exists("b:did_ftplugin") | finish | endif
@@ -37,9 +37,10 @@ setlocal suffixesadd=.py
setlocal comments=b:#,fb:-
setlocal commentstring=#\ %s
-setlocal omnifunc=pythoncomplete#Complete
if has('python3')
- setlocal omnifunc=python3complete#Complete
+ setlocal omnifunc=python3complete#Complete
+elseif has('python')
+ setlocal omnifunc=pythoncomplete#Complete
endif
set wildignore+=*.pyc
@@ -53,32 +54,34 @@ let b:prev='\v^\s*(class\|def\|async def)>'
let b:next_end='\v\S\n*(%$\|^(\s*\n*)*(class\|def\|async def)\|^\S)'
let b:prev_end='\v\S\n*(^(\s*\n*)*(class\|def\|async def)\|^\S)'
-execute "nnoremap <silent> <buffer> ]] :call <SID>Python_jump('n', '". b:next_toplevel."', 'W', v:count1)<cr>"
-execute "nnoremap <silent> <buffer> [[ :call <SID>Python_jump('n', '". b:prev_toplevel."', 'Wb', v:count1)<cr>"
-execute "nnoremap <silent> <buffer> ][ :call <SID>Python_jump('n', '". b:next_endtoplevel."', 'W', 0, v:count1)<cr>"
-execute "nnoremap <silent> <buffer> [] :call <SID>Python_jump('n', '". b:prev_endtoplevel."', 'Wb', 0, v:count1)<cr>"
-execute "nnoremap <silent> <buffer> ]m :call <SID>Python_jump('n', '". b:next."', 'W', v:count1)<cr>"
-execute "nnoremap <silent> <buffer> [m :call <SID>Python_jump('n', '". b:prev."', 'Wb', v:count1)<cr>"
-execute "nnoremap <silent> <buffer> ]M :call <SID>Python_jump('n', '". b:next_end."', 'W', 0, v:count1)<cr>"
-execute "nnoremap <silent> <buffer> [M :call <SID>Python_jump('n', '". b:prev_end."', 'Wb', 0, v:count1)<cr>"
-
-execute "onoremap <silent> <buffer> ]] :call <SID>Python_jump('o', '". b:next_toplevel."', 'W', v:count1)<cr>"
-execute "onoremap <silent> <buffer> [[ :call <SID>Python_jump('o', '". b:prev_toplevel."', 'Wb', v:count1)<cr>"
-execute "onoremap <silent> <buffer> ][ :call <SID>Python_jump('o', '". b:next_endtoplevel."', 'W', 0, v:count1)<cr>"
-execute "onoremap <silent> <buffer> [] :call <SID>Python_jump('o', '". b:prev_endtoplevel."', 'Wb', 0, v:count1)<cr>"
-execute "onoremap <silent> <buffer> ]m :call <SID>Python_jump('o', '". b:next."', 'W', v:count1)<cr>"
-execute "onoremap <silent> <buffer> [m :call <SID>Python_jump('o', '". b:prev."', 'Wb', v:count1)<cr>"
-execute "onoremap <silent> <buffer> ]M :call <SID>Python_jump('o', '". b:next_end."', 'W', 0, v:count1)<cr>"
-execute "onoremap <silent> <buffer> [M :call <SID>Python_jump('o', '". b:prev_end."', 'Wb', 0, v:count1)<cr>"
-
-execute "xnoremap <silent> <buffer> ]] :call <SID>Python_jump('x', '". b:next_toplevel."', 'W', v:count1)<cr>"
-execute "xnoremap <silent> <buffer> [[ :call <SID>Python_jump('x', '". b:prev_toplevel."', 'Wb', v:count1)<cr>"
-execute "xnoremap <silent> <buffer> ][ :call <SID>Python_jump('x', '". b:next_endtoplevel."', 'W', 0, v:count1)<cr>"
-execute "xnoremap <silent> <buffer> [] :call <SID>Python_jump('x', '". b:prev_endtoplevel."', 'Wb', 0, v:count1)<cr>"
-execute "xnoremap <silent> <buffer> ]m :call <SID>Python_jump('x', '". b:next."', 'W', v:count1)<cr>"
-execute "xnoremap <silent> <buffer> [m :call <SID>Python_jump('x', '". b:prev."', 'Wb', v:count1)<cr>"
-execute "xnoremap <silent> <buffer> ]M :call <SID>Python_jump('x', '". b:next_end."', 'W', 0, v:count1)<cr>"
-execute "xnoremap <silent> <buffer> [M :call <SID>Python_jump('x', '". b:prev_end."', 'Wb', 0, v:count1)<cr>"
+if !exists('g:no_plugin_maps') && !exists('g:no_python_maps')
+ execute "nnoremap <silent> <buffer> ]] :call <SID>Python_jump('n', '". b:next_toplevel."', 'W', v:count1)<cr>"
+ execute "nnoremap <silent> <buffer> [[ :call <SID>Python_jump('n', '". b:prev_toplevel."', 'Wb', v:count1)<cr>"
+ execute "nnoremap <silent> <buffer> ][ :call <SID>Python_jump('n', '". b:next_endtoplevel."', 'W', v:count1, 0)<cr>"
+ execute "nnoremap <silent> <buffer> [] :call <SID>Python_jump('n', '". b:prev_endtoplevel."', 'Wb', v:count1, 0)<cr>"
+ execute "nnoremap <silent> <buffer> ]m :call <SID>Python_jump('n', '". b:next."', 'W', v:count1)<cr>"
+ execute "nnoremap <silent> <buffer> [m :call <SID>Python_jump('n', '". b:prev."', 'Wb', v:count1)<cr>"
+ execute "nnoremap <silent> <buffer> ]M :call <SID>Python_jump('n', '". b:next_end."', 'W', v:count1, 0)<cr>"
+ execute "nnoremap <silent> <buffer> [M :call <SID>Python_jump('n', '". b:prev_end."', 'Wb', v:count1, 0)<cr>"
+
+ execute "onoremap <silent> <buffer> ]] :call <SID>Python_jump('o', '". b:next_toplevel."', 'W', v:count1)<cr>"
+ execute "onoremap <silent> <buffer> [[ :call <SID>Python_jump('o', '". b:prev_toplevel."', 'Wb', v:count1)<cr>"
+ execute "onoremap <silent> <buffer> ][ :call <SID>Python_jump('o', '". b:next_endtoplevel."', 'W', v:count1, 0)<cr>"
+ execute "onoremap <silent> <buffer> [] :call <SID>Python_jump('o', '". b:prev_endtoplevel."', 'Wb', v:count1, 0)<cr>"
+ execute "onoremap <silent> <buffer> ]m :call <SID>Python_jump('o', '". b:next."', 'W', v:count1)<cr>"
+ execute "onoremap <silent> <buffer> [m :call <SID>Python_jump('o', '". b:prev."', 'Wb', v:count1)<cr>"
+ execute "onoremap <silent> <buffer> ]M :call <SID>Python_jump('o', '". b:next_end."', 'W', v:count1, 0)<cr>"
+ execute "onoremap <silent> <buffer> [M :call <SID>Python_jump('o', '". b:prev_end."', 'Wb', v:count1, 0)<cr>"
+
+ execute "xnoremap <silent> <buffer> ]] :call <SID>Python_jump('x', '". b:next_toplevel."', 'W', v:count1)<cr>"
+ execute "xnoremap <silent> <buffer> [[ :call <SID>Python_jump('x', '". b:prev_toplevel."', 'Wb', v:count1)<cr>"
+ execute "xnoremap <silent> <buffer> ][ :call <SID>Python_jump('x', '". b:next_endtoplevel."', 'W', v:count1, 0)<cr>"
+ execute "xnoremap <silent> <buffer> [] :call <SID>Python_jump('x', '". b:prev_endtoplevel."', 'Wb', v:count1, 0)<cr>"
+ execute "xnoremap <silent> <buffer> ]m :call <SID>Python_jump('x', '". b:next."', 'W', v:count1)<cr>"
+ execute "xnoremap <silent> <buffer> [m :call <SID>Python_jump('x', '". b:prev."', 'Wb', v:count1)<cr>"
+ execute "xnoremap <silent> <buffer> ]M :call <SID>Python_jump('x', '". b:next_end."', 'W', v:count1, 0)<cr>"
+ execute "xnoremap <silent> <buffer> [M :call <SID>Python_jump('x', '". b:prev_end."', 'Wb', v:count1, 0)<cr>"
+endif
if !exists('*<SID>Python_jump')
fun! <SID>Python_jump(mode, motion, flags, count, ...) range
@@ -123,10 +126,80 @@ if !exists('g:pydoc_executable')
let g:pydoc_executable = 0
endif
endif
+
+" Windows-specific pydoc setup
+if has('win32') || has('win64')
+ if executable('python')
+ " available as Tools\scripts\pydoc.py
+ let g:pydoc_executable = 1
+ else
+ let g:pydoc_executable = 0
+ endif
+endif
+
" If "pydoc" was found use it for keywordprg.
if g:pydoc_executable
- setlocal keywordprg=pydoc
+ if has('win32') || has('win64')
+ setlocal keywordprg=python\ -m\ pydoc\
+ else
+ setlocal keywordprg=pydoc
+ endif
endif
+" Script for filetype switching to undo the local stuff we may have changed
+let b:undo_ftplugin = 'setlocal cinkeys<'
+ \ . '|setlocal comments<'
+ \ . '|setlocal commentstring<'
+ \ . '|setlocal expandtab<'
+ \ . '|setlocal include<'
+ \ . '|setlocal includeexpr<'
+ \ . '|setlocal indentkeys<'
+ \ . '|setlocal keywordprg<'
+ \ . '|setlocal omnifunc<'
+ \ . '|setlocal shiftwidth<'
+ \ . '|setlocal softtabstop<'
+ \ . '|setlocal suffixesadd<'
+ \ . '|setlocal tabstop<'
+ \ . '|silent! nunmap <buffer> [M'
+ \ . '|silent! nunmap <buffer> [['
+ \ . '|silent! nunmap <buffer> []'
+ \ . '|silent! nunmap <buffer> [m'
+ \ . '|silent! nunmap <buffer> ]M'
+ \ . '|silent! nunmap <buffer> ]['
+ \ . '|silent! nunmap <buffer> ]]'
+ \ . '|silent! nunmap <buffer> ]m'
+ \ . '|silent! ounmap <buffer> [M'
+ \ . '|silent! ounmap <buffer> [['
+ \ . '|silent! ounmap <buffer> []'
+ \ . '|silent! ounmap <buffer> [m'
+ \ . '|silent! ounmap <buffer> ]M'
+ \ . '|silent! ounmap <buffer> ]['
+ \ . '|silent! ounmap <buffer> ]]'
+ \ . '|silent! ounmap <buffer> ]m'
+ \ . '|silent! xunmap <buffer> [M'
+ \ . '|silent! xunmap <buffer> [['
+ \ . '|silent! xunmap <buffer> []'
+ \ . '|silent! xunmap <buffer> [m'
+ \ . '|silent! xunmap <buffer> ]M'
+ \ . '|silent! xunmap <buffer> ]['
+ \ . '|silent! xunmap <buffer> ]]'
+ \ . '|silent! xunmap <buffer> ]m'
+ \ . '|unlet! b:browsefilter'
+ \ . '|unlet! b:child_match'
+ \ . '|unlet! b:child_sub'
+ \ . '|unlet! b:grandparent_match'
+ \ . '|unlet! b:grandparent_sub'
+ \ . '|unlet! b:next'
+ \ . '|unlet! b:next_end'
+ \ . '|unlet! b:next_endtoplevel'
+ \ . '|unlet! b:next_toplevel'
+ \ . '|unlet! b:parent_match'
+ \ . '|unlet! b:parent_sub'
+ \ . '|unlet! b:prev'
+ \ . '|unlet! b:prev_end'
+ \ . '|unlet! b:prev_endtoplevel'
+ \ . '|unlet! b:prev_toplevel'
+ \ . '|unlet! b:undo_ftplugin'
+
let &cpo = s:keepcpo
unlet s:keepcpo
diff --git a/runtime/indent/cobol.vim b/runtime/indent/cobol.vim
index c08444ac40..590a729df4 100644
--- a/runtime/indent/cobol.vim
+++ b/runtime/indent/cobol.vim
@@ -1,7 +1,12 @@
" Vim indent file
" Language: cobol
-" Author: Tim Pope <vimNOSPAM@tpope.info>
+" Maintainer: Ankit Jain <ajatkj@yahoo.co.in>
+" (formerly Tim Pope <vimNOSPAM@tpope.info>)
" $Id: cobol.vim,v 1.1 2007/05/05 18:08:19 vimboss Exp $
+" Last Update: By Ankit Jain on 22.03.2019
+" Ankit Jain 22.03.2019 Changes & fixes:
+" Allow chars in 1st 6 columns
+" #C22032019
if exists("b:did_indent")
finish
@@ -66,7 +71,9 @@ function! GetCobolIndent(lnum) abort
let ashft = minshft + 1
let bshft = ashft + 4
" (Obsolete) numbered lines
- if getline(a:lnum) =~? '^\s*\d\{6\}\%($\|[ */$CD-]\)'
+ " #C22032019: Columns 1-6 could have alphabets as well as numbers
+ "if getline(a:lnum) =~? '^\s*\d\{6\}\%($\|[ */$CD-]\)'
+ if getline(a:lnum) =~? '^\s*[a-zA-Z0-9]\{6\}\%($\|[ */$CD-]\)'
return 0
endif
let cline = s:stripped(a:lnum)
diff --git a/runtime/indent/html.vim b/runtime/indent/html.vim
index 1a8177050a..1d2043ae9e 100644
--- a/runtime/indent/html.vim
+++ b/runtime/indent/html.vim
@@ -2,7 +2,7 @@
" Header: "{{{
" Maintainer: Bram Moolenaar
" Original Author: Andy Wokula <anwoku@yahoo.de>
-" Last Change: 2018 Mar 28
+" Last Change: 2019 Mar 20
" Version: 1.0
" Description: HTML indent script with cached state for faster indenting on a
" range of lines.
@@ -902,12 +902,19 @@ func! s:InsideTag(foundHtmlString)
"{{{
if a:foundHtmlString
" Inside an attribute string.
- " Align with the previous line or use an external function.
+ " Align with the opening quote or use an external function.
let lnum = v:lnum - 1
if lnum > 1
if exists('b:html_indent_tag_string_func')
return b:html_indent_tag_string_func(lnum)
endif
+ " If there is a double quote in the previous line, indent with the
+ " character after it.
+ if getline(lnum) =~ '"'
+ call cursor(lnum, 0)
+ normal f"
+ return virtcol('.')
+ endif
return indent(lnum)
endif
endif
diff --git a/runtime/indent/sh.vim b/runtime/indent/sh.vim
index c93be31958..0396b4eb94 100644
--- a/runtime/indent/sh.vim
+++ b/runtime/indent/sh.vim
@@ -7,6 +7,8 @@
" License: Vim (see :h license)
" Repository: https://github.com/chrisbra/vim-sh-indent
" Changelog:
+" 20190316 - Make use of searchpairpos for nested if sections
+" fixes #11
" 20190201 - Better check for closing if sections
" 20180724 - make check for zsh syntax more rigid (needs word-boundaries)
" 20180326 - better support for line continuation
@@ -115,7 +117,7 @@ function! GetShIndent()
" Current line is a endif line, so get indent from start of "if condition" line
" TODO: should we do the same for other "end" lines?
if curline =~ '^\s*\%(fi\)\s*\%(#.*\)\=$'
- let previous_line = search('if.\{-\};\s*then\s*\%(#.*\)\=$', 'bnW')
+ let previous_line = searchpair('\<if\>', '', '\<fi\>', 'bnW')
if previous_line > 0
let ind = indent(previous_line)
endif
diff --git a/runtime/indent/testdir/README.txt b/runtime/indent/testdir/README.txt
index 28c1628560..65975605c2 100644
--- a/runtime/indent/testdir/README.txt
+++ b/runtime/indent/testdir/README.txt
@@ -82,9 +82,9 @@ RUNNING THE TEST
Before running the test, create a FILETYPE.ok file. You can leave it empty at
first.
-Now run "make test". After Vim has done the indenting you will see a
-FILETYPE.fail file. This contains the actual result of indenting, and it's
-different from the FILETYPE.ok file.
+Now run "make test" from the parent directory. After Vim has done the
+indenting you will see a FILETYPE.fail file. This contains the actual result
+of indenting, and it's different from the FILETYPE.ok file.
Check the contents of the FILETYPE.fail file. If it is perfectly OK, then
rename it to overwrite the FILETYPE.ok file. If you now run "make test" again,
diff --git a/runtime/indent/testdir/html.ok b/runtime/indent/testdir/html.ok
index 524d57bb6c..ad819333cc 100644
--- a/runtime/indent/testdir/html.ok
+++ b/runtime/indent/testdir/html.ok
@@ -9,17 +9,17 @@
</div>
<div
- class="foo bar">
+ class="foo bar">
text
</div>
<div class="foo bar"
- data="something">
+ data="something">
text
</div>
<div class="foo
- bar">
+ bar">
text
</div>
diff --git a/runtime/indent/testdir/runtest.vim b/runtime/indent/testdir/runtest.vim
index 2943152d3c..0f0051415d 100644
--- a/runtime/indent/testdir/runtest.vim
+++ b/runtime/indent/testdir/runtest.vim
@@ -7,6 +7,7 @@ if 1
set nocp
filetype indent on
+syn on
set nowrapscan
set report=9999
@@ -111,7 +112,6 @@ for fname in glob('testdir/*.in', 1, 1)
if failed
exe 'write ' . root . '.fail'
echoerr 'Test ' . fname . ' FAILED!'
- sleep 2
else
exe 'write ' . root . '.out'
endif
diff --git a/runtime/indent/testdir/xml.ok b/runtime/indent/testdir/xml.ok
index 529198572a..cfdf701c11 100644
--- a/runtime/indent/testdir/xml.ok
+++ b/runtime/indent/testdir/xml.ok
@@ -10,11 +10,11 @@
<!-- text comment -->
<!--
- text comment
+ text comment
-->
</tag1>
<!--
- text comment
+ text comment
end coment -->
</tag0>
<!-- END_INDENT -->
diff --git a/runtime/indent/xml.vim b/runtime/indent/xml.vim
index 29069bab84..ad22de1d50 100644
--- a/runtime/indent/xml.vim
+++ b/runtime/indent/xml.vim
@@ -1,9 +1,11 @@
" Language: xml
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
-" Last Changed: Jan 28, 2019
+" Last Changed: Feb 04, 2019
" Maintainer: Christian Brabandt <cb@256bit.org>
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
" Last Change:
+" 20190204 - correctly handle wrap tags
+" https://github.com/chrisbra/vim-xml-ftplugin/issues/5
" 20190128 - Make sure to find previous tag
" https://github.com/chrisbra/vim-xml-ftplugin/issues/4
" 20181116 - Fix indentation when tags start with a colon or an underscore
@@ -74,13 +76,20 @@ fun! <SID>XmlIndentSynCheck(lnum)
endfun
" [-- return the sum of indents of a:lnum --]
-fun! <SID>XmlIndentSum(lnum, style, add)
- let line = getline(a:lnum)
- if a:style == match(line, '^\s*</')
+fun! <SID>XmlIndentSum(line, style, add)
+ if <SID>IsXMLContinuation(a:line) && a:style == 0
+ " no complete tag, add one additional indent level
+ " but only for the current line
+ return a:add + shiftwidth()
+ elseif <SID>HasNoTagEnd(a:line)
+ " no complete tag, return initial indent
+ return a:add
+ endif
+ if a:style == match(a:line, '^\s*</')
return (shiftwidth() *
- \ (<SID>XmlIndentWithPattern(line, b:xml_indent_open)
- \ - <SID>XmlIndentWithPattern(line, b:xml_indent_close)
- \ - <SID>XmlIndentWithPattern(line, '.\{-}/>'))) + a:add
+ \ (<SID>XmlIndentWithPattern(a:line, b:xml_indent_open)
+ \ - <SID>XmlIndentWithPattern(a:line, b:xml_indent_close)
+ \ - <SID>XmlIndentWithPattern(a:line, '.\{-}/>'))) + a:add
else
return a:add
endif
@@ -89,19 +98,24 @@ endfun
" Main indent function
fun! XmlIndentGet(lnum, use_syntax_check)
" Find a non-empty line above the current line.
- let plnum = prevnonblank(a:lnum - 1)
- " Hit the start of the file, use zero indent.
- if plnum == 0
+ if prevnonblank(a:lnum - 1) == 0
+ " Hit the start of the file, use zero indent.
return 0
endif
" Find previous line with a tag (regardless whether open or closed,
" but always start restrict the match to a line before the current one
+ " Note: xml declaration: <?xml version="1.0"?>
+ " won't be found, as it is not a legal tag name
let ptag_pattern = '\%(.\{-}<[/:A-Z_a-z]\)'. '\%(\&\%<'. line('.').'l\)'
- let ptag = search(ptag_pattern, 'bnw')
+ let ptag = search(ptag_pattern, 'bnW')
+ " no previous tag
+ if ptag == 0
+ return 0
+ endif