aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/starting.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/starting.txt')
-rw-r--r--runtime/doc/starting.txt47
1 files changed, 31 insertions, 16 deletions
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt
index 8b662ab1bf..a99be4ab93 100644
--- a/runtime/doc/starting.txt
+++ b/runtime/doc/starting.txt
@@ -9,7 +9,7 @@ Starting Vim *starting*
Type |gO| to see the table of contents.
==============================================================================
-Nvim arguments *vim-arguments*
+Nvim arguments *cli-arguments*
Most often, Nvim is started to edit a single file with the command: >
@@ -31,8 +31,8 @@ filename One or more file names. The first one will be the current
To avoid a file name starting with a '-' being interpreted as
an option, precede the arglist with "--", e.g.: >
nvim -- -filename
-< All arguments after the "--" will be interpreted as file names,
- no other options or "+command" argument can follow.
+< All arguments after "--" are interpreted as file names, no
+ other options or "+command" argument can follow.
*--*
`-` Alias for stdin (standard input).
@@ -143,15 +143,13 @@ argument.
these commands, independently from "-c" commands.
*-S*
--S {file} Vimscript or Lua (".lua") {file} will be |:source|d after the
- first file has been read. Equivalent to: >
+-S [file] Vimscript or Lua (".lua") [file] will be |:source|d after the
+ first file has been read or "Session.vim" if [file] is not
+ given. Equivalent to: >
-c "source {file}"
< Can be repeated like "-c", subject to the same limit of 10
"-c" arguments. {file} cannot start with a "-".
--S Works like "-S Session.vim". Only when used as the last
- argument or when another "-" option follows.
-
-L *-L* *-r*
-r Recovery mode. Without a file name argument, a list of
existing swap files is given. With a file name, a swap file
@@ -211,10 +209,30 @@ argument.
nvim -es +":verbose echo 'foo'"
nvim -V1 -es +foo
-< User |config| is skipped (unless given with |-u|).
+< User |config| is skipped unless |-u| was given.
Swap file is skipped (like |-n|).
User |shada| is loaded (unless "-i NONE" is given).
+ *-l*
+-l {script} [args]
+ Executes Lua {script} file and exits. All [args] (up to "--"
+ |---|) are treated as {script} args, not Nvim args: by Lua
+ convention they are set in the `_G.arg` global table. *lua-args*
+ On {script} error, Nvim exits with code 1.
+
+ Sets 'verbose' to 1 (like "-V1"), so Lua `print()` writes to
+ output.
+
+ Any |cli-arguments| before "-l" are processed before executing
+ {script}. For example this quits before executing "foo.lua": >
+ nvim +q -l foo.lua
+< This loads Lua module "bar" before executing "foo.lua": >
+ nvim +"lua require('bar')" -l foo.lua
+<
+ User |config| is skipped unless |-u| was given.
+ User |shada| is skipped unless |-i| was given.
+ Swap file is skipped (like |-n|).
+
*-b*
-b Binary mode. File I/O will only recognize <NL> to separate
lines. The 'expandtab' option will be reset. The 'textwidth'
@@ -222,9 +240,6 @@ argument.
is set. This is done after reading the |vimrc| but before
reading any file in the arglist. See also |edit-binary|.
- *-l*
--l Lisp mode. Sets the 'lisp' and 'showmatch' options on.
-
*-A*
-A Arabic mode. Sets the 'arabic' option on.
@@ -239,10 +254,10 @@ argument.
Example: >
nvim -V8
--V[N]{filename}
- Like -V and set 'verbosefile' to {filename}. Messages are not
- displayed; instead they are written to the file {filename}.
- {filename} must not start with a digit.
+-V[N]{file}
+ Like -V and sets 'verbosefile' to {file} (must not start with
+ a digit). Messages are not displayed; instead they are
+ written to {file}.
Example: >
nvim -V20vimlog
<