aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/eval.txt2
-rw-r--r--runtime/doc/helphelp.txt3
-rw-r--r--runtime/doc/message.txt3
-rw-r--r--runtime/doc/pattern.txt40
-rw-r--r--runtime/doc/tips.txt24
5 files changed, 52 insertions, 20 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index b0bad1ffe1..6d80c60270 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -10495,7 +10495,7 @@ text...
:exe[cute] {expr1} .. Executes the string that results from the evaluation
of {expr1} as an Ex command.
Multiple arguments are concatenated, with a space in
- between. To avoid the extra space use the "."
+ between. To avoid the extra space use the ".."
operator to concatenate strings into one argument.
{expr1} is used as the processed command, command line
editing keys are not recognized.
diff --git a/runtime/doc/helphelp.txt b/runtime/doc/helphelp.txt
index 2f00d19b71..7643d84017 100644
--- a/runtime/doc/helphelp.txt
+++ b/runtime/doc/helphelp.txt
@@ -159,6 +159,9 @@ When no argument is given to |:help| the file given with the 'helpfile' option
will be opened. Otherwise the specified tag is searched for in all "doc/tags"
files in the directories specified in the 'runtimepath' option.
+If you would like to open the help in the current window, see this tip:
+|help-curwin|.
+
The initial height of the help window can be set with the 'helpheight' option
(default 20).
diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt
index 4df53a561e..6fbd9ec922 100644
--- a/runtime/doc/message.txt
+++ b/runtime/doc/message.txt
@@ -762,6 +762,9 @@ and the screen is about to be redrawn:
-> Press <Enter> or <Space> to redraw the screen and continue, without that
key being used otherwise.
-> Press ':' or any other Normal mode command character to start that command.
+ Note that after an external command some special keys, such as the cursor
+ keys, may not work normally, because the terminal is still set to a state
+ for executing the external command.
-> Press 'k', <Up>, 'u', 'b' or 'g' to scroll back in the messages. This
works the same way as at the |more-prompt|. Only works when 'more' is on.
-> Pressing 'j', 'f', 'd' or <Down> is ignored when messages scrolled off the
diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt
index 3c7a20dd49..86712cdfe1 100644
--- a/runtime/doc/pattern.txt
+++ b/runtime/doc/pattern.txt
@@ -384,15 +384,19 @@ the pattern will not match. This is only useful when debugging Vim.
==============================================================================
3. Magic */magic*
-Some characters in the pattern are taken literally. They match with the same
-character in the text. When preceded with a backslash however, these
-characters get a special meaning.
+Some characters in the pattern, such as letters, are taken literally. They
+match exactly the same character in the text. When preceded with a backslash
+however, these characters may get a special meaning. For example, "a" matches
+the letter "a", while "\a" matches any alphabetic character.
Other characters have a special meaning without a backslash. They need to be
-preceded with a backslash to match literally.
+preceded with a backslash to match literally. For example "." matches any
+character while "\." matches a dot.
If a character is taken literally or not depends on the 'magic' option and the
-items mentioned next.
+items in the pattern mentioned next. The 'magic' option should always be set,
+but it can be switched off for Vi compatibility. We mention the effect of
+'nomagic' here for completeness, but we recommend against using that.
*/\m* */\M*
Use of "\m" makes the pattern after it be interpreted as if 'magic' is set,
ignoring the actual value of the 'magic' option.
@@ -401,30 +405,28 @@ Use of "\M" makes the pattern after it be interpreted as if 'nomagic' is used.
Use of "\v" means that after it, all ASCII characters except '0'-'9', 'a'-'z',
'A'-'Z' and '_' have special meaning: "very magic"
-Use of "\V" means that after it, only a backslash and terminating character
-(usually / or ?) have special meaning: "very nomagic"
+Use of "\V" means that after it, only a backslash and the terminating
+character (usually / or ?) have special meaning: "very nomagic"
Examples:
after: \v \m \M \V matches ~
'magic' 'nomagic'
- $ $ $ \$ matches end-of-line
- . . \. \. matches any character
+ a a a a literal 'a'
+ \a \a \a \a any alphabetic character
+ . . \. \. any character
+ \. \. . . literal dot
+ $ $ $ \$ end-of-line
* * \* \* any number of the previous atom
~ ~ \~ \~ latest substitute string
- () \(\) \(\) \(\) grouping into an atom
- | \| \| \| separating alternatives
- \a \a \a \a alphabetic character
+ () \(\) \(\) \(\) group as an atom
+ | \| \| \| nothing: separates alternatives
\\ \\ \\ \\ literal backslash
- \. \. . . literal dot
- \{ { { { literal '{'
- a a a a literal 'a'
+ \{ { { { literal curly brace
{only Vim supports \m, \M, \v and \V}
-It is recommended to always keep the 'magic' option at the default setting,
-which is 'magic'. This avoids portability problems. To make a pattern immune
-to the 'magic' option being set or not, put "\m" or "\M" at the start of the
-pattern.
+If you want to you can make a pattern immune to the 'magic' option being set
+or not by putting "\m" or "\M" at the start of the pattern.
==============================================================================
4. Overview of pattern items *pattern-overview*
diff --git a/runtime/doc/tips.txt b/runtime/doc/tips.txt
index 1362b730b7..bcb2e48cbf 100644
--- a/runtime/doc/tips.txt
+++ b/runtime/doc/tips.txt
@@ -446,4 +446,28 @@ A slightly more advanced version is used in the |matchparen| plugin.
autocmd InsertEnter * match none
<
+==============================================================================
+Opening help in the current window *help-curwin*
+
+By default, help is displayed in a split window. If you prefer it opens in
+the current window, try this custom `:HelpCurwin` command:
+>
+ command -bar -nargs=? -complete=help HelpCurwin execute s:HelpCurwin(<q-args>)
+ let s:did_open_help = v:false
+
+ function s:HelpCurwin(subject) abort
+ let mods = 'silent noautocmd keepalt'
+ if !s:did_open_help
+ execute mods .. ' help'
+ execute mods .. ' helpclose'
+ let s:did_open_help = v:true
+ endif
+ if !getcompletion(a:subject, 'help')->empty()
+ execute mods .. ' edit ' .. &helpfile
+ endif
+ return 'help ' .. a:subject
+ endfunction
+<
+
+
vim:tw=78:ts=8:noet:ft=help:norl: