Merge pull request #2605 from Pyrohh/manpages

[RDY] Rewrite English man pages in mdoc, update for Nvim
This commit is contained in:
Michael Reed
2015-05-13 19:55:45 -04:00
23 changed files with 498 additions and 569 deletions

418
man/nvim.1 Normal file
View File

@@ -0,0 +1,418 @@
.Dd May 13, 2015
.Dt NVIM 1
.Os Neovim
.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
.Fl q Ar errorfile
.Sh DESCRIPTION
.Nm
is a text editor based on
.Xr vim 1 .
To enter commands in
.Nm ,
type a colon
.Qq ( Cm \&: ) ,
which is also used in this manual to denote commands.
For more information, consult the on-line help system with the
.Ic :help
command.
.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
Read text from standard input until EOF, then open a buffer with that text.
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
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 .
.It Fl q Ar errorfile
QuickFix mode.
Display the first error in
.Ar errorfile .
If
.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.
Can be used to edit files starting with a hyphen.
.It Fl -literal
Interpret filenames literally, that is do not expand wildcards.
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
is specified before
.Fl s .
.It Fl d Op Ar file ...
Diff mode.
Show the difference between two to four files.
If
.Ar file
is omitted, options related to diff mode are still set.
See
.Ic :help diff .
.It Fl R
Read-only mode.
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
Restricted mode.
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
Verbose.
Print messages about which files are being sourced and for reading and
writing an nviminfo file.
.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.
.It Fl r , L
List swap files with information about recovering them.
.It Fl r Ar file
Recovery mode.
The swap file
.Ar file
is used to recover a crashed session.
The swap file has the same filename as the text file, but with ".swp" appended.
See
.Ic :help recovery .
.It Fl u Ar nvimrc
Use
.Ar nvimrc
instead of the default of
.Pa ~/.nvimrc .
If
.Ar nvimrc
is
.Cm NORC ,
do not load any initialization files (excluding plugins),
and do not attempt to parse environment variables.
If
.Ar nvimrc
is
.Cm NONE ,
loading plugins is also skipped.
See
.Ic :help initialization .
.It Fl i Ar nviminfo
Use
.Ar nviminfo
instead of the default of
.Pa ~/.nviminfo .
If
.Ar nviminfo
is
.Cm NONE ,
do not read or write an nviminfo file.
See
.Ic :help viminfo .
.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
Open
.Ar N
windows stacked vertically.
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 p Ns Op Ar N
Open
.Ar N
tab pages.
If
.Ar N
is omitted, open one tab page for each file.
If
.Ar N
is less than the number of file arguments, allocate tab pages for the first
.Ar N
files and hide the rest.
.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
before processing any nvimrc.
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
cannot start with a hyphen.
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
Print version information and exit.
.El
.Sh ENVIRONMENT
.Bl -tag -width Fl
.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
.Qq Cm q .
See
.Ic :help VIMINIT .
.It Ev VIM
Used to locate various user files, such as the user-local nvimrc.
.It Ev VIMRUNTIME
Used to locate run time files, such as on-line documentation and
syntax highlighting definitions.
.It Ev SHELL
Used to set the 'shell' option, which determines the shell used by the
.Ic :terminal
command.
.It Ev NVIM_TUI_CURSOR_SHAPE
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.
.It Ev NVIM_TUI_TRUE_COLOR
If defined, assume the host terminal supports 24 bit colors.
Has no effect in GUIs.
.El
.Sh FILES
.Bl -tag -width Pa
.It Pa ~/.nvimrc , ~/.nvim/nvimrc
The user-local
.Nm
configuration file.
.It Pa ~/.nvim
The user-local
.Nm
run time directory.
.It Pa /etc/nvim/nvimrc
The system-global
.Nm
configuration file.
.It Pa /usr/share/nvim
The system-global
.Nm
runtime directory.
.El
.Sh SEE ALSO
.Xr nvimtutor 1
.Sh AUTHORS
.Nm
was started by
.An Thiago de Arruda ,
with a lot of help from others.
.Pp
Most of
.Xr vim 1
was written by
.An -nosplit
.An Bram Moolenaar ,
with a lot of help from others.
See
.Ic :help credits .
.Pp
.Xr vim 1
is based on Stevie, worked on by
.An Tim Thompson ,
.An Tony Andrews ,
and
.An G.R. (Fred) Walter .

44
man/nvimtutor.1 Normal file
View File

@@ -0,0 +1,44 @@
.Dd May 13, 2015
.Dt NVIMTUTOR 1
.Os Neovim
.Sh NAME
.Nm nvimtutor
.Nd Neovim tutor
.Sh SYNOPSIS
.Nm
.Op Ar language
.Sh DESCRIPTION
.Nm
starts an interactive tutorial meant to teach the basics of
.Xr vim 1 .
The optional
.Ar language
argument is the two-letter name of a language,
such as
.Sy it
or
.Sy es .
If
.Ar language
is omitted, the language dictated by the current locale is used.
If a tutorial for
.Ar language
isn't available, the English tutorial will be used.
.Sh SEE ALSO
.Xr nvim 1
.Sh AUTHORS
Vimtutor was originally written for
.Xr vi 1
by
.An -nosplit
.An Michael C. Pierce
and
.An Robert K. Ware ,
Colorado School of Mines, using ideas supplied by
.An Charles Smith Aq Mt bware@mines.colorado.edua .
.Pp
It was modified for
.Xr vim 1
by
.An Bram Moolenaar .
See the tutor files for the names of the individual translators.

View File

@@ -12,31 +12,10 @@ VIMEXE = vim
DOCS = $(wildcard *.txt) DOCS = $(wildcard *.txt)
HTMLS = $(DOCS:.txt=.html) HTMLS = $(DOCS:.txt=.html)
MANPAGES = \
manpages/vim.man \
manpages/vimtutor.man \
manpages/xxd.man \
manpages/de/vim-de.man \
manpages/fr/vim-fr.man \
manpages/fr/vimtutor-fr.man \
manpages/fr/xxd-fr.man \
manpages/pl/vim-pl.man \
manpages/pl/vimtutor-pl.man \
manpages/pl/xxd-pl.man \
manpages/it/vim-it.man \
manpages/it/vimtutor-it.man \
manpages/it/xxd-it.man \
manpages/ru/vim-ru.man \
manpages/ru/vimtutor-ru.man \
manpages/ru/xxd-ru.man \
manpages/ja/vim-ja.man \
manpages/ja/vimtutor-ja.man \
manpages/ja/xxd-ja.man
.SUFFIXES: .SUFFIXES:
.SUFFIXES: .c .o .txt .html .1 .man .SUFFIXES: .c .o .txt .html
all: tags manpages html all: tags html
# Use Vim to generate the tags file. Can only be used when Vim has been # Use Vim to generate the tags file. Can only be used when Vim has been
# compiled and installed. Supports multiple languages. # compiled and installed. Supports multiple languages.
@@ -51,12 +30,6 @@ tags: doctags $(DOCS)
doctags: doctags.c doctags: doctags.c
$(CC) doctags.c -o doctags $(CC) doctags.c -o doctags
manpages: $(MANPAGES)
# OSX groff doesn't support utf-8 as input encoding, so this won't work there.
.1.man:
groff -k -mandoc -Tutf8 $< | sed -e s/.^H//g > $@
# Awk version of .txt to .html conversion. # Awk version of .txt to .html conversion.
html: noerrors tags $(HTMLS) html: noerrors tags $(HTMLS)
@if test -f errors.log; then cat errors.log; fi @if test -f errors.log; then cat errors.log; fi
@@ -81,5 +54,5 @@ tags.ref tags.html: tags
$(AWK) -f maketags.awk tags >tags.html $(AWK) -f maketags.awk tags >tags.html
clean: clean:
-rm -f doctags *.html tags.ref $(MANPAGES) $(HTMLS) errors.log -rm -f doctags *.html tags.ref $(HTMLS) errors.log

View File

@@ -1,456 +0,0 @@
.TH VIM 1 "2006 Apr 11"
.SH NAME
vim \- Vi IMproved, a programmers text editor
.SH SYNOPSIS
.br
.B vim
[options] [file ..]
.br
.B vim
[options] \-
.br
.B vim
[options] \-t tag
.br
.B vim
[options] \-q [errorfile]
.SH DESCRIPTION
.B Vim
is a text editor that is upwards compatible to Vi.
It can be used to edit all kinds of plain text.
It is especially useful for editing programs.
.PP
There are a lot of enhancements above Vi: multi level undo,
multi windows and buffers, syntax highlighting, command line
editing, filename completion, on-line help, visual selection, etc..
See ":help vi_diff.txt" for a summary of the differences between
.B Vim
and Vi.
.PP
While running
.B Vim
a lot of help can be obtained from the on-line help system, with the ":help"
command.
See the ON-LINE HELP section below.
.PP
Most often
.B Vim
is started to edit a single file with the command
.PP
vim file
.PP
More generally
.B Vim
is started with:
.PP
vim [options] [filelist]
.PP
If the filelist is missing, the editor will start with an empty buffer.
Otherwise exactly one out of the following four may be used to choose one or
more files to be edited.
.TP 12
file ..
A list of filenames.
The first one will be the current file and read into the buffer.
The cursor will be positioned on the first line of the buffer.
You can get to the other files with the ":next" command.
To edit a file that starts with a dash, precede the filelist with "\-\-".
.TP
\-
The file to edit is read from stdin. Commands are read from stderr, which
should be a tty.
.TP
\-t {tag}
The file to edit and the initial cursor position depends on a "tag", a sort
of goto label.
{tag} is looked up in the tags file, the associated file becomes the current
file and the associated command is executed.
Mostly this is used for C programs, in which case {tag} could be a function
name.
The effect is that the file containing that function becomes the current file
and the cursor is positioned on the start of the function.
See ":help tag\-commands".
.TP
\-q [errorfile]
Start in quickFix mode.
The file [errorfile] is read and the first error is displayed.
If [errorfile] is omitted, the filename is obtained from the 'errorfile'
option (defaults to "errors.err").
Further errors can be jumped to with the ":cn" command.
See ":help quickfix".
.SH OPTIONS
The options may be given in any order, before or after filenames.
Options without an argument can be combined after a single dash.
.TP 12
+[num]
For the first file the cursor will be positioned on line "num".
If "num" is missing, the cursor will be positioned on the last line.
.TP
+/{pat}
For the first file the cursor will be positioned on the
first occurrence of {pat}.
See ":help search\-pattern" for the available search patterns.
.TP
+{command}
.TP
\-c {command}
{command} will be executed after the
first file has been read.
{command} is interpreted as an Ex command.
If the {command} contains spaces it must be enclosed in double quotes (this
depends on the shell that is used).
Example: Vim "+set si" main.c
.br
Note: You can use up to 10 "+" or "\-c" commands.
.TP
\-S {file}
{file} will be sourced after the first file has been read.
This is equivalent to \-c "source {file}".
{file} cannot start with '\-'.
If {file} is omitted "Session.vim" is used (only works when \-S is the last
argument).
.TP
\-\-cmd {command}
Like using "\-c", but the command is executed just before
processing any vimrc file.
You can use up to 10 of these commands, independently from "\-c" commands.
.TP
\-A
If
.B Vim
has been compiled with ARABIC support for editing right-to-left
oriented files and Arabic keyboard mapping, this option starts
.B Vim
in Arabic mode, i.e. 'arabic' is set. Otherwise an error
message is given and
.B Vim
aborts.
.TP
\-b
Binary mode.
A few options will be set that makes it possible to edit a binary or
executable file.
.TP
\-d
Start in diff mode.
There should be two, three, or four file name arguments.
.TP
\-D
Debugging. Go to debugging mode when executing the first command from a
script.
.TP
\-e
Start
.B Vim
in Ex mode.
.TP
\-E
Start
.B Vim
in improved Ex mode.
.TP
\-f
Foreground. For the GUI version,
.B Vim
will not fork and detach from the shell it was started in.
This option should be used when
.B Vim
is executed by a program that will wait for the edit
session to finish (e.g. mail).
.TP
\-F
If
.B Vim
has been compiled with FKMAP support for editing right-to-left
oriented files and Farsi keyboard mapping, this option starts
.B Vim
in Farsi mode, i.e. 'fkmap' and 'rightleft' are set.
Otherwise an error message is given and
.B Vim
aborts.
.TP
\-g
If
.B Vim
has been compiled with GUI support, this option enables the GUI.
If no GUI support was compiled in, an error message is given and
.B Vim
aborts.
.TP
\-h
Give a bit of help about the command line arguments and options.
After this
.B Vim
exits.
.TP
\-H
If
.B Vim
has been compiled with RIGHTLEFT support for editing right-to-left
oriented files and Hebrew keyboard mapping, this option starts
.B Vim
in Hebrew mode, i.e. 'hkmap' and 'rightleft' are set.
Otherwise an error message is given and
.B Vim
aborts.
.TP
\-i {viminfo}
When using the viminfo file is enabled, this option sets the filename to use,
instead of the default "~/.viminfo".
This can also be used to skip the use of the .viminfo file, by giving the name
"NONE".
.TP
\-L
Same as \-r.
.TP
\-l
Lisp mode.
Sets the 'lisp' and 'showmatch' options on.
.TP
\-m
Modifying files is disabled.
Resets the 'write' option.
You can still modify the buffer, but writing a file is not possible.
.TP
\-M
Modifications not allowed. The 'modifiable' and 'write' options will be unset,
so that changes are not allowed and files can not be written. Note that these
options can be set to enable making modifications.
.TP
\-n
No swap file will be used.
Recovery after a crash will be impossible.
Handy if you want to edit a file on a very slow medium (e.g. floppy).
Can also be done with ":set uc=0".
Can be undone with ":set uc=200".
.TP
\-nb
Become an editor server for NetBeans. See the docs for details.
.TP
\-o[N]
Open N windows stacked.
When N is omitted, open one window for each file.
.TP
\-O[N]
Open N windows side by side.
When N is omitted, open one window for each file.
.TP
\-p[N]
Open N tab pages.
When N is omitted, open one tab page for each file.
.TP
\-R
Read-only mode.
The 'readonly' option will be set.
You can still edit the buffer, but will be prevented from accidently
overwriting a file.
If you do want to overwrite a file, add an exclamation mark to the Ex command,
as in ":w!".
The \-R option also implies the \-n option (see below).
The 'readonly' option can be reset with ":set noro".
See ":help 'readonly'".
.TP
\-r
List swap files, with information about using them for recovery.
.TP
\-r {file}
Recovery mode.
The swap file is used to recover a crashed editing session.
The swap file is a file with the same filename as the text file with ".swp"
appended.
See ":help recovery".
.TP
\-s
Silent mode. Only when the "\-e" option was given before the "\-s" option.
.TP
\-s {scriptin}
The script file {scriptin} is read.
The characters in the file are interpreted as if you had typed them.
The same can be done with the command ":source! {scriptin}".
If the end of the file is reached before the editor exits, further characters
are read from the keyboard.
.TP
\-T {terminal}
Tells
.B Vim
the name of the terminal you are using.
Only required when the automatic way doesn't work.
Should be a terminal known
to
.B Vim
(builtin) or defined in the termcap or terminfo file.
.TP
\-u {vimrc}
Use the commands in the file {vimrc} for initializations.
All the other initializations are skipped.
Use this to edit a special kind of files.
It can also be used to skip all initializations by giving the name "NONE".
See ":help initialization" within vim for more details.
.TP
\-U {gvimrc}
Use the commands in the file {gvimrc} for GUI initializations.
All the other GUI initializations are skipped.
It can also be used to skip all GUI initializations by giving the name "NONE".
See ":help gui\-init" within vim for more details.
.TP
\-V[N]
Verbose. Give messages about which files are sourced and for reading and
writing a viminfo file. The optional number N is the value for 'verbose'.
Default is 10.
.TP
\-w {scriptout}
All the characters that you type are recorded in the file
{scriptout}, until you exit
.B Vim.
This is useful if you want to create a script file to be used with "vim \-s" or
":source!".
If the {scriptout} file exists, characters are appended.
.TP
\-W {scriptout}
Like \-w, but an existing file is overwritten.
.TP
\-X
Don't connect to the X server. Shortens startup time in a terminal, but the
window title and clipboard will not be used.
.TP
\-Z
Restricted mode.
.TP
\-\-
Denotes the end of the options.
Arguments after this will be handled as a file name.
This can be used to edit a filename that starts with a '\-'.
.TP
\-\-echo\-wid
GTK GUI only: Echo the Window ID on stdout.
.TP
\-\-help
Give a help message and exit, just like "\-h".
.TP
\-\-literal
Take file name arguments literally, do not expand wildcards. This has no
effect on Unix where the shell expands wildcards.
.TP
\-\-noplugin
Skip loading plugins. Implied by \-u NONE.
.TP
\-\-remote
Connect to a Vim server and make it edit the files given in the rest of the
arguments. If no server is found a warning is given and the files are edited
in the current Vim.
.TP
\-\-remote\-expr {expr}
Connect to a Vim server, evaluate {expr} in it and print the result on stdout.
.TP
\-\-remote\-send {keys}
Connect to a Vim server and send {keys} to it.
.TP
\-\-remote\-silent
As \-\-remote, but without the warning when no server is found.
.TP
\-\-remote\-wait
As \-\-remote, but Vim does not exit until the files have been edited.
.TP
\-\-remote\-wait\-silent
As \-\-remote\-wait, but without the warning when no server is found.
.TP
\-\-serverlist
List the names of all Vim servers that can be found.
.TP
\-\-servername {name}
Use {name} as the server name. Used for the current Vim, unless used with a
\-\-remote argument, then it's the name of the server to connect to.
.TP
\-\-socketid {id}
GTK GUI only: Use the GtkPlug mechanism to run gvim in another window.
.TP
\-\-version
Print version information and exit.
.SH ON-LINE HELP
Type ":help" in
.B Vim
to get started.
Type ":help subject" to get help on a specific subject.
For example: ":help ZZ" to get help for the "ZZ" command.
Use <Tab> and CTRL-D to complete subjects (":help cmdline\-completion").
Tags are present to jump from one place to another (sort of hypertext links,
see ":help").
All documentation files can be viewed in this way, for example
":help syntax.txt".
.SH FILES
.TP 15
/usr/local/lib/vim/doc/*.txt
The
.B Vim
documentation files.
Use ":help doc\-file\-list" to get the complete list.
.TP
/usr/local/lib/vim/doc/tags
The tags file used for finding information in the documentation files.
.TP
/usr/local/lib/vim/syntax/syntax.vim
System wide syntax initializations.
.TP
/usr/local/lib/vim/syntax/*.vim
Syntax files for various languages.
.TP
/usr/local/lib/vim/vimrc
System wide
.B Vim
initializations.
.TP
~/.vimrc
Your personal
.B Vim
initializations.
.TP
/usr/local/lib/vim/gvimrc
System wide gvim initializations.
.TP
~/.gvimrc
Your personal gvim initializations.
.TP
/usr/local/lib/vim/optwin.vim
Script used for the ":options" command, a nice way to view and set options.
.TP
/usr/local/lib/vim/menu.vim
System wide menu initializations for gvim.
.TP
/usr/local/lib/vim/bugreport.vim
Script to generate a bug report. See ":help bugs".
.TP
/usr/local/lib/vim/filetype.vim
Script to detect the type of a file by its name. See ":help 'filetype'".
.TP
/usr/local/lib/vim/scripts.vim
Script to detect the type of a file by its contents. See ":help 'filetype'".
.TP
/usr/local/lib/vim/print/*.ps
Files used for PostScript printing.
.PP
For recent info read the VIM home page:
.br
<URL:http://www.vim.org/>
.SH SEE ALSO
vimtutor(1)
.SH AUTHOR
Most of
.B Vim
was made by Bram Moolenaar, with a lot of help from others.
See ":help credits" in
.B Vim.
.br
.B Vim
is based on Stevie, worked on by: Tim Thompson,
Tony Andrews and G.R. (Fred) Walter.
Although hardly any of the original code remains.
.SH BUGS
Probably.
See ":help todo" for a list of known problems.
.PP
Note that a number of things that may be regarded as bugs by some, are in fact
caused by a too-faithful reproduction of Vi's behaviour.
And if you think other things are bugs "because Vi does it differently",
you should take a closer look at the vi_diff.txt file (or type :help
vi_diff.txt when in Vim).
Also have a look at the 'compatible' and 'cpoptions' options.

View File

@@ -1,57 +0,0 @@
.TH VIMTUTOR 1 "2001 April 2"
.SH NAME
vimtutor \- the Vim tutor
.SH SYNOPSIS
.br
.B vimtutor [\-g] [language]
.SH DESCRIPTION
.B Vimtutor
starts the
.B Vim
tutor.
It copies the tutor file first, so that it can be modified without changing
the original file.
.PP
The
.B Vimtutor
is useful for people that want to learn their first
.B Vim
commands.
.PP
The optional argument \-g starts vimtutor with gvim rather than vim, if the
GUI version of vim is available, or falls back to Vim if gvim is not found.
.PP
The optional [language] argument is the two-letter name of a language, like
"it" or "es".
If the [language] argument is missing, the language of the current locale will
be used.
If a tutor in this language is available, it will be used.
Otherwise the English version will be used.
.PP
.B Vim
is always started in Vi compatible mode.
.SH FILES
.TP 15
/usr/local/lib/vim/tutor/tutor[.language]
The
.B Vimtutor
text file(s).
.TP 15
/usr/local/lib/vim/tutor/tutor.vim
The Vim script used to copy the
.B Vimtutor
text file.
.SH AUTHOR
The
.B Vimtutor
was originally written for Vi by Michael C. Pierce and Robert K. Ware,
Colorado School of Mines using ideas supplied by Charles Smith,
Colorado State University.
E-mail: bware@mines.colorado.edu.
.br
It was modified for
.B Vim
by Bram Moolenaar.
For the names of the translators see the tutor files.
.SH SEE ALSO
vim(1)

View File

@@ -901,14 +901,11 @@ static void command_line_scan(mparm_T *parmp)
/* "--literal" take files literally */ /* "--literal" take files literally */
/* "--noplugin[s]" skip plugins */ /* "--noplugin[s]" skip plugins */
/* "--cmd <cmd>" execute cmd before vimrc */ /* "--cmd <cmd>" execute cmd before vimrc */
if (STRICMP(argv[0] + argv_idx, "help") == 0) if (STRICMP(argv[0] + argv_idx, "help") == 0) {
usage(); usage();
else if (STRICMP(argv[0] + argv_idx, "version") == 0) { mch_exit(0);
Columns = 80; /* need to init Columns */ } else if (STRICMP(argv[0] + argv_idx, "version") == 0) {
info_message = TRUE; /* use mch_msg(), not mch_errmsg() */ version();
list_version();
msg_putchar('\n');
msg_didout = FALSE;
mch_exit(0); mch_exit(0);
} else if (STRICMP(argv[0] + argv_idx, "api-info") == 0) { } else if (STRICMP(argv[0] + argv_idx, "api-info") == 0) {
msgpack_sbuffer* b = msgpack_sbuffer_new(); msgpack_sbuffer* b = msgpack_sbuffer_new();
@@ -981,7 +978,7 @@ static void command_line_scan(mparm_T *parmp)
case 'h': /* "-h" give help message */ case 'h': /* "-h" give help message */
usage(); usage();
break; mch_exit(0);
case 'H': /* "-H" start in Hebrew mode: rl + hkmap set */ case 'H': /* "-H" start in Hebrew mode: rl + hkmap set */
p_hkmap = TRUE; p_hkmap = TRUE;
@@ -1083,6 +1080,9 @@ static void command_line_scan(mparm_T *parmp)
case 'd': /* "-d" 'diff' */ case 'd': /* "-d" 'diff' */
parmp->diff_mode = TRUE; parmp->diff_mode = TRUE;
break; break;
case 'v':
version();
mch_exit(0);
case 'V': /* "-V{N}" Verbose level */ case 'V': /* "-V{N}" Verbose level */
/* default is 10: a little bit verbose */ /* default is 10: a little bit verbose */
p_verbose = get_number_arg(argv[0], &argv_idx, 10); p_verbose = get_number_arg(argv[0], &argv_idx, 10);
@@ -1959,8 +1959,16 @@ static void mainerr(int n, const char *str)
mch_exit(1); mch_exit(1);
} }
/// Prints version information for "nvim -v" or "nvim --version".
static void version(void)
{
info_message = TRUE; // use mch_msg(), not mch_errmsg()
list_version();
msg_putchar('\n');
msg_didout = FALSE;
}
/// Prints help message for "nvim -h" or "nvim --help" and exits. /// Prints help message for "nvim -h" or "nvim --help".
static void usage(void) static void usage(void)
{ {
signal_stop(); // kill us with CTRL-C here, if you like signal_stop(); // kill us with CTRL-C here, if you like
@@ -1979,43 +1987,42 @@ static void usage(void)
mch_msg(_(" -E Improved Ex mode\n")); mch_msg(_(" -E Improved Ex mode\n"));
mch_msg(_(" -s Silent (batch) mode (only for ex mode)\n")); mch_msg(_(" -s Silent (batch) mode (only for ex mode)\n"));
mch_msg(_(" -d Diff mode\n")); mch_msg(_(" -d Diff mode\n"));
mch_msg(_(" -R Readonly mode\n")); mch_msg(_(" -R Read-only mode\n"));
mch_msg(_(" -Z Restricted mode\n")); mch_msg(_(" -Z Restricted mode\n"));
mch_msg(_(" -m Modifications (writing files) not allowed\n")); mch_msg(_(" -m Modifications (writing files) not allowed\n"));
mch_msg(_(" -M Modifications in text not allowed\n")); mch_msg(_(" -M Modifications in text not allowed\n"));
mch_msg(_(" -b Binary mode\n")); mch_msg(_(" -b Binary mode\n"));
mch_msg(_(" -l Lisp mode\n")); mch_msg(_(" -l Lisp mode\n"));
mch_msg(_(" -A Arabic mode\n"));
mch_msg(_(" -F Farsi mode\n"));
mch_msg(_(" -H Hebrew mode\n"));
mch_msg(_(" -V[N][file] Be verbose [level N][log messages to file]\n")); mch_msg(_(" -V[N][file] Be verbose [level N][log messages to file]\n"));
mch_msg(_(" -D Debugging mode\n")); mch_msg(_(" -D Debugging mode\n"));
mch_msg(_(" -n No swap file, use memory only\n")); mch_msg(_(" -n No swap file, use memory only\n"));
mch_msg(_(" -r List swap files and exit\n")); mch_msg(_(" -r, -L List swap files and exit\n"));
mch_msg(_(" -r <file> Recover crashed session\n")); mch_msg(_(" -r <file> Recover crashed session\n"));
mch_msg(_(" -A Start in Arabic mode\n"));
mch_msg(_(" -F Start in Farsi mode\n"));
mch_msg(_(" -H Start in Hebrew mode\n"));
mch_msg(_(" -T <terminal> Set terminal type to <terminal>\n")); mch_msg(_(" -T <terminal> Set terminal type to <terminal>\n"));
mch_msg(_(" -u <nvimrc> Use <nvimrc> instead of any .nvimrc\n")); mch_msg(_(" -u <nvimrc> Use <nvimrc> instead of the default\n"));
mch_msg(_(" -i <nviminfo> Use <nviminfo> instead of the default\n"));
mch_msg(_(" --noplugin Don't load plugin scripts\n")); mch_msg(_(" --noplugin Don't load plugin scripts\n"));
mch_msg(_(" -p[N] Open N tab pages (default: one for each file)\n"));
mch_msg(_(" -o[N] Open N windows (default: one for each file)\n")); mch_msg(_(" -o[N] Open N windows (default: one for each file)\n"));
mch_msg(_(" -O[N] Like -o but split vertically\n")); mch_msg(_(" -O[N] Like -o but split vertically\n"));
mch_msg(_(" -p[N] Open N tab pages (default: one for each file)\n"));
mch_msg(_(" + Start at end of file\n")); mch_msg(_(" + Start at end of file\n"));
mch_msg(_(" +<lnum> Start at line <lnum>\n")); mch_msg(_(" +<linenum> Start at line <linenum>\n"));
mch_msg(_(" +/<pattern> Start at first occurrence of <pattern>\n"));
mch_msg(_(" --cmd <command> Execute <command> before loading any nvimrc\n")); mch_msg(_(" --cmd <command> Execute <command> before loading any nvimrc\n"));
mch_msg(_(" -c <command> Execute <command> after loading the first file\n")); mch_msg(_(" -c <command> Execute <command> after loading the first file\n"));
mch_msg(_(" -S <session> Source file <session> after loading the first file\n")); mch_msg(_(" -S <session> Source <session> after loading the first file\n"));
mch_msg(_(" -s <scriptin> Read Normal mode commands from file <scriptin>\n")); mch_msg(_(" -s <scriptin> Read Normal mode commands from <scriptin>\n"));
mch_msg(_(" -w <scriptout> Append all typed commands to file <scriptout>\n")); mch_msg(_(" -w <scriptout> Append all typed characters to <scriptout>\n"));
mch_msg(_(" -W <scriptout> Write all typed commands to file <scriptout>\n")); mch_msg(_(" -W <scriptout> Write all typed characters to <scriptout>\n"));
mch_msg(_(" --startuptime <file> Write startup timing messages to <file>\n")); mch_msg(_(" --startuptime <file> Write startup timing messages to <file>\n"));
mch_msg(_(" -i <nviminfo> Use <nviminfo> instead of .nviminfo\n"));
mch_msg(_(" --api-info Dump API metadata serialized to msgpack and exit\n")); mch_msg(_(" --api-info Dump API metadata serialized to msgpack and exit\n"));
mch_msg(_(" --embed Use stdin/stdout as a msgpack-rpc channel\n")); mch_msg(_(" --embed Use stdin/stdout as a msgpack-rpc channel\n"));
mch_msg(_(" --headless Don't start a user interface\n")); mch_msg(_(" --headless Don't start a user interface\n"));
mch_msg(_(" --version Print version information and exit\n")); mch_msg(_(" -v, --version Print version information and exit\n"));
mch_msg(_(" -h | --help Print this help message and exit\n")); mch_msg(_(" -h, --help Print this help message and exit\n"));
mch_exit(0);
} }