2015-11-10 17:00:04 -07:00
|
|
|
.Dd November 11, 2015
|
2015-05-11 14:30:19 -07:00
|
|
|
.Dt NVIM 1
|
Remove outdated and unused manuals #2891
`nvim-[lang].1`:
The non-english manuals are completely outdated and still written in
roff, as opposed to mdoc, which is used for `nvim.1`.
Given that, they're nearly useless at the moment, and when/if they are
updated, they should probably be rewritten from scratch using `nvim.1`
as a reference.
`xxd*.1`:
xxd hasn't been in the source tree for a long time, so the manual is of
little use.
`nvimtutor*.1`:
The vimtutor script hasn't ever shipped with nvim, and the consensus
seems to be that it won't, at least in the form of an executable
installed alongside `$(PREFIX)/bin/nvim` (see #2700).
In `nvim.1`, the argument to the `.Os` macro was removed. This was done
because its only purpose was to signify that nvim and nvimtutor
were part of the "Neovim" distribution, i.e., one and the same, which
isn't applicable anymore because `nvimtutor.1` is being removed.
From the `.Os` documentation in `man mdoc`:
Os
Operating system version for display in the page footer. This is the
mandatory third macro of any mdoc file. Its syntax is as follows:
.Os [system [version]]
The optional system parameter specifies the relevant operating system or
environment. It is suggested to leave it unspecified, in which case
mandoc(1) uses its -Ios argument or, if that isn't specified either,
sysname and release as returned by uname(3).
Examples:
.Os
.Os KTH/CSC/TCS
.Os BSD 4.3
See also Dd and Dt.
Reviewed-by: Felipe Morales <hel.sheep@gmail.com>
Reviewed-by: Florian Walch <florian@fwalch.com>
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
[ci skip]
2015-06-24 11:12:51 -07:00
|
|
|
.Os
|
2015-05-11 14:30:19 -07:00
|
|
|
.Sh NAME
|
|
|
|
.Nm nvim
|
|
|
|
.Nd edit text
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
|
|
|
.Op Ar options
|
|
|
|
.Op Ar file ...
|
|
|
|
.Nm
|
|
|
|
.Op Ar options
|
|
|
|
.Fl
|
|
|
|
.Nm
|
|
|
|
.Op Ar options
|
|
|
|
.Fl t Ar tag
|
|
|
|
.Nm
|
|
|
|
.Op Ar options
|
2015-08-25 20:20:39 -07:00
|
|
|
.Fl q Op Ar errorfile
|
2015-05-11 14:30:19 -07:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
2015-08-25 20:20:39 -07:00
|
|
|
is a text editor based on Vim.
|
2015-05-11 14:30:19 -07:00
|
|
|
To enter commands in
|
|
|
|
.Nm ,
|
|
|
|
type a colon
|
2015-05-28 17:03:47 -07:00
|
|
|
.Pq Sq \&:
|
2015-05-11 14:30:19 -07:00
|
|
|
which is also used in this manual to denote commands.
|
|
|
|
For more information, consult the on-line help system with the
|
|
|
|
.Ic :help
|
2014-07-10 21:05:51 -07:00
|
|
|
command.
|
2015-05-11 14:30:19 -07:00
|
|
|
.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.
|
|
|
|
To switch between buffers, use the
|
|
|
|
.Ic :next
|
|
|
|
and
|
|
|
|
.Ic :previous
|
|
|
|
commands.
|
|
|
|
.It Fl
|
2015-05-28 17:03:47 -07:00
|
|
|
Read text from standard input until
|
|
|
|
.Dv EOF ,
|
|
|
|
then open a buffer with that text.
|
2015-05-11 14:30:19 -07:00
|
|
|
Commands are read from standard error, which should be a terminal.
|
|
|
|
.It Fl t Ar tag
|
|
|
|
The file to edit and the initial cursor position depends on a
|
|
|
|
tag, a sort of goto label.
|
|
|
|
.Ar tag
|
|
|
|
is looked up in the tags file, the associated file becomes the current
|
2014-07-10 21:05:51 -07:00
|
|
|
file and the associated command is executed.
|
|
|
|
If
|
2015-05-11 14:30:19 -07:00
|
|
|
.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 .
|
2015-08-25 20:20:39 -07:00
|
|
|
.It Fl q Op Ar errorfile
|
2015-05-11 14:30:19 -07:00
|
|
|
QuickFix mode.
|
|
|
|
Display the first error in
|
|
|
|
.Ar errorfile .
|
2014-07-10 21:05:51 -07:00
|
|
|
If
|
2015-05-11 14:30:19 -07:00
|
|
|
.Ar errorfile
|
|
|
|
is omitted, the value of the 'errorfile' option is used (defaults to
|
|
|
|
.Cm errors.err ) .
|
|
|
|
Further errors can be jumped to with the
|
|
|
|
.Ic :cnext
|
|
|
|
command.
|
|
|
|
See
|
|
|
|
.Ic :help quickfix .
|
|
|
|
.It There are a number of other options:
|
|
|
|
.It Fl -
|
|
|
|
Interpret all further arguments as files.
|
2015-05-28 17:03:47 -07:00
|
|
|
Can be used to edit files starting with a hyphen
|
|
|
|
.Pq Sq - .
|
2015-05-11 14:30:19 -07:00
|
|
|
.It Fl -literal
|
2015-08-25 20:20:39 -07:00
|
|
|
Interpret filenames literally, that is, do not expand wildcards.
|
2015-05-11 14:30:19 -07:00
|
|
|
Has no effect on UNIX-like systems, where the shell expands wildcards.
|
|
|
|
.It Fl e
|
|
|
|
Ex mode.
|
|
|
|
See
|
|
|
|
.Ic :help Ex-mode .
|
|
|
|
.It Fl E
|
|
|
|
Improved Ex mode.
|
|
|
|
See
|
|
|
|
.Ic :help gQ .
|
|
|
|
.It Fl s
|
|
|
|
Silent mode.
|
|
|
|
Only takes effect if
|
|
|
|
.Fl e
|
|
|
|
or
|
|
|
|
.Fl E
|
2015-08-25 20:20:39 -07:00
|
|
|
is specified before it.
|
|
|
|
.It Fl d
|
2015-05-11 14:30:19 -07:00
|
|
|
Diff mode.
|
2015-08-25 20:20:39 -07:00
|
|
|
Show the difference between two to four files, similar to
|
|
|
|
.Xr sdiff 1 .
|
2015-05-11 14:30:19 -07:00
|
|
|
See
|
|
|
|
.Ic :help diff .
|
|
|
|
.It Fl R
|
2014-07-10 21:05:51 -07:00
|
|
|
Read-only mode.
|
2015-05-11 14:30:19 -07:00
|
|
|
Sets the option 'readonly'.
|
|
|
|
Implies
|
|
|
|
.Fl n .
|
|
|
|
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 needed Ex command, such as
|
|
|
|
.Ic :w! .
|
|
|
|
See
|
|
|
|
.Ic :help 'readonly' .
|
|
|
|
.It Fl Z
|
2015-02-17 13:33:22 -07:00
|
|
|
Restricted mode.
|
2015-05-11 14:30:19 -07:00
|
|
|
Disable commands that make use of an external shell.
|
|
|
|
.It Fl m
|
|
|
|
Disable file modifications.
|
|
|
|
Unsets the option 'write'.
|
|
|
|
Writing to a file is disabled, but buffers can still be modified.
|
|
|
|
.It Fl M
|
|
|
|
Disable file and buffer modifications.
|
|
|
|
Unsets the options 'write' and 'modifiable'.
|
|
|
|
Note that these options can be set to re-enable making modifications.
|
|
|
|
.It Fl b
|
|
|
|
Binary mode.
|
|
|
|
See
|
|
|
|
.Ic :help edit-binary .
|
|
|
|
.It Fl l
|
|
|
|
Lisp mode.
|
|
|
|
Sets the options 'lisp' and 'showmatch'.
|
|
|
|
.It Fl A
|
|
|
|
Arabic mode.
|
|
|
|
Sets the option 'arabic'.
|
|
|
|
.It Fl F
|
|
|
|
Farsi mode.
|
|
|
|
Sets the options 'fkmap' and 'rightleft'.
|
|
|
|
.It Fl H
|
|
|
|
Hebrew mode.
|
|
|
|
Sets the options 'hkmap' and 'rightleft'.
|
|
|
|
.It Fl V Ns Oo Ar N Oc Ns Op Ar file
|
2015-08-25 20:20:39 -07:00
|
|
|
Verbose mode.
|
2015-05-11 14:30:19 -07:00
|
|
|
Print messages about which files are being sourced and for reading and
|
2015-07-05 16:16:05 -07:00
|
|
|
writing a ShaDa file.
|
2015-05-11 14:30:19 -07:00
|
|
|
.Ar N
|
|
|
|
is the value for the 'verbose' option; defaults to
|
|
|
|
.Cm 10
|
|
|
|
if omitted.
|
|
|
|
If
|
|
|
|
.Ar file
|
|
|
|
is specified, append messages to
|
|
|
|
.Ar file
|
|
|
|
instead of printing them.
|
|
|
|
.It Fl D
|
|
|
|
Debugging mode.
|
|
|
|
Started when executing the first command from a script.
|
|
|
|
.It Fl n
|
|
|
|
Disable the use of swap files.
|
|
|
|
Sets the option 'updatecount' to
|
|
|
|
.Cm 0 .
|
|
|
|
Can be useful for editing file(s) on a slow medium.
|
2015-08-25 20:20:39 -07:00
|
|
|
.It Fl r Op Ar file
|
2015-05-11 14:30:19 -07:00
|
|
|
Recovery mode.
|
2015-08-25 20:20:39 -07:00
|
|
|
If
|
|
|
|
.Ar file
|
|
|
|
is omitted
|
|
|
|
then list swap files with recovery information.
|
|
|
|
Otherwise the swap file
|
2015-05-11 14:30:19 -07:00
|
|
|
.Ar file
|
|
|
|
is used to recover a crashed session.
|
2015-08-25 20:20:39 -07:00
|
|
|
The swap file has the same name as the file it's associated with, but with
|
2015-05-28 17:03:47 -07:00
|
|
|
.Sq .swp
|
|
|
|
appended.
|
2015-05-11 14:30:19 -07:00
|
|
|
See
|
|
|
|
.Ic :help recovery .
|
2015-08-25 20:20:39 -07:00
|
|
|
.It Fl L Op Ar file
|
|
|
|
Alias for
|
|
|
|
.Fl r .
|
2015-11-10 17:00:04 -07:00
|
|
|
.It Fl u Ar vimrc
|
2015-05-11 14:30:19 -07:00
|
|
|
Use
|
2015-11-10 17:00:04 -07:00
|
|
|
.Ar vimrc
|
2015-05-11 14:30:19 -07:00
|
|
|
instead of the default of
|
2015-10-26 14:15:09 -07:00
|
|
|
.Pa ~/.config/nvim/init.vim .
|
2015-05-11 14:30:19 -07:00
|
|
|
If
|
2015-11-10 17:00:04 -07:00
|
|
|
.Ar vimrc
|
2015-05-11 14:30:19 -07:00
|
|
|
is
|
|
|
|
.Cm NORC ,
|
|
|
|
do not load any initialization files (excluding plugins),
|
|
|
|
and do not attempt to parse environment variables.
|
|
|
|
If
|
2015-11-10 17:00:04 -07:00
|
|
|
.Ar vimrc
|
2015-05-11 14:30:19 -07:00
|
|
|
is
|
|
|
|
.Cm NONE ,
|
|
|
|
loading plugins is also skipped.
|
|
|
|
See
|
|
|
|
.Ic :help initialization .
|
2015-07-05 16:16:05 -07:00
|
|
|
.It Fl i Ar shada
|
2015-05-11 14:30:19 -07:00
|
|
|
Use
|
2015-07-05 16:16:05 -07:00
|
|
|
.Ar shada
|
2015-05-11 14:30:19 -07:00
|
|
|
instead of the default of
|
2015-10-26 14:15:09 -07:00
|
|
|
.Pa ~/.local/share/nvim/shada/main.shada .
|
2015-05-11 14:30:19 -07:00
|
|
|
If
|
2015-07-05 16:16:05 -07:00
|
|
|
.Ar shada
|
2015-05-11 14:30:19 -07:00
|
|
|
is
|
|
|
|
.Cm NONE ,
|
2015-07-05 16:16:05 -07:00
|
|
|
do not read or write a ShaDa file.
|
2015-05-11 14:30:19 -07:00
|
|
|
See
|
2015-07-05 16:16:05 -07:00
|
|
|
.Ic :help shada .
|
2015-05-11 14:30:19 -07:00
|
|
|
.It Fl -noplugin
|
|
|
|
Skip loading plugins.
|
|
|
|
Implied by
|
|
|
|
.Cm -u NONE .
|
|
|
|
.It Fl o Ns Op Ar N
|
|
|
|
Open
|
|
|
|
.Ar N
|
|
|
|
windows stacked horizontally.
|
|
|
|
If
|
|
|
|
.Ar N
|
|
|
|
is omitted, open one window for each file.
|
|
|
|
If
|
|
|
|
.Ar N
|
|
|
|
is less than the number of file arguments, allocate windows for the first
|
|
|
|
.Ar N
|
|
|
|
files and hide the rest.
|
|
|
|
.It Fl O Ns Op Ar N
|
2015-08-25 20:20:39 -07:00
|
|
|
Like
|
|
|
|
.Fl o ,
|
|
|
|
but tile windows vertically.
|
2015-05-11 14:30:19 -07:00
|
|
|
.It Fl p Ns Op Ar N
|
2015-08-25 20:20:39 -07:00
|
|
|
Like
|
|
|
|
.Fl o ,
|
|
|
|
but for tab pages.
|
2015-05-11 14:30:19 -07:00
|
|
|
.It Cm + Ns Op Ar linenum
|
|
|
|
For the first file, position the cursor on line
|
|
|
|
.Ar linenum .
|
|
|
|
If
|
|
|
|
.Ar linenum
|
|
|
|
is omitted, position the cursor on the last line of the file.
|
|
|
|
Note that
|
|
|
|
.Cm +5
|
|
|
|
and
|
|
|
|
.Cm -c 5
|
|
|
|
on the command-line are equivalent to
|
|
|
|
.Ic :5
|
|
|
|
inside
|
|
|
|
.Nm .
|
|
|
|
.It Cm +/ Ns Op Ar pattern
|
|
|
|
For the first file, position the cursor on the first occurrence of
|
|
|
|
.Ar pattern .
|
|
|
|
If
|
|
|
|
.Ar pattern
|
|
|
|
is omitted, the most recently used search pattern is used (if there is one).
|
|
|
|
Note that
|
|
|
|
.Cm +/foo
|
|
|
|
and
|
|
|
|
.Cm -c /foo
|
|
|
|
on the command-line are equivalent to
|
|
|
|
.Ic /foo
|
|
|
|
and
|
|
|
|
.Ic :/foo
|
|
|
|
inside
|
|
|
|
.Nm .
|
|
|
|
See
|
|
|
|
.Ic :help search-pattern .
|
|
|
|
.It Fl c Ar command
|
|
|
|
Execute
|
|
|
|
.Ar command
|
|
|
|
after reading the first file.
|
|
|
|
Up to 10 instances of
|
|
|
|
.Fl c
|
|
|
|
or
|
|
|
|
.Cm +
|
|
|
|
can be used.
|
|
|
|
Note that
|
|
|
|
.Qq Cm +set si
|
|
|
|
and
|
|
|
|
.Cm -c \(dqset si\(dq
|
|
|
|
are equivalent.
|
|
|
|
.It Fl -cmd Ar command
|
|
|
|
Like
|
|
|
|
.Fl c ,
|
|
|
|
but execute
|
|
|
|
.Ar command
|
2015-11-10 17:00:04 -07:00
|
|
|
before processing any vimrc.
|
2015-05-11 14:30:19 -07:00
|
|
|
Up to 10 instances of these can be used independently from instances of
|
|
|
|
.Fl c .
|
|
|
|
.It Fl S Op Ar session
|
|
|
|
Source
|
|
|
|
.Ar session
|
|
|
|
after the first file argument has been read.
|
|
|
|
Equivalent to
|
|
|
|
.Cm -c \(dqsource session\(dq .
|
|
|
|
.Ar session
|
2015-05-28 17:03:47 -07:00
|
|
|
cannot start with a hyphen
|
|
|
|
.Pq Sq - .
|
2015-05-11 14:30:19 -07:00
|
|
|
If
|
|
|
|
.Ar session
|
|
|
|
is omitted, then
|
|
|
|
.Pa Session.vim ,
|
|
|
|
if found, is used.
|
|
|
|
See
|
|
|
|
.Ic :help session-file .
|
|
|
|
.It Fl s Ar scriptin
|
|
|
|
Read normal mode commands from
|
|
|
|
.Ar scriptin .
|
|
|
|
The same can be done with the command
|
|
|
|
.Ic :source! scriptin .
|
|
|
|
If the end of the file is reached before
|
|
|
|
.Nm
|
|
|
|
exits, further characters are read from the keyboard.
|
|
|
|
.It Fl w Ar scriptout
|
|
|
|
Append all typed characters to
|
|
|
|
.Ar scriptout .
|
|
|
|
Can be used for creating a script to be used with
|
|
|
|
.Fl s
|
|
|
|
or
|
|
|
|
.Ic :source! .
|
|
|
|
.It Fl W Ar scriptout
|
|
|
|
Like
|
|
|
|
.Fl w ,
|
|
|
|
but truncate
|
|
|
|
.Ar scriptout .
|
|
|
|
.It Fl -startuptime Ar file
|
|
|
|
During startup, append timing messages to
|
|
|
|
.Ar file .
|
|
|
|
Can be used to diagnose slow startup times.
|
|
|
|
.It Fl -api-info
|
|
|
|
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 .
|
|
|
|
.It Fl -headless
|
|
|
|
Do not start a user interface.
|
|
|
|
.It Fl h , -help
|
|
|
|
Print usage information and exit.
|
|
|
|
.It Fl v , -version
|
2014-07-10 21:05:51 -07:00
|
|
|
Print version information and exit.
|
2015-05-11 14:30:19 -07:00
|
|
|
.El
|
|
|
|
.Sh ENVIRONMENT
|
|
|
|
.Bl -tag -width Fl
|
2015-05-28 17:03:47 -07:00
|
|
|
.It Ev VIM
|
2015-10-26 14:15:09 -07:00
|
|
|
Used to locate various user files, such as the user's init.vim.
|
2015-05-28 17:03:47 -07:00
|
|
|
.It Ev VIMRUNTIME
|
|
|
|
Used to locate run time files, such as on-line documentation and
|
|
|
|
syntax highlighting definitions.
|
2015-10-26 14:15:09 -07:00
|
|
|
.It Ev XDG_CONFIG_HOME
|
|
|
|
Path to use for the user-local configuration directory, see
|
|
|
|
.Sx FILES .
|
|
|
|
Defaults to
|
|
|
|
.Pa ~/.config
|
|
|
|
if not set.
|
|
|
|
.It Ev XDG_DATA_HOME
|
|
|
|
Like
|
|
|
|
.Ev XDG_CONFIG_HOME ,
|
|
|
|
but used to store data not generally edited by the user,
|
|
|
|
namely swap, backup, and ShaDa files.
|
|
|
|
Defaults to
|
|
|
|
.Pa ~/.local/share/nvim
|
|
|
|
if not set.
|
2015-05-11 14:30:19 -07:00
|
|
|
.It Ev VIMINIT
|
|
|
|
A string of 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
|
2015-05-28 17:03:47 -07:00
|
|
|
.Cm q .
|
2015-05-11 14:30:19 -07:00
|
|
|
See
|
|
|
|
.Ic :help VIMINIT .
|
|
|
|
.It Ev SHELL
|
|
|
|
Used to set the 'shell' option, which determines the shell used by the
|
|
|
|
.Ic :terminal
|
|
|
|
command.
|
2015-05-17 16:19:41 -07:00
|
|
|
.It Ev NVIM_TUI_ENABLE_CURSOR_SHAPE
|
2015-05-11 14:30:19 -07:00
|
|
|
If defined, change the cursor shape to a vertical bar while in insert mode.
|
|
|
|
Requires that the host terminal support the DECSCUSR CSI escape sequence.
|
|
|
|
Has no effect in GUIs.
|
2015-05-17 16:19:41 -07:00
|
|
|
.It Ev NVIM_TUI_ENABLE_TRUE_COLOR
|
2015-05-11 14:30:19 -07:00
|
|
|
If defined, assume the host terminal supports 24 bit colors.
|
|
|
|
Has no effect in GUIs.
|
|
|
|
.El
|
|
|
|
.Sh FILES
|
2015-10-26 14:15:09 -07:00
|
|
|
.Bl -tag -width "~/.config/nvim/init.vim"
|
|
|
|
.It Pa ~/.config/nvim/init.vim
|
2015-05-11 14:30:19 -07:00
|
|
|
The user-local
|
|
|
|
.Nm
|
|
|
|
configuration file.
|
2015-10-26 14:15:09 -07:00
|
|
|
See
|
|
|
|
.Ev XDG_CONFIG_HOME
|
|
|
|
above.
|
|
|
|
.It Pa ~/.config/nvim
|
2015-05-11 14:30:19 -07:00
|
|
|
The user-local
|
|
|
|
.Nm
|
2015-10-26 14:15:09 -07:00
|
|
|
configuration directory.
|
|
|
|
See
|
|
|
|
.Ev XDG_CONFIG_HOME
|
|
|
|
above.
|
2015-11-10 17:00:04 -07:00
|
|
|
.It Pa $VIM/sysinit.vim
|
2015-05-11 14:30:19 -07:00
|
|
|
The system-global
|
|
|
|
.Nm
|
|
|
|
configuration file.
|
2015-11-10 17:00:04 -07:00
|
|
|
.It Pa /usr/local/share/nvim
|
2015-05-11 14:30:19 -07:00
|
|
|
The system-global
|
|
|
|
.Nm
|
|
|
|
runtime directory.
|
|
|
|
.El
|
|
|
|
.Sh AUTHORS
|
|
|
|
.Nm
|
|
|
|
was started by
|
|
|
|
.An Thiago de Arruda ,
|
|
|
|
with a lot of help from others.
|
|
|
|
.Pp
|
2015-08-25 20:20:39 -07:00
|
|
|
Most of Vim was written by
|
2015-05-11 14:30:19 -07:00
|
|
|
.An -nosplit
|
|
|
|
.An Bram Moolenaar ,
|
|
|
|
with a lot of help from others.
|
|
|
|
See
|
|
|
|
.Ic :help credits .
|
|
|
|
.Pp
|
2015-08-25 20:20:39 -07:00
|
|
|
Vim is based on Stevie, worked on by
|
2015-05-11 14:30:19 -07:00
|
|
|
.An Tim Thompson ,
|
|
|
|
.An Tony Andrews ,
|
|
|
|
and
|
|
|
|
.An G.R. (Fred) Walter .
|