Skip to content

Commit dc1cfa9

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 916ac4a + 79c2ad5 commit dc1cfa9

135 files changed

Lines changed: 1384 additions & 756 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

runtime/autoload/RstFold.vim

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
" Author: Antony Lee <[email protected]>
2+
" Description: Helper functions for reStructuredText syntax folding
3+
" Last Modified: 2018-01-07
4+
5+
function s:CacheRstFold()
6+
let closure = {'header_types': {}, 'max_level': 0, 'levels': {}}
7+
function closure.Process(match) dict
8+
let curline = getcurpos()[1]
9+
if has_key(self.levels, curline - 1)
10+
" For over+under-lined headers, the regex will match both at the
11+
" overline and at the title itself; in that case, skip the second match.
12+
return
13+
endif
14+
let lines = split(a:match, '\n')
15+
let key = repeat(lines[-1][0], len(lines))
16+
if !has_key(self.header_types, key)
17+
let self.max_level += 1
18+
let self.header_types[key] = self.max_level
19+
endif
20+
let self.levels[curline] = self.header_types[key]
21+
endfunction
22+
let save_cursor = getcurpos()
23+
silent keeppatterns %s/\v^%(%(([=`:.'"~^_*+#-])\1+\n)?.{1,2}\n([=`:.'"~^_*+#-])\2+)|%(%(([=`:.''"~^_*+#-])\3{2,}\n)?.{3,}\n([=`:.''"~^_*+#-])\4{2,})$/\=closure.Process(submatch(0))/gn
24+
call setpos('.', save_cursor)
25+
let b:RstFoldCache = closure.levels
26+
endfunction
27+
28+
function RstFold#GetRstFold()
29+
if !has_key(b:, 'RstFoldCache')
30+
call s:CacheRstFold()
31+
endif
32+
if has_key(b:RstFoldCache, v:lnum)
33+
return '>' . b:RstFoldCache[v:lnum]
34+
else
35+
return '='
36+
endif
37+
endfunction
38+
39+
function RstFold#GetRstFoldText()
40+
if !has_key(b:, 'RstFoldCache')
41+
call s:CacheRstFold()
42+
endif
43+
let indent = repeat(' ', b:RstFoldCache[v:foldstart] - 1)
44+
let thisline = getline(v:foldstart)
45+
" For over+under-lined headers, skip the overline.
46+
let text = thisline =~ '^\([=`:.''"~^_*+#-]\)\1\+$' ? getline(v:foldstart + 1) : thisline
47+
return indent . text
48+
endfunction

runtime/autoload/xmlformat.vim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
" Last Change: Thu, 22 May 2018 21:26:55 +0100
33
" Version: 0.1
44
" Author: Christian Brabandt <[email protected]>
5-
" Script: http://www.vim.org/scripts/script.php?script_id=
5+
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
66
" License: VIM License
7-
" GetLatestVimScripts: ???? 18 :AutoInstall: xmlformat.vim
87
" Documentation: see :h xmlformat.txt (TODO!)
98
" ---------------------------------------------------------------------
109
" Load Once: {{{1

runtime/doc/arabic.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,4 +319,4 @@ There is one known minor bug,
319319

320320
No other bugs are known to exist.
321321

322-
vim:tw=78:ts=8:ft=help:norl:
322+
vim:tw=78:ts=8:noet:ft=help:norl:

runtime/doc/autocmd.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1593,4 +1593,4 @@ This will write the file without triggering the autocommands defined by the
15931593
gzip plugin.
15941594

15951595

1596-
vim:tw=78:ts=8:ft=help:norl:
1596+
vim:tw=78:ts=8:noet:ft=help:norl:

runtime/doc/change.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,6 @@ gR Enter Virtual Replace mode: Each character you type
177177
<Tab> may replace several characters at once.
178178
Repeat the entered text [count]-1 times. See
179179
|Virtual-Replace-mode| for more details.
180-
{not available when compiled without the |+vreplace|
181-
feature}
182180

183181
*c*
184182
["x]c{motion} Delete {motion} text [into register x] and start
@@ -303,8 +301,6 @@ gr{char} Replace the virtual characters under the cursor with
303301
space. See |gR| and |Virtual-Replace-mode| for more
304302
details. As with |r| a count may be given.
305303
{char} can be entered like with |r|.
306-
{not available when compiled without the |+vreplace|
307-
feature}
308304

309305
*digraph-arg*
310306
The argument for Normal mode commands like |r| and |t| is a single character.
@@ -1884,4 +1880,4 @@ The sorting can be interrupted, but if you interrupt it too late in the
18841880
process you may end up with duplicated lines. This also depends on the system
18851881
library function used.
18861882

1887-
vim:tw=78:ts=8:ft=help:norl:
1883+
vim:tw=78:ts=8:noet:ft=help:norl:

runtime/doc/channel.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,4 +816,4 @@ the cursor to the last line. "A" will move to the end of the line, "I" to the
816816
start of the line.
817817

818818

819-
vim:tw=78:ts=8:ft=help:norl:
819+
vim:tw=78:ts=8:noet:ft=help:norl:

runtime/doc/cmdline.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,4 +1164,4 @@ The character used for the pattern indicates the type of command-line:
11641164
@ string for |input()|
11651165
- text for |:insert| or |:append|
11661166

1167-
vim:tw=78:ts=8:ft=help:norl:
1167+
vim:tw=78:ts=8:noet:ft=help:norl:

runtime/doc/debug.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,4 +172,4 @@ Visual C++ 2005 Express Edition can be downloaded for free from:
172172
http://msdn.microsoft.com/vstudio/express/visualC/default.aspx
173173

174174
=========================================================================
175-
vim:tw=78:ts=8:ft=help:norl:
175+
vim:tw=78:ts=8:noet:ft=help:norl:

runtime/doc/debugger.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,4 @@ Programming Environment.
139139

140140
For Sun NetBeans support see |netbeans|.
141141

142-
vim:tw=78:sw=4:ts=8:ft=help:norl:
142+
vim:tw=78:sw=4:ts=8:noet:ft=help:norl:

runtime/doc/develop.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,4 +563,4 @@ long 32 or 64 bit signed, can hold a pointer
563563
Note that some compilers cannot handle long lines or strings. The C89
564564
standard specifies a limit of 509 characters.
565565

566-
vim:tw=78:ts=8:ft=help:norl:
566+
vim:tw=78:ts=8:noet:ft=help:norl:

0 commit comments

Comments
 (0)