aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt22
-rw-r--r--runtime/syntax/man.vim15
2 files changed, 30 insertions, 7 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 635c08556b..d71bbf2528 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2222,6 +2222,8 @@ remote_read({serverid} [, {timeout}])
String read reply string
remote_send({server}, {string} [, {idvar}])
String send key sequence
+remote_startserver({name}) none become server {name}
+ String send key sequence
remove({list}, {idx} [, {end}]) any remove items {idx}-{end} from {list}
remove({dict}, {key}) any remove entry {key} from {dict}
rename({from}, {to}) Number rename (move) file from {from} to {to}
@@ -6196,15 +6198,17 @@ reltimestr({time}) *reltimestr()*
< Also see |profiling|.
*remote_expr()* *E449*
-remote_expr({server}, {string} [, {idvar}])
+remote_expr({server}, {string} [, {idvar} [, {timeout}]])
Send the {string} to {server}. The string is sent as an
expression and the result is returned after evaluation.
The result must be a String or a |List|. A |List| is turned
into a String by joining the items with a line break in
between (not at the end), like with join(expr, "\n").
- If {idvar} is present, it is taken as the name of a
- variable and a {serverid} for later use with
+ If {idvar} is present and not empty, it is taken as the name
+ of a variable and a {serverid} for later use with
remote_read() is stored there.
+ If {timeout} is given the read times out after this many
+ seconds. Otherwise a timeout of 600 seconds is used.
See also |clientserver| |RemoteReply|.
This function is not available in the |sandbox|.
{only available when compiled with the |+clientserver| feature}
@@ -6248,9 +6252,10 @@ remote_peek({serverid} [, {retvar}]) *remote_peek()*
:let repl = ""
:echo "PEEK: ".remote_peek(id, "repl").": ".repl
-remote_read({serverid}) *remote_read()*
+remote_read({serverid}, [{timeout}]) *remote_read()*
Return the oldest available reply from {serverid} and consume
- it. It blocks until a reply is available.
+ it. Unless a {timeout} in seconds is given, it blocks until a
+ reply is available.
See also |clientserver|.
This function is not available in the |sandbox|.
{only available when compiled with the |+clientserver| feature}
@@ -6268,6 +6273,7 @@ remote_send({server}, {string} [, {idvar}])
See also |clientserver| |RemoteReply|.
This function is not available in the |sandbox|.
{only available when compiled with the |+clientserver| feature}
+
Note: Any errors will be reported in the server and may mess
up the display.
Examples: >
@@ -6279,6 +6285,12 @@ remote_send({server}, {string} [, {idvar}])
:echo remote_send("gvim", ":sleep 10 | echo ".
\ 'server2client(expand("<client>"), "HELLO")<CR>')
<
+ *remote_startserver()* *E941* *E942*
+remote_startserver({name})
+ Become the server {name}. This fails if already running as a
+ server, when |v:servername| is not empty.
+ {only available when compiled with the |+clientserver| feature}
+
remove({list}, {idx} [, {end}]) *remove()*
Without {end}: Remove the item at {idx} from |List| {list} and
return the item.
diff --git a/runtime/syntax/man.vim b/runtime/syntax/man.vim
index b8e605cb9a..9ae50d17a5 100644
--- a/runtime/syntax/man.vim
+++ b/runtime/syntax/man.vim
@@ -30,17 +30,28 @@ endif
if !exists('b:man_sect')
call man#init_pager()
endif
-if b:man_sect =~# '^[23]'
+if b:man_sect =~# '^[023]'
+ syntax case match
syntax include @c $VIMRUNTIME/syntax/c.vim
syntax match manCFuncDefinition display '\<\h\w*\>\ze\(\s\|\n\)*(' contained
+ syntax match manSentence display '\%(^ \{3,7}\u\|\. \u\)\_.\{-}
+ \\%(-$\|\.$\|:$\)\|
+ \ \{3,7}\a.*\%(\.\|:\)$' contained contains=manReference
syntax region manSynopsis start='^\%(
\SYNOPSIS\|
\SYNTAX\|
\SINTASSI\|
\SKŁADNIA\|
\СИНТАКСИС\|
- \書式\)$' end='^\%(\S.*\)\=\S$' keepend contains=manSectionHeading,@c,manCFuncDefinition
+ \書式\)$' end='^\%(\S.*\)\=\S$' keepend contains=manSentence,manSectionHeading,@c,manCFuncDefinition
highlight default link manCFuncDefinition Function
+
+ syntax region manExample start='^EXAMPLES\=$' end='^\%(\S.*\)\=\S$' keepend contains=manSentence,manSectionHeading,manSubHeading,@c,manCFuncDefinition
+
+ " XXX: groupthere doesn't seem to work
+ syntax sync minlines=500
+ "syntax sync match manSyncExample groupthere manExample '^EXAMPLES\=$'
+ "syntax sync match manSyncExample groupthere NONE '^\%(EXAMPLES\=\)\@!\%(\S.*\)\=\S$'
endif
" Prevent everything else from matching the last line