aboutsummaryrefslogtreecommitdiff
path: root/man/nvim.1
diff options
context:
space:
mode:
Diffstat (limited to 'man/nvim.1')
-rw-r--r--man/nvim.1154
1 files changed, 72 insertions, 82 deletions
diff --git a/man/nvim.1 b/man/nvim.1
index 0040af2865..2621036e26 100644
--- a/man/nvim.1
+++ b/man/nvim.1
@@ -20,41 +20,51 @@
.Sh DESCRIPTION
.Nm
is a text editor based on Vim.
-To enter commands in
-.Nm ,
-type a colon
-.Pq Sq \&:
-which is also used in this manual to denote commands.
-For more information, consult the online help with the
-.Ic :help
-command.
+Start
+.Nm
+followed by any number of options and/or files:
+.Pp
+.Dl nvim [options] [filelist]
+.Pp
+Commands in
+.Nm
+begin with colon
+.Pq Sq \&: .
+Type ":help subject" to get help on a specific subject.
+Use <Tab> and CTRL-D to complete subjects (":help cmdline\-completion").
+.Pp
+The "quickref" help section is a condensed reference of editor features:
+.Dl :help quickref
+.Pp
+If you are new to Vim/Nvim, start with the 30-minute tutorial:
+.Dl :Tutor
+.Pp
+After installing/updating Nvim, it's a good idea to run the self-check:
+.Dl :checkhealth
+.Pp
.Bl -tag -width Fl
.It Ar file ...
File(s) to edit.
-If none are specified, open an empty buffer.
-If multiple files are specified, open one buffer for each file.
+Opens one buffer per file.
To switch between buffers, use the
.Ic :next
and
.Ic :previous
commands.
.It Fl
-Read text from standard input until
+Reads text from standard input until
.Dv EOF ,
-then open a buffer with that text.
-Commands are read from standard error, which should be a terminal.
+then opens a buffer with that text.
+User input is read from standard error, which should be a terminal.
+.Sh OPTIONS
+.Bl -tag -width Fl
.It Fl t Ar tag
-The file to edit and the initial cursor position depends on a
-tag, a sort of goto label.
+Finds
.Ar tag
-is looked up in the tags file, the associated file becomes the current
+in the tags file, the associated file becomes the current
file and the associated command is executed.
-If
-.Ar tag
-is a function name, the file containing that function is opened
-with the cursor positioned at the start of the function.
-See
-.Ic ":help tag-commands" .
+Cursor is positioned at the tag location in the file.
+.Ic ":help tag-commands"
.It Fl q Op Ar errorfile
QuickFix mode.
Display the first error in
@@ -66,31 +76,28 @@ is omitted, the value of the 'errorfile' option is used (defaults to
Further errors can be jumped to with the
.Ic :cnext
command.
-See
-.Ic ":help quickfix" .
-.It There are a number of other options:
+.Ic ":help quickfix"
.It Fl -
-Interpret all further arguments as files.
-Can be used to edit files starting with a hyphen
+End of options.
+Remaining arguments are treated as literal file names, including filenames starting with hyphen
.Pq Sq - .
.It Fl e
-Ex mode. Reads stdin as Ex commands.
-See
-.Ic ":help Ex-mode" .
+Ex mode, reading stdin as Ex commands.
+.Ic ":help Ex-mode"
.It Fl E
-Ex mode. Reads stdin as text.
-See
-.Ic :help gQ .
+Ex mode, reading stdin as text.
+.Ic :help Ex-mode
.It Fl es
-Silent (batch) mode. Reads stdin as Ex commands.
+Silent/batch mode, reading stdin as Ex commands.
+.Ic :help silent-mode
.It Fl \&Es
-Silent (batch) mode. Reads stdin as text.
+Silent/batch mode, reading stdin as text.
+.Ic :help silent-mode
.It Fl d
Diff mode.
Show the difference between two to four files, similar to
.Xr sdiff 1 .
-See
-.Ic ":help diff" .
+.Ic ":help diff"
.It Fl R
Read-only mode.
Sets the 'readonly' option.
@@ -100,8 +107,7 @@ Buffers can still be edited, but cannot be written to disk if already
associated with a file.
To overwrite a file, add an exclamation mark to the relevant Ex command, such as
.Ic :w! .
-See
-.Ic ":help 'readonly'" .
+.Ic ":help 'readonly'"
.It Fl Z
Restricted mode.
Disable commands that make use of an external shell.
@@ -113,8 +119,7 @@ Resets the 'write' and 'modifiable' options, to disable file and buffer
modifications.
.It Fl b
Binary mode.
-See
-.Ic ":help edit-binary" .
+.Ic ":help edit-binary"
.It Fl l
Lisp mode.
Sets the 'lisp' and 'showmatch' options.
@@ -126,19 +131,20 @@ Hebrew mode.
Sets the 'hkmap' and 'rightleft' options.
.It Fl V Ns Oo Ar N Oc Ns Op Ar file
Verbose mode.
-Print messages about which files are being sourced and for reading and
-writing a ShaDa file.
+Prints debug messages.
.Ar N
-is the 'verbose' level; defaults to
-.Cm 10.
+is the 'verbose' level, defaults to
+.Cm 10 .
If
.Ar file
is specified, append messages to
.Ar file
instead of printing them.
+.Ic ":help 'verbose'"
.It Fl D
-Debugging mode.
+Debug mode for VimL (Vim script).
Started when executing the first command from a script.
+:help debug-mode
.It Fl n
Disable the use of swap files.
Sets the 'updatecount' option to
@@ -156,8 +162,7 @@ is used to recover a crashed session.
The swap file has the same name as the file it's associated with, but with
.Sq .swp
appended.
-See
-.Ic ":help recovery" .
+.Ic ":help recovery"
.It Fl L Op Ar file
Alias for
.Fl r .
@@ -177,8 +182,7 @@ If
is
.Cm NONE ,
loading plugins is also skipped.
-See
-.Ic ":help initialization" .
+.Ic ":help initialization"
.It Fl i Ar shada
Use
.Ar shada
@@ -189,8 +193,7 @@ If
is
.Cm NONE ,
do not read or write a ShaDa file.
-See
-.Ic ":help shada" .
+.Ic ":help shada"
.It Fl -noplugin
Skip loading plugins.
Implied by
@@ -243,17 +246,12 @@ and
.Ic :/foo
inside
.Nm .
-See
-.Ic ":help search-pattern" .
-.It Fl c Ar command
+.Ic ":help search-pattern"
+.It \fB\+\fR\fI\,command\/\fR , Fl c Ar command
Execute
.Ar command
after reading the first file.
-Up to 10 instances of
-.Fl c
-or
-.Cm +
-can be used.
+Up to 10 instances allowed.
.Qq Cm +foo
and
.Cm -c \(dqfoo\(dq
@@ -280,8 +278,7 @@ If
is omitted then
.Pa Session.vim
is used, if found.
-See
-.Ic ":help session-file" .
+.Ic ":help session-file"
.It Fl s Ar scriptin
Read normal mode commands from
.Ar scriptin .
@@ -310,10 +307,12 @@ Can be used to diagnose slow startup times.
Dump API metadata serialized to msgpack and exit.
.It Fl -embed
Use standard input and standard output as a msgpack-rpc channel.
-Implies
-.Fl -headless .
+:help --embed
.It Fl -headless
-Do not start a user interface.
+Do not start a UI.
+When supplied with --embed this implies that the embedding application does not intend to (immediately) start a UI.
+Also useful for "scraping" messages in a pipe.
+:help --headless
.It Fl -listen Ar address
Start RPC server on this pipe or TCP socket.
.It Fl h , -help
@@ -324,11 +323,12 @@ Print version information and exit.
.Sh ENVIRONMENT
.Bl -tag -width Fl
.It Ev NVIM_LOG_FILE
-Low-level log file, usually found at ~/.local/share/nvim/log. See :help
-$NVIM_LOG_FILE.
+Low-level log file, usually found at ~/.local/share/nvim/log.
+:help $NVIM_LOG_FILE
.It Ev VIM
Used to locate user files, such as init.vim.
-System-dependent, see :help $VIM.
+System-dependent.
+:help $VIM
.It Ev VIMRUNTIME
Used to locate runtime files (documentation, syntax highlighting, etc.).
.It Ev XDG_CONFIG_HOME
@@ -336,7 +336,7 @@ Path to the user-local configuration directory, see
.Sx FILES .
Defaults to
.Pa ~/.config .
-See :help xdg.
+:help xdg
.It Ev XDG_DATA_HOME
Like
.Ev XDG_CONFIG_HOME ,
@@ -344,19 +344,10 @@ but used to store data not generally edited by the user,
namely swap, backup, and ShaDa files.
Defaults to
.Pa ~/.local/share .
-See :help xdg.
+:help xdg
.It Ev VIMINIT
Ex commands to be executed at startup.
-For example, the command to quit is
-.Ic :q ,
-so to have
-.Nm
-quit immediately after starting, set
-.Ev VIMINIT
-to
-.Cm q .
-See
-.Ic ":help VIMINIT" .
+.Ic ":help VIMINIT"
.It Ev SHELL
Used to initialize the 'shell' option, which decides the default shell used by
features like
@@ -391,10 +382,9 @@ Nvim was started by
Most of Vim was written by
.An -nosplit
.An Bram Moolenaar .
-See
-.Ic ":help credits" .
Vim is based on Stevie, worked on by
.An Tim Thompson ,
.An Tony Andrews ,
and
.An G.R. (Fred) Walter .
+.Ic ":help credits"