1NVIM(1)                   BSD General Commands Manual                  NVIM(1)
2

NAME

4     nvim — edit text
5

SYNOPSIS

7     nvim [options] [file ...]
8     nvim [options] -
9     nvim [options] -t tag
10     nvim [options] -q [errorfile]
11

DESCRIPTION

13     nvim is a text editor based on Vim.  Start nvim followed by any number of
14     options and/or files:
15
16           nvim [options] [file ...]
17
18     Commands in nvim begin with colon (‘:’).  Type ":help subject" to get
19     help on a specific subject.  Use <Tab> and CTRL-D to complete subjects
20     (":help cmdline-completion").
21
22     The "quickref" help section is a condensed reference of editor features:
23           :help quickref
24
25     If you are new to Vim/Nvim, start with the 30-minute tutorial:
26           :Tutor
27
28     After installing/updating Nvim, it's a good idea to run the self-check:
29           :checkhealth
30
31     file ...    File(s) to edit.  Opens one buffer per file.  To switch
32                 between buffers, use the :next and :previous commands.
33
34     -           Reads text from standard input until EOF, then opens a buffer
35                 with that text.  User input is read from standard error,
36                 which should be a terminal.
37

OPTIONS

39     -t tag      Finds tag in the tags file, the associated file becomes the
40                 current file and the associated command is executed.  Cursor
41                 is positioned at the tag location in the file.  :help tag-
42                 commands
43
44     -q [errorfile]
45                 QuickFix mode.  Display the first error in errorfile.  If
46                 errorfile is omitted, the value of the 'errorfile' option is
47                 used (defaults to errors.err).  Further errors can be jumped
48                 to with the :cnext command.  :help quickfix
49
50     --          End of options.  Remaining arguments are treated as literal
51                 file names, including filenames starting with hyphen (‘-’).
52
53     -e          Ex mode, reading stdin as Ex commands.  :help Ex-mode
54
55     -E          Ex mode, reading stdin as text.  :help Ex-mode
56
57     -es         Silent (non-interactive) Ex mode, reading stdin as Ex com‐
58                 mands.  Useful for scripting because it does NOT start a UI,
59                 unlike -e.  :help silent-mode
60
61     -Es         Silent (non-interactive) Ex mode, reading stdin as text.
62                 Useful for scripting because it does NOT start a UI, unlike
63                 -E.  :help silent-mode
64
65     -d          Diff mode.  Show the difference between two to four files,
66                 similar to sdiff(1).  :help diff
67
68     -R          Read-only mode.  Sets the 'readonly' option.  Implies -n.
69                 Buffers can still be edited, but cannot be written to disk if
70                 already associated with a file.  To overwrite a file, add an
71                 exclamation mark to the relevant Ex command, such as :w!.
72                 :help 'readonly'
73
74     -Z          Restricted mode.  Disable commands that make use of an exter‐
75                 nal shell.
76
77     -m          Resets the 'write' option, to disable file modifications.
78                 Writing to a file is disabled, but buffers can still be modi‐
79                 fied.
80
81     -M          Resets the 'write' and 'modifiable' options, to disable file
82                 and buffer modifications.
83
84     -b          Binary mode.  :help edit-binary
85
86     -l          Lisp mode.  Sets the 'lisp' and 'showmatch' options.
87
88     -A          Arabic mode.  Sets the 'arabic' option.
89
90     -H          Hebrew mode.  Sets the 'hkmap' and 'rightleft' options.
91
92     -V[N][file]
93                 Verbose mode.  Prints debug messages.  N is the 'verbose'
94                 level, defaults to 10.  If file is specified, append messages
95                 to file instead of printing them.  :help 'verbose'
96
97     -D          Debug mode for VimL (Vim script).  Started when executing the
98                 first command from a script.  :help debug-mode
99
100     -n          Disable the use of swap files.  Sets the 'updatecount' option
101                 to 0.  Can be useful for editing files on a slow medium.
102
103     -r [file]   Recovery mode.  If file is omitted then list swap files with
104                 recovery information.  Otherwise the swap file file is used
105                 to recover a crashed session.  The swap file has the same
106                 name as the file it's associated with, but with ‘.swp’
107                 appended.  :help recovery
108
109     -L [file]   Alias for -r.
110
111     -u vimrc    Use vimrc instead of the default ~/.config/nvim/init.vim.  If
112                 vimrc is NORC, do not load any initialization files (except
113                 plugins), and do not attempt to parse environment variables.
114                 If vimrc is NONE, loading plugins is also skipped.  :help
115                 initialization
116
117     -i shada    Use shada instead of the default
118                 ~/.local/share/nvim/shada/main.shada.  If shada is NONE, do
119                 not read or write a ShaDa file.  :help shada
120
121     --noplugin  Skip loading plugins.  Implied by -u NONE.
122
123     --clean     Skip loading plugins and shada (viminfo) file.
124
125     -o[N]       Open N windows stacked horizontally.  If N is omitted, open
126                 one window for each file.  If N is less than the number of
127                 file arguments, allocate windows for the first N files and
128                 hide the rest.
129
130     -O[N]       Like -o, but tile windows vertically.
131
132     -p[N]       Like -o, but for tab pages.
133
134     +[linenum]  For the first file, position the cursor on line linenum.  If
135                 linenum is omitted, position the cursor on the last line of
136                 the file.  +5 and -c 5 on the command-line are equivalent to
137                 :5 inside nvim.
138
139     +/[pattern]
140                 For the first file, position the cursor on the first occur‐
141                 rence of pattern.  If pattern is omitted, the most recent
142                 search pattern is used (if any).  +/foo and -c /foo on the
143                 command-line are equivalent to /foo and :/foo inside nvim.
144                 :help search-pattern
145
146     +command, -c command
147                 Execute command after reading the first file.  Up to 10
148                 instances allowed.  "+foo" and -c "foo" are equivalent.
149
150     --cmd command
151                 Like -c, but execute command before processing any vimrc.  Up
152                 to 10 instances of these can be used independently from
153                 instances of -c.
154
155     -S [session]
156                 Source session after the first file argument has been read.
157                 Equivalent to -c "source session".  session cannot start with
158                 a hyphen (‘-’).  If session is omitted then Session.vim is
159                 used, if found.  :help session-file
160
161     -s scriptin
162                 Read normal mode commands from scriptin.  The same can be
163                 done with the command :source! scriptin.  If the end of the
164                 file is reached before nvim exits, further characters are
165                 read from the keyboard.
166
167     -w scriptout
168                 Append all typed characters to scriptout.  Can be used for
169                 creating a script to be used with -s or :source!.
170
171     -W scriptout
172                 Like -w, but truncate scriptout.
173
174     --startuptime file
175                 During startup, append timing messages to file.  Can be used
176                 to diagnose slow startup times.
177
178     --api-info  Dump API metadata serialized to msgpack and exit.
179
180     --embed     Use standard input and standard output as a msgpack-rpc chan‐
181                 nel.  :help --embed
182
183     --headless  Do not start a UI.  When supplied with --embed this implies
184                 that the embedding application does not intend to (immedi‐
185                 ately) start a UI.  Also useful for "scraping" messages in a
186                 pipe.  :help --headless
187
188     --listen address
189                 Start RPC server on this pipe or TCP socket.
190
191     -h, --help  Print usage information and exit.
192
193     -v, --version
194                 Print version information and exit.
195

ENVIRONMENT

197     NVIM_LOG_FILE
198                 Low-level log file, usually found at ~/.local/share/nvim/log.
199                 :help $NVIM_LOG_FILE
200
201     VIM         Used to locate user files, such as init.vim.  System-depen‐
202                 dent.  :help $VIM
203
204     VIMRUNTIME  Used to locate runtime files (documentation, syntax high‐
205                 lighting, etc.).
206
207     XDG_CONFIG_HOME
208                 Path to the user-local configuration directory, see FILES.
209                 Defaults to ~/.config.  :help xdg
210
211     XDG_DATA_HOME
212                 Like XDG_CONFIG_HOME, but used to store data not generally
213                 edited by the user, namely swap, backup, and ShaDa files.
214                 Defaults to ~/.local/share.  :help xdg
215
216     VIMINIT     Ex commands to be executed at startup.  :help VIMINIT
217
218     SHELL       Used to initialize the 'shell' option, which decides the
219                 default shell used by features like :terminal, :!, and
220                 system().
221

FILES

223     ~/.config/nvim/init.vim  User-local nvim configuration file.
224
225     ~/.config/nvim           User-local nvim configuration directory.  See
226                              also XDG_CONFIG_HOME.
227
228     $VIM/sysinit.vim         System-global nvim configuration file.
229
230     /usr/local/share/nvim    System-global nvim runtime directory.
231

AUTHORS

233     Nvim was started by Thiago de Arruda.  Most of Vim was written by Bram
234     Moolenaar.  Vim is based on Stevie, worked on by Tim Thompson, Tony
235     Andrews, and G.R. (Fred) Walter.  :help credits
236
237BSD                            December 17, 2017                           BSD
Impressum