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 be‐
32                 tween 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 eight 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     -m          Resets the 'write' option, to disable file modifications.
75                 Writing to a file is disabled, but buffers can still be modi‐
76                 fied.
77
78     -M          Resets the 'write' and 'modifiable' options, to disable file
79                 and buffer modifications.
80
81     -b          Binary mode.  :help edit-binary
82
83     -l          Lisp mode.  Sets the 'lisp' and 'showmatch' options.
84
85     -A          Arabic mode.  Sets the 'arabic' option.
86
87     -H          Hebrew mode.  Sets the 'hkmap' and 'rightleft' options.
88
89     -V[N][file]
90                 Verbose mode.  Prints debug messages.  N is the 'verbose'
91                 level, defaults to 10.  If file is specified, append messages
92                 to file instead of printing them.  :help 'verbose'
93
94     -D          Debug mode for VimL (Vim script).  Started when executing the
95                 first command from a script.  :help debug-mode
96
97     -n          Disable the use of swap files.  Sets the 'updatecount' option
98                 to 0.  Can be useful for editing files on a slow medium.
99
100     -r [file]   Recovery mode.  If file is omitted then list swap files with
101                 recovery information.  Otherwise the swap file file is used
102                 to recover a crashed session.  The swap file has the same
103                 name as the file it's associated with, but with ‘.swp’ ap‐
104                 pended.  :help recovery
105
106     -L [file]   Alias for -r.
107
108     -u vimrc    Use vimrc instead of the default ~/.config/nvim/init.vim.  If
109                 vimrc is NORC, do not load any initialization files (except
110                 plugins).  If vimrc is NONE, loading plugins is also skipped.
111                 :help initialization
112
113     -i shada    Use shada instead of the default
114                 ~/.local/state/nvim/shada/main.shada.  If shada is NONE, do
115                 not read or write a ShaDa file.  :help shada
116
117     --noplugin  Skip loading plugins.  Implied by -u NONE.
118
119     --clean     Start Nvim with "factory defaults" (no user config and plug‐
120                 ins, no shada).  :help --clean
121
122     -o[N]       Open N windows stacked horizontally.  If N is omitted, open
123                 one window for each file.  If N is less than the number of
124                 file arguments, allocate windows for the first N files and
125                 hide the rest.
126
127     -O[N]       Like -o, but tile windows vertically.
128
129     -p[N]       Like -o, but for tab pages.
130
131     +[linenum]  For the first file, position the cursor on line linenum.  If
132                 linenum is omitted, position the cursor on the last line of
133                 the file.  +5 and -c 5 on the command-line are equivalent to
134                 :5 inside nvim.
135
136     +/[pattern]
137                 For the first file, position the cursor on the first occur‐
138                 rence of pattern.  If pattern is omitted, the most recent
139                 search pattern is used (if any).  +/foo and -c /foo on the
140                 command-line are equivalent to /foo and :/foo inside nvim.
141                 :help search-pattern
142
143     +command, -c command
144                 Execute command after reading the first file.  Up to 10 in‐
145                 stances allowed.  "+foo" and -c "foo" are equivalent.
146
147     --cmd command
148                 Like -c, but execute command before processing any vimrc.  Up
149                 to 10 instances of these can be used independently from in‐
150                 stances of -c.
151
152     -S [session]
153                 Source session after the first file argument has been read.
154                 Equivalent to -c "source session".  session cannot start with
155                 a hyphen (‘-’).  If session is omitted then Session.vim is
156                 used, if found.  :help session-file
157
158     -s scriptin
159                 Read normal mode commands from scriptin.  The same can be
160                 done with the command :source! scriptin.  If the end of the
161                 file is reached before nvim exits, further characters are
162                 read from the keyboard.
163
164     -w scriptout
165                 Append all typed characters to scriptout.  Can be used for
166                 creating a script to be used with -s or :source!.
167
168     -W scriptout
169                 Like -w, but truncate scriptout.
170
171     --startuptime file
172                 During startup, append timing messages to file.  Can be used
173                 to diagnose slow startup times.
174
175     --api-info  Dump API metadata serialized to msgpack and exit.
176
177     --embed     Use standard input and standard output as a msgpack-rpc chan‐
178                 nel.  :help --embed
179
180     --headless  Do not start a UI.  When supplied with --embed this implies
181                 that the embedding application does not intend to (immedi‐
182                 ately) start a UI.  Also useful for "scraping" messages in a
183                 pipe.  :help --headless
184
185     --listen address
186                 Start RPC server on this pipe or TCP socket.
187
188     -h, --help  Print usage information and exit.
189
190     -v, --version
191                 Print version information and exit.
192

ENVIRONMENT

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

FILES

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

AUTHORS

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