mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
doc: manpage: formatting, update --headless
This commit is contained in:
parent
ea12efa66b
commit
e52293757a
123
man/nvim.1
123
man/nvim.1
@ -20,14 +20,17 @@
|
|||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
.Nm
|
.Nm
|
||||||
is a text editor based on Vim.
|
is a text editor based on Vim.
|
||||||
To enter commands in
|
Commands in this program start with colon
|
||||||
.Nm ,
|
.Pq Sq \&: .
|
||||||
type a colon
|
Use the :help command to get help, for example ":help quickref"
|
||||||
.Pq Sq \&:
|
is a condensed overview of almost all commands.
|
||||||
which is also used in this manual to denote commands.
|
.Pp
|
||||||
For more information, consult the online help with the
|
If you are new to Vim/Nvim, start with the 30-minute tutorial:
|
||||||
.Ic :help
|
.Dl :Tutor
|
||||||
command.
|
.Pp
|
||||||
|
After installing/updating Nvim, it's a good idea to run the self-check:
|
||||||
|
.Dl :checkhealth
|
||||||
|
.Pp
|
||||||
.Bl -tag -width Fl
|
.Bl -tag -width Fl
|
||||||
.It Ar file ...
|
.It Ar file ...
|
||||||
File(s) to edit.
|
File(s) to edit.
|
||||||
@ -42,7 +45,7 @@ commands.
|
|||||||
Read text from standard input until
|
Read text from standard input until
|
||||||
.Dv EOF ,
|
.Dv EOF ,
|
||||||
then open a buffer with that text.
|
then open a buffer with that text.
|
||||||
Commands are read from standard error, which should be a terminal.
|
User input is read from standard error, which should be a terminal.
|
||||||
.It Fl t Ar tag
|
.It Fl t Ar tag
|
||||||
The file to edit and the initial cursor position depends on a
|
The file to edit and the initial cursor position depends on a
|
||||||
tag, a sort of goto label.
|
tag, a sort of goto label.
|
||||||
@ -53,8 +56,7 @@ If
|
|||||||
.Ar tag
|
.Ar tag
|
||||||
is a function name, the file containing that function is opened
|
is a function name, the file containing that function is opened
|
||||||
with the cursor positioned at the start of the function.
|
with the cursor positioned at the start of the function.
|
||||||
See
|
.Ic ":help tag-commands"
|
||||||
.Ic ":help tag-commands" .
|
|
||||||
.It Fl q Op Ar errorfile
|
.It Fl q Op Ar errorfile
|
||||||
QuickFix mode.
|
QuickFix mode.
|
||||||
Display the first error in
|
Display the first error in
|
||||||
@ -66,31 +68,29 @@ is omitted, the value of the 'errorfile' option is used (defaults to
|
|||||||
Further errors can be jumped to with the
|
Further errors can be jumped to with the
|
||||||
.Ic :cnext
|
.Ic :cnext
|
||||||
command.
|
command.
|
||||||
See
|
.Ic ":help quickfix"
|
||||||
.Ic ":help quickfix" .
|
|
||||||
.It There are a number of other options:
|
.It There are a number of other options:
|
||||||
.It Fl -
|
.It Fl -
|
||||||
Interpret all further arguments as files.
|
End of options.
|
||||||
Can be used to edit files starting with a hyphen
|
Remaining arguments are treated as literal file names, including filenames starting with hyphen
|
||||||
.Pq Sq - .
|
.Pq Sq - .
|
||||||
.It Fl e
|
.It Fl e
|
||||||
Ex mode. Reads stdin as Ex commands.
|
Ex mode, reading stdin as Ex commands.
|
||||||
See
|
.Ic ":help Ex-mode"
|
||||||
.Ic ":help Ex-mode" .
|
|
||||||
.It Fl E
|
.It Fl E
|
||||||
Ex mode. Reads stdin as text.
|
Ex mode, reading stdin as text.
|
||||||
See
|
.Ic :help Ex-mode
|
||||||
.Ic :help gQ .
|
|
||||||
.It Fl es
|
.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
|
.It Fl \&Es
|
||||||
Silent (batch) mode. Reads stdin as text.
|
Silent/batch mode, reading stdin as text.
|
||||||
|
.Ic :help silent-mode
|
||||||
.It Fl d
|
.It Fl d
|
||||||
Diff mode.
|
Diff mode.
|
||||||
Show the difference between two to four files, similar to
|
Show the difference between two to four files, similar to
|
||||||
.Xr sdiff 1 .
|
.Xr sdiff 1 .
|
||||||
See
|
.Ic ":help diff"
|
||||||
.Ic ":help diff" .
|
|
||||||
.It Fl R
|
.It Fl R
|
||||||
Read-only mode.
|
Read-only mode.
|
||||||
Sets the 'readonly' option.
|
Sets the 'readonly' option.
|
||||||
@ -100,8 +100,7 @@ Buffers can still be edited, but cannot be written to disk if already
|
|||||||
associated with a file.
|
associated with a file.
|
||||||
To overwrite a file, add an exclamation mark to the relevant Ex command, such as
|
To overwrite a file, add an exclamation mark to the relevant Ex command, such as
|
||||||
.Ic :w! .
|
.Ic :w! .
|
||||||
See
|
.Ic ":help 'readonly'"
|
||||||
.Ic ":help 'readonly'" .
|
|
||||||
.It Fl Z
|
.It Fl Z
|
||||||
Restricted mode.
|
Restricted mode.
|
||||||
Disable commands that make use of an external shell.
|
Disable commands that make use of an external shell.
|
||||||
@ -113,8 +112,7 @@ Resets the 'write' and 'modifiable' options, to disable file and buffer
|
|||||||
modifications.
|
modifications.
|
||||||
.It Fl b
|
.It Fl b
|
||||||
Binary mode.
|
Binary mode.
|
||||||
See
|
.Ic ":help edit-binary"
|
||||||
.Ic ":help edit-binary" .
|
|
||||||
.It Fl l
|
.It Fl l
|
||||||
Lisp mode.
|
Lisp mode.
|
||||||
Sets the 'lisp' and 'showmatch' options.
|
Sets the 'lisp' and 'showmatch' options.
|
||||||
@ -126,19 +124,20 @@ Hebrew mode.
|
|||||||
Sets the 'hkmap' and 'rightleft' options.
|
Sets the 'hkmap' and 'rightleft' options.
|
||||||
.It Fl V Ns Oo Ar N Oc Ns Op Ar file
|
.It Fl V Ns Oo Ar N Oc Ns Op Ar file
|
||||||
Verbose mode.
|
Verbose mode.
|
||||||
Print messages about which files are being sourced and for reading and
|
Prints debug messages.
|
||||||
writing a ShaDa file.
|
|
||||||
.Ar N
|
.Ar N
|
||||||
is the 'verbose' level; defaults to
|
is the 'verbose' level, defaults to
|
||||||
.Cm 10.
|
.Cm 10 .
|
||||||
If
|
If
|
||||||
.Ar file
|
.Ar file
|
||||||
is specified, append messages to
|
is specified, append messages to
|
||||||
.Ar file
|
.Ar file
|
||||||
instead of printing them.
|
instead of printing them.
|
||||||
|
.Ic ":help 'verbose'"
|
||||||
.It Fl D
|
.It Fl D
|
||||||
Debugging mode.
|
Debug mode for VimL (Vim script).
|
||||||
Started when executing the first command from a script.
|
Started when executing the first command from a script.
|
||||||
|
:help debug-mode
|
||||||
.It Fl n
|
.It Fl n
|
||||||
Disable the use of swap files.
|
Disable the use of swap files.
|
||||||
Sets the 'updatecount' option to
|
Sets the 'updatecount' option to
|
||||||
@ -156,8 +155,7 @@ is used to recover a crashed session.
|
|||||||
The swap file has the same name as the file it's associated with, but with
|
The swap file has the same name as the file it's associated with, but with
|
||||||
.Sq .swp
|
.Sq .swp
|
||||||
appended.
|
appended.
|
||||||
See
|
.Ic ":help recovery"
|
||||||
.Ic ":help recovery" .
|
|
||||||
.It Fl L Op Ar file
|
.It Fl L Op Ar file
|
||||||
Alias for
|
Alias for
|
||||||
.Fl r .
|
.Fl r .
|
||||||
@ -177,8 +175,7 @@ If
|
|||||||
is
|
is
|
||||||
.Cm NONE ,
|
.Cm NONE ,
|
||||||
loading plugins is also skipped.
|
loading plugins is also skipped.
|
||||||
See
|
.Ic ":help initialization"
|
||||||
.Ic ":help initialization" .
|
|
||||||
.It Fl i Ar shada
|
.It Fl i Ar shada
|
||||||
Use
|
Use
|
||||||
.Ar shada
|
.Ar shada
|
||||||
@ -189,8 +186,7 @@ If
|
|||||||
is
|
is
|
||||||
.Cm NONE ,
|
.Cm NONE ,
|
||||||
do not read or write a ShaDa file.
|
do not read or write a ShaDa file.
|
||||||
See
|
.Ic ":help shada"
|
||||||
.Ic ":help shada" .
|
|
||||||
.It Fl -noplugin
|
.It Fl -noplugin
|
||||||
Skip loading plugins.
|
Skip loading plugins.
|
||||||
Implied by
|
Implied by
|
||||||
@ -243,17 +239,12 @@ and
|
|||||||
.Ic :/foo
|
.Ic :/foo
|
||||||
inside
|
inside
|
||||||
.Nm .
|
.Nm .
|
||||||
See
|
.Ic ":help search-pattern"
|
||||||
.Ic ":help search-pattern" .
|
.It \fB\+\fR\fI\,command\/\fR , Fl c Ar command
|
||||||
.It Fl c Ar command
|
|
||||||
Execute
|
Execute
|
||||||
.Ar command
|
.Ar command
|
||||||
after reading the first file.
|
after reading the first file.
|
||||||
Up to 10 instances of
|
Up to 10 instances allowed.
|
||||||
.Fl c
|
|
||||||
or
|
|
||||||
.Cm +
|
|
||||||
can be used.
|
|
||||||
.Qq Cm +foo
|
.Qq Cm +foo
|
||||||
and
|
and
|
||||||
.Cm -c \(dqfoo\(dq
|
.Cm -c \(dqfoo\(dq
|
||||||
@ -280,8 +271,7 @@ If
|
|||||||
is omitted then
|
is omitted then
|
||||||
.Pa Session.vim
|
.Pa Session.vim
|
||||||
is used, if found.
|
is used, if found.
|
||||||
See
|
.Ic ":help session-file"
|
||||||
.Ic ":help session-file" .
|
|
||||||
.It Fl s Ar scriptin
|
.It Fl s Ar scriptin
|
||||||
Read normal mode commands from
|
Read normal mode commands from
|
||||||
.Ar scriptin .
|
.Ar scriptin .
|
||||||
@ -310,10 +300,12 @@ Can be used to diagnose slow startup times.
|
|||||||
Dump API metadata serialized to msgpack and exit.
|
Dump API metadata serialized to msgpack and exit.
|
||||||
.It Fl -embed
|
.It Fl -embed
|
||||||
Use standard input and standard output as a msgpack-rpc channel.
|
Use standard input and standard output as a msgpack-rpc channel.
|
||||||
Implies
|
:help --embed
|
||||||
.Fl -headless .
|
|
||||||
.It Fl -headless
|
.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
|
.It Fl -listen Ar address
|
||||||
Start RPC server on this pipe or TCP socket.
|
Start RPC server on this pipe or TCP socket.
|
||||||
.It Fl h , -help
|
.It Fl h , -help
|
||||||
@ -324,11 +316,12 @@ Print version information and exit.
|
|||||||
.Sh ENVIRONMENT
|
.Sh ENVIRONMENT
|
||||||
.Bl -tag -width Fl
|
.Bl -tag -width Fl
|
||||||
.It Ev NVIM_LOG_FILE
|
.It Ev NVIM_LOG_FILE
|
||||||
Low-level log file, usually found at ~/.local/share/nvim/log. See :help
|
Low-level log file, usually found at ~/.local/share/nvim/log.
|
||||||
$NVIM_LOG_FILE.
|
:help $NVIM_LOG_FILE
|
||||||
.It Ev VIM
|
.It Ev VIM
|
||||||
Used to locate user files, such as init.vim.
|
Used to locate user files, such as init.vim.
|
||||||
System-dependent, see :help $VIM.
|
System-dependent.
|
||||||
|
:help $VIM
|
||||||
.It Ev VIMRUNTIME
|
.It Ev VIMRUNTIME
|
||||||
Used to locate runtime files (documentation, syntax highlighting, etc.).
|
Used to locate runtime files (documentation, syntax highlighting, etc.).
|
||||||
.It Ev XDG_CONFIG_HOME
|
.It Ev XDG_CONFIG_HOME
|
||||||
@ -336,7 +329,7 @@ Path to the user-local configuration directory, see
|
|||||||
.Sx FILES .
|
.Sx FILES .
|
||||||
Defaults to
|
Defaults to
|
||||||
.Pa ~/.config .
|
.Pa ~/.config .
|
||||||
See :help xdg.
|
:help xdg
|
||||||
.It Ev XDG_DATA_HOME
|
.It Ev XDG_DATA_HOME
|
||||||
Like
|
Like
|
||||||
.Ev XDG_CONFIG_HOME ,
|
.Ev XDG_CONFIG_HOME ,
|
||||||
@ -344,19 +337,10 @@ but used to store data not generally edited by the user,
|
|||||||
namely swap, backup, and ShaDa files.
|
namely swap, backup, and ShaDa files.
|
||||||
Defaults to
|
Defaults to
|
||||||
.Pa ~/.local/share .
|
.Pa ~/.local/share .
|
||||||
See :help xdg.
|
:help xdg
|
||||||
.It Ev VIMINIT
|
.It Ev VIMINIT
|
||||||
Ex commands to be executed at startup.
|
Ex commands to be executed at startup.
|
||||||
For example, the command to quit is
|
.Ic ":help VIMINIT"
|
||||||
.Ic :q ,
|
|
||||||
so to have
|
|
||||||
.Nm
|
|
||||||
quit immediately after starting, set
|
|
||||||
.Ev VIMINIT
|
|
||||||
to
|
|
||||||
.Cm q .
|
|
||||||
See
|
|
||||||
.Ic ":help VIMINIT" .
|
|
||||||
.It Ev SHELL
|
.It Ev SHELL
|
||||||
Used to initialize the 'shell' option, which decides the default shell used by
|
Used to initialize the 'shell' option, which decides the default shell used by
|
||||||
features like
|
features like
|
||||||
@ -391,10 +375,9 @@ Nvim was started by
|
|||||||
Most of Vim was written by
|
Most of Vim was written by
|
||||||
.An -nosplit
|
.An -nosplit
|
||||||
.An Bram Moolenaar .
|
.An Bram Moolenaar .
|
||||||
See
|
|
||||||
.Ic ":help credits" .
|
|
||||||
Vim is based on Stevie, worked on by
|
Vim is based on Stevie, worked on by
|
||||||
.An Tim Thompson ,
|
.An Tim Thompson ,
|
||||||
.An Tony Andrews ,
|
.An Tony Andrews ,
|
||||||
and
|
and
|
||||||
.An G.R. (Fred) Walter .
|
.An G.R. (Fred) Walter .
|
||||||
|
.Ic ":help credits"
|
||||||
|
@ -8,7 +8,9 @@ Nvim *nvim* *nvim-intro*
|
|||||||
|
|
||||||
Nvim is based on Vim by Bram Moolenaar.
|
Nvim is based on Vim by Bram Moolenaar.
|
||||||
|
|
||||||
If you are new to Vim see |help.txt|, or type ":Tutor".
|
If you are new to Vim, try the 30-minute tutorial: >
|
||||||
|
:Tutor<Enter>
|
||||||
|
|
||||||
If you already use Vim see |nvim-from-vim| for a quickstart.
|
If you already use Vim see |nvim-from-vim| for a quickstart.
|
||||||
|
|
||||||
Nvim is emphatically a fork of Vim, not a clone: compatibility with Vim is
|
Nvim is emphatically a fork of Vim, not a clone: compatibility with Vim is
|
||||||
|
Loading…
Reference in New Issue
Block a user