aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/autoload/health.vim4
-rw-r--r--runtime/autoload/health/provider.vim2
-rw-r--r--runtime/doc/Makefile2
-rw-r--r--runtime/doc/eval.txt20
-rw-r--r--runtime/doc/options.txt3
-rw-r--r--runtime/doc/usr_41.txt1
-rw-r--r--runtime/ftplugin/man.vim2
7 files changed, 27 insertions, 7 deletions
diff --git a/runtime/autoload/health.vim b/runtime/autoload/health.vim
index 9e32067204..d13640540b 100644
--- a/runtime/autoload/health.vim
+++ b/runtime/autoload/health.vim
@@ -87,9 +87,9 @@ function! s:indent_after_line1(s, columns) abort
return join(lines, "\n")
endfunction
-" Changes ':help clipboard' to '|clipoard|'. Also removes surrounding quotes.
+" Changes ':h clipboard' to ':help |clipboard|'.
function! s:help_to_link(s) abort
- return substitute(a:s, '\v[''"]?:h%[elp] ([^''"]+)[''"]?', '|\1|', 'g')
+ return substitute(a:s, '\v[''"]?:h%[elp] ([^''"]+)[''"]?', '":help |\1|"', 'g')
endfunction
" Format a message for a specific report item
diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider.vim
index d3e1fef483..c16f62cf59 100644
--- a/runtime/autoload/health/provider.vim
+++ b/runtime/autoload/health/provider.vim
@@ -108,7 +108,7 @@ function! s:check_clipboard() abort
if empty(clipboard_tool)
call health#report_warn(
\ "No clipboard tool found. Using the system clipboard won't work.",
- \ ['See |clipboard|.'])
+ \ ['See ":help clipboard".'])
else
call health#report_ok('Clipboard tool found: '. clipboard_tool)
endif
diff --git a/runtime/doc/Makefile b/runtime/doc/Makefile
index 3d10d0ea98..dabbcd08d9 100644
--- a/runtime/doc/Makefile
+++ b/runtime/doc/Makefile
@@ -36,5 +36,5 @@ tags.ref tags.html: tags
$(AWK) -f maketags.awk tags >tags.html
clean:
- -rm -f *.html tags.ref $(HTMLS) errors.log
+ -rm -f *.html tags.ref $(HTMLS) errors.log tags
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index cca53db531..53f14c7d47 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2032,6 +2032,8 @@ matchlist({expr}, {pat}[, {start}[, {count}]])
List match and submatches of {pat} in {expr}
matchstr({expr}, {pat}[, {start}[, {count}]])
String {count}'th match of {pat} in {expr}
+matchstrpos( {expr}, {pat}[, {start}[, {count}]])
+ List {count}'th match of {pat} in {expr}
max({list}) Number maximum value of items in {list}
min({list}) Number minimum value of items in {list}
mkdir({name} [, {path} [, {prot}]])
@@ -5019,6 +5021,24 @@ matchstr({expr}, {pat}[, {start}[, {count}]]) *matchstr()*
When {expr} is a |List| then the matching item is returned.
The type isn't changed, it's not necessarily a String.
+matchstrpos({expr}, {pat}[, {start}[, {count}]]) *matchstrpos()*
+ Same as |matchstr()|, but return the matched string, the start
+ position and the end position of the match. Example: >
+ :echo matchstrpos("testing", "ing")
+< results in ["ing", 4, 7].
+ When there is no match ["", -1, -1] is returned.
+ The {start}, if given, has the same meaning as for |match()|. >
+ :echo matchstrpos("testing", "ing", 2)
+< results in ["ing", 4, 7]. >
+ :echo matchstrpos("testing", "ing", 5)
+< result is ["", -1, -1].
+ When {expr} is a |List| then the matching item, the index
+ of first item where {pat} matches, the start position and the
+ end position of the match are returned. >
+ :echo matchstrpos([1, '__x'], '\a')
+< result is ["x", 1, 2, 3].
+ The type isn't changed, it's not necessarily a String.
+
*max()*
max({list}) Return the maximum value of all items in {list}.
If {list} is not a list or one of the items in {list} cannot
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 9d8d1f84c8..7cfc55ed79 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -5409,8 +5409,7 @@ A jump table for the options with a short description can be found at |Q_op|.
The |FilterReadPre|, |FilterReadPost| and |FilterWritePre|,
|FilterWritePost| autocommands event are not triggered when
'shelltemp' is off.
- The `system()` function does not respect this option and always uses
- temp files.
+ |system()| does not respect this option, it always uses pipes.
*'shellxescape'* *'sxe'*
'shellxescape' 'sxe' string (default: "";
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index 4d3ad49f1f..2896611274 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -592,6 +592,7 @@ String manipulation: *string-functions*
match() position where a pattern matches in a string
matchend() position where a pattern match ends in a string
matchstr() match of a pattern in a string
+ matchstrpos() match and postions of a pattern in a string
matchlist() like matchstr() and also return submatches
stridx() first index of a short string in a long string
strridx() last index of a short string in a long string
diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim
index b8acd901a8..63bafa1925 100644
--- a/runtime/ftplugin/man.vim
+++ b/runtime/ftplugin/man.vim
@@ -1,7 +1,7 @@
" Maintainer: Anmol Sethi <anmol@aubble.com>
" Previous Maintainer: SungHyun Nam <goweol@gmail.com>
-if exists('b:did_ftplugin')
+if exists('b:did_ftplugin') || &filetype !=# 'man'
finish
endif
let b:did_ftplugin = 1