aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/diff.txt2
-rw-r--r--runtime/doc/eval.txt10
-rw-r--r--runtime/doc/if_lua.txt14
-rw-r--r--runtime/doc/if_pyth.txt19
-rw-r--r--runtime/doc/if_ruby.txt14
-rw-r--r--runtime/doc/indent.txt39
-rw-r--r--runtime/doc/starting.txt2
-rw-r--r--runtime/doc/windows.txt6
8 files changed, 77 insertions, 29 deletions
diff --git a/runtime/doc/diff.txt b/runtime/doc/diff.txt
index ae8039f7ca..dcc3035d41 100644
--- a/runtime/doc/diff.txt
+++ b/runtime/doc/diff.txt
@@ -325,7 +325,7 @@ After setting this variable, reload the syntax script: >
FINDING THE DIFFERENCES *diff-diffexpr*
The 'diffexpr' option can be set to use something else than the standard
-"diff" program to compare two files and find the differences.
+"diff" program to compare two files and find the differences. *E959*
When 'diffexpr' is empty, Vim uses this command to find the differences
between file1 and file2: >
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 4dd10bff9c..85a0cefe38 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1589,7 +1589,7 @@ v:exception The value of the exception most recently caught and not
:try
: throw "oops"
:catch /.*/
- : echo "caught" v:exception
+ : echo "caught " .. v:exception
:endtry
< Output: "caught oops".
@@ -3983,7 +3983,10 @@ get({list}, {idx} [, {default}]) *get()*
get({dict}, {key} [, {default}])
Get item with key {key} from |Dictionary| {dict}. When this
item is not available return {default}. Return zero when
- {default} is omitted.
+ {default} is omitted. Useful example: >
+ let val = get(g:, 'var_name', 'default')
+< This gets the value of g:var_name if it exists, and uses
+ 'default' when it does not exist.
get({func}, {what})
Get item {what} from Funcref {func}. Possible values for
{what} are:
@@ -6645,7 +6648,8 @@ remove({list}, {idx} [, {end}]) *remove()*
:echo "last item: " . remove(mylist, -1)
:call remove(mylist, 0, 9)
remove({dict}, {key})
- Remove the entry from {dict} with key {key}. Example: >
+ Remove the entry from {dict} with key {key} and return it.
+ Example: >
:echo "removed " . remove(dict, "one")
< If there is no {key} in {dict} this is an error.
diff --git a/runtime/doc/if_lua.txt b/runtime/doc/if_lua.txt
index 6dcf3f9fa9..f886fd28c5 100644
--- a/runtime/doc/if_lua.txt
+++ b/runtime/doc/if_lua.txt
@@ -189,16 +189,16 @@ To see the LuaJIT version: >
:lua print(jit.version)
<
-:[range]lua << {endmarker}
+:[range]lua << [endmarker]
{script}
{endmarker}
- Execute Lua script {script}.
+ Execute Lua script {script}. Useful for including Lua
+ code in Vim scripts.
-{endmarker} must NOT be preceded by any white space. If {endmarker} is
-omitted from after the "<<", a dot '.' must be used after {script}, like
-for the |:append| and |:insert| commands.
-This form of the |:lua| command is mainly useful for including Lua code
-in Vim scripts.
+The {endmarker} must NOT be preceded by any white space.
+
+If [endmarker] is omitted from after the "<<", a dot '.' must be used after
+{script}, like for the |:append| and |:insert| commands.
Example:
>
diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt
index ac725a9b5d..ed3bdcf277 100644
--- a/runtime/doc/if_pyth.txt
+++ b/runtime/doc/if_pyth.txt
@@ -19,18 +19,17 @@ Commands *python-commands*
the `:python` command is working: >
:python print "Hello"
-:[range]py[thon] << {endmarker}
+:[range]py[thon] << [endmarker]
{script}
{endmarker}
- Execute Python script {script}.
- Note: This command doesn't work when Python isn't
- available. To avoid errors, see |script-here|.
-
-{endmarker} must NOT be preceded by any white space. If {endmarker} is
-omitted from after the "<<", a dot '.' must be used after {script}, like
-for the |:append| and |:insert| commands.
-This form of the |:python| command is mainly useful for including python code
-in Vim scripts.
+ Execute Python script {script}. Useful for including
+ python code in Vim scripts. Requires Python, see
+ |script-here|.
+
+The {endmarker} below the {script} must NOT be preceded by any white space.
+
+If [endmarker] is omitted from after the "<<", a dot '.' must be used after
+{script}, like for the |:append| and |:insert| commands.
Example: >
function! IcecreamInitialize()
diff --git a/runtime/doc/if_ruby.txt b/runtime/doc/if_ruby.txt
index 3c7c800fbf..6468e4c81e 100644
--- a/runtime/doc/if_ruby.txt
+++ b/runtime/doc/if_ruby.txt
@@ -19,15 +19,19 @@ downloading Ruby there.
:rub[y] {cmd} Execute Ruby command {cmd}. A command to try it out: >
:ruby print "Hello"
-:rub[y] << {endpattern}
+:rub[y] << [endpattern]
{script}
{endpattern}
Execute Ruby script {script}.
- {endpattern} must NOT be preceded by any white space.
- If {endpattern} is omitted, it defaults to a dot '.'
- like for the |:append| and |:insert| commands. This
- form of the |:ruby| command is mainly useful for
+ The {endpattern} after {script} must NOT be preceded
+ by any white space.
+
+ If [endpattern] is omitted, it defaults to a dot '.'
+ like for the |:append| and |:insert| commands.
+
+ This form of the |:ruby| command is mainly useful for
including ruby code in vim scripts.
+
Note: This command doesn't work when the Ruby feature
wasn't compiled in. To avoid errors, see
|script-here|.
diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt
index e69497e1ab..a99d84e969 100644
--- a/runtime/doc/indent.txt
+++ b/runtime/doc/indent.txt
@@ -827,7 +827,7 @@ PHP indenting can be altered in several ways by modifying the values of some
global variables:
*php-comment* *PHP_autoformatcomment*
-To not enable auto-formatting of comments by default (if you want to use your
+To not enable auto-formating of comments by default (if you want to use your
own 'formatoptions'): >
:let g:PHP_autoformatcomment = 0
@@ -897,7 +897,7 @@ NOTE: Indenting will be a bit slower if this option is used because some
optimizations won't be available.
-------------
- *PHP_vintage_case_default_indent*
+ *PHP_vintage_case_default_indent*
To indent 'case:' and 'default:' statements in switch() blocks: >
:let g:PHP_vintage_case_default_indent = 1
@@ -924,6 +924,41 @@ You will obtain the following result: >
->age()
->info();
+-------------
+
+ *PHP_IndentFunctionCallParameters*
+Extra indentation levels to add to parameters in multi-line function calls. >
+ let g:PHP_IndentFunctionCallParameters = 1
+
+Function call arguments will indent 1 extra level. For two-space indentation: >
+
+ function call_the_thing(
+ $with_this,
+ $and_that
+ ) {
+ $this->do_the_thing(
+ $with_this,
+ $and_that
+ );
+ }
+
+-------------
+
+ *PHP_IndentFunctionDeclarationParameters*
+Extra indentation levels to add to arguments in multi-line function definitions. >
+ let g:PHP_IndentFunctionDeclarationParameters = 1
+
+Function arguments in declarations will indent 1 extra level. For two-space indentation: >
+
+ function call_the_thing(
+ $with_this,
+ $and_that
+ ) {
+ $this->do_the_thing(
+ $with_this,
+ $and_that
+ );
+ }
PYTHON *ft-python-indent*
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt
index 389bc486f0..7e6f4529b8 100644
--- a/runtime/doc/starting.txt
+++ b/runtime/doc/starting.txt
@@ -676,7 +676,7 @@ After doing this once, Nvim sets the $VIMRUNTIME environment variable.
In case you need the value of $VIMRUNTIME in a shell (e.g., for a script that
greps in the help files) you might be able to use this: >
- VIMRUNTIME="$(nvim -e --cmd 'echo $VIMRUNTIME|quit' 2>&1)"
+ VIMRUNTIME="$(nvim --clean --headless --cmd 'echo $VIMRUNTIME|q')"
==============================================================================
4. Suspending *suspend*
diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt
index 0bad1c87d6..18a58a569e 100644
--- a/runtime/doc/windows.txt
+++ b/runtime/doc/windows.txt
@@ -138,6 +138,10 @@ CTRL-W CTRL-S *CTRL-W_CTRL-S*
Note: CTRL-S does not work on all terminals and might block
further input, use CTRL-Q to get going again.
Also see |++opt| and |+cmd|.
+ *E242*
+ Be careful when splitting a window in an autocommand, it may
+ mess up the window layout if this happens while making other
+ window layout changes.
CTRL-W CTRL-V *CTRL-W_CTRL-V*
CTRL-W v *CTRL-W_v*
@@ -635,6 +639,8 @@ can also get to them with the buffer list commands, like ":bnext".
|:vertical| was prepended).
Buf/Win Enter/Leave autocommands are not executed for the new
windows here, that's only done when they are really entered.
+ If autocommands change the window layout while this command is
+ busy an error will be given. *E249*
:[N]sa[rgument][!] [++opt] [+cmd] [N] *:sa* *:sargument*
Short for ":split | argument [N]": split window and go to Nth