robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
abfe6c9ef7
master
1.Dd December 17, 2017 2.Dt NVIM 1 3.Os 4.Sh NAME 5.Nm nvim 6.Nd edit text 7.Sh SYNOPSIS 8.Nm 9.Op Ar options 10.Op Ar file ... 11.Nm 12.Op Ar options 13.Fl 14.Nm 15.Op Ar options 16.Fl t Ar tag 17.Nm 18.Op Ar options 19.Fl q Op Ar errorfile 20.Sh DESCRIPTION 21.Nm 22is a text editor based on Vim. 23Start 24.Nm 25followed by any number of options and/or files: 26.Pp 27.Dl nvim [options] [file ...] 28.Pp 29Commands in 30.Nm 31begin with colon 32.Pq Sq \&: . 33Type \(lq:help subject\(rq to get help on a specific subject. 34Use <Tab> and CTRL-D to complete subjects (\(lq:help cmdline-completion\(rq). 35.Pp 36The \(lqquickref\(rq help section is a condensed reference of editor features: 37.Dl :help quickref 38.Pp 39If you are new to Vim/Nvim, start with the 30-minute tutorial: 40.Dl :Tutor 41.Pp 42After installing/updating Nvim, it\(aqs a good idea to run the self-check: 43.Dl :checkhealth 44.Bl -tag -width Fl 45.It Ar file ... 46File(s) to edit. 47Opens one buffer per file. 48To switch between buffers, use the 49.Ic :next 50and 51.Ic :previous 52commands. 53.It Fl 54Reads text from standard input until 55.Dv EOF , 56then opens a buffer with that text. 57User input is read from standard error, which should be a terminal. 58.El 59.Sh OPTIONS 60.Bl -tag -width Fl 61.It Fl t Ar tag 62Finds 63.Ar tag 64in the tags file, the associated file becomes the current 65file and the associated command is executed. 66Cursor is positioned at the tag location in the file. 67.Ic ":help tag-commands" 68.It Fl q Op Ar errorfile 69QuickFix mode. 70Display the first error in 71.Ar errorfile . 72If 73.Ar errorfile 74is omitted, the value of the \(aqerrorfile\(aq option is used (defaults to 75.Cm errors.err ) . 76Further errors can be jumped to with the 77.Ic :cnext 78command. 79.Ic ":help quickfix" 80.It Fl - 81End of options. 82Remaining arguments are treated as literal file names, including filenames 83starting with hyphen 84.Pq Sq - . 85.It Fl e 86Ex mode, reading stdin as Ex commands. 87.Ic ":help Ex-mode" 88.It Fl E 89Ex mode, reading stdin as text. 90.Ic ":help Ex-mode" 91.It Fl es 92Silent (non-interactive) Ex mode, reading stdin as Ex commands. 93Useful for scripting because it does NOT start a UI, unlike 94.Fl e . 95.Ic ":help silent-mode" 96.It Fl \&Es 97Silent (non-interactive) Ex mode, reading stdin as text. 98Useful for scripting because it does NOT start a UI, unlike 99.Fl E . 100.Ic ":help silent-mode" 101.It Fl d 102Diff mode. 103Show the difference between two to eight files, similar to 104.Xr sdiff 1 . 105.Ic ":help diff" 106.It Fl R 107Read-only mode. 108Sets the \(aqreadonly\(aq option. 109Implies 110.Fl n . 111Buffers can still be edited, but cannot be written to disk if already 112associated with a file. 113To overwrite a file, add an exclamation mark to the relevant Ex command, such as 114.Ic :w\&! . 115.Ic ":help 'readonly'" 116.It Fl m 117Resets the \(aqwrite\(aq option, to disable file modifications. 118Writing to a file is disabled, but buffers can still be modified. 119.It Fl M 120Resets the \(aqwrite\(aq and \(aqmodifiable\(aq options, to disable file and 121buffer modifications. 122.It Fl b 123Binary mode. 124.Ic ":help edit-binary" 125.It Fl A 126Arabic mode. 127Sets the \(aqarabic\(aq option. 128.It Fl H 129Hebrew mode. 130Sets the \(aqhkmap\(aq and \(aqrightleft\(aq options. 131.It Fl V Ns Oo Ar N Oc Ns Op Ar file 132Verbose mode. 133Prints debug messages. 134.Ar N 135is the \(aqverbose\(aq level, defaults to 136.Cm 10 . 137If 138.Ar file 139is specified, append messages to 140.Ar file 141instead of printing them. 142.Ic ":help 'verbose'" 143.It Fl D 144Vimscript debug mode. 145Started when executing the first command from a script. 146.Ic ":help debug-mode" 147.It Fl n 148Disable the use of swap files. 149Sets the \(aqupdatecount\(aq option to 150.Cm 0 . 151Can be useful for editing files on a slow medium. 152.It Fl r Op Ar file 153Recovery mode. 154If 155.Ar file 156is omitted 157then list swap files with recovery information. 158Otherwise the swap file 159.Ar file 160is used to recover a crashed session. 161The swap file has the same name as the file it\(aqs associated with, but with 162.Sq .swp 163appended. 164.Ic ":help recovery" 165.It Fl L Op Ar file 166Alias for 167.Fl r . 168.It Fl u Ar vimrc 169Use 170.Ar vimrc 171instead of the default 172.Pa ~/.config/nvim/init.vim . 173If 174.Ar vimrc 175is 176.Cm NORC , 177do not load any initialization files (except plugins). 178If 179.Ar vimrc 180is 181.Cm NONE , 182loading plugins is also skipped. 183.Ic ":help initialization" 184.It Fl i Ar shada 185Use 186.Ar shada 187instead of the default 188.Pa ~/.local/state/nvim/shada/main.shada . 189If 190.Ar shada 191is 192.Cm NONE , 193do not read or write a ShaDa file. 194.Ic ":help shada" 195.It Fl -noplugin 196Skip loading plugins (by setting the \(aqnoloadplugins\(aq option). 197Implied by 198.Cm -u NONE . 199.It Fl -clean 200Start Nvim with \(lqfactory defaults\(rq (only builtin plugins, no user 201config/plugins, no shada). 202.Ic ":help --clean" 203.It Fl o Ns Op Ar N 204Open 205.Ar N 206windows stacked horizontally. 207If 208.Ar N 209is omitted, open one window for each file. 210If 211.Ar N 212is less than the number of file arguments, allocate windows for the first 213.Ar N 214files and hide the rest. 215.It Fl O Ns Op Ar N 216Like 217.Fl o , 218but tile windows vertically. 219.It Fl p Ns Op Ar N 220Like 221.Fl o , 222but for tab pages. 223.It Cm + Ns Op Ar linenum 224For the first file, position the cursor on line 225.Ar linenum . 226If 227.Ar linenum 228is omitted, position the cursor on the last line of the file. 229.Cm +5 230and 231.Cm -c 5 232on the command-line are equivalent to 233.Ic :5 234inside 235.Nm . 236.It Cm +/ Ns Op Ar pattern 237For the first file, position the cursor on the first occurrence of 238.Ar pattern . 239If 240.Ar pattern 241is omitted, the most recent search pattern is used (if any). 242.Cm +/foo 243and 244.Cm -c /foo 245on the command-line are equivalent to 246.Ic /foo 247and 248.Ic :/foo 249inside 250.Nm . 251.Ic ":help search-pattern" 252.It Cm + Ns Ar command , Fl c Ar command 253Execute 254.Ar command 255after reading the first file. 256Up to 10 instances allowed. 257.Qq Cm +foo 258and 259.Cm -c \(dqfoo\(dq 260are equivalent. 261.It Fl -cmd Ar command 262Like 263.Fl c , 264but execute 265.Ar command 266before processing any vimrc. 267Up to 10 instances of these can be used independently from instances of 268.Fl c . 269.It Fl l Ar script Op Ar args 270Execute Lua 271.Ar script 272with optional 273.Op Ar args 274after processing any preceding Nvim startup arguments. 275All 276.Op Ar args 277are treated as script arguments and are passed literally to Lua, that is, 278.Fl l 279stops processing of Nvim arguments. 280.Ic ":help -l" 281.It Fl S Op Ar session 282Execute 283.Ar session 284after the first file argument has been read. 285If 286.Ar session 287filename ends with 288.Pa .lua 289it is executed as Lua instead of Vimscript. 290Equivalent to 291.Cm -c \(dqsource session\(dq . 292.Ar session 293cannot start with a hyphen 294.Pq Sq - . 295If 296.Ar session 297is omitted then 298.Pa Session.vim 299is used, if found. 300.Ic ":help session-file" 301.It Fl s Ar scriptin 302Read normal mode commands from 303.Ar scriptin . 304The same can be done with the command 305.Ic ":source! scriptin" . 306If the end of the file is reached before 307.Nm 308exits, further characters are read from the keyboard. 309.It Fl w Ar scriptout 310Append all typed characters to 311.Ar scriptout . 312Can be used for creating a script to be used with 313.Fl s 314or 315.Ic :source\&! . 316.It Fl W Ar scriptout 317Like 318.Fl w , 319but truncate 320.Ar scriptout . 321.It Fl -startuptime Ar file 322During startup, append timing messages to 323.Ar file . 324Can be used to diagnose slow startup times. 325.It Fl -api-info 326Dump API metadata serialized to msgpack and exit. 327.It Fl -embed 328Use standard input and standard output as a msgpack-rpc channel. 329.Ic ":help --embed" 330.It Fl -headless 331Do not start a UI. 332When supplied with 333.Cm --embed 334this implies that the embedding application does not intend to (immediately) 335start a UI. 336Also useful for \(lqscraping\(rq messages in a pipe. 337.Ic ":help --headless" 338.It Fl -listen Ar address 339Start RPC server on this pipe or TCP socket. 340.It Fl h , -help 341Print usage information and exit. 342.It Fl v , -version 343Print version information and exit. 344.El 345.Sh ENVIRONMENT 346.Bl -tag -width Fl 347.It Ev NVIM_APPNAME 348The name of sub-directories used within each XDG user directory. 349Defaults to 350.Cm nvim . 351.Ic ":help $NVIM_APPNAME" 352.It Ev NVIM_LOG_FILE 353Low-level log file, usually found at 354.Pa ~/.local/state/nvim/nvim.log . 355.Ic ":help $NVIM_LOG_FILE" 356.It Ev VIM 357Used to locate user files, such as init.vim. 358System-dependent. 359.Ic ":help $VIM" 360.It Ev VIMRUNTIME 361Used to locate runtime files (documentation, syntax highlighting, etc.). 362.It Ev XDG_CONFIG_HOME 363Path to the user-local configuration directory, see 364.Sx FILES . 365Defaults to 366.Pa ~/.config . 367.Ic ":help xdg" 368.It Ev XDG_STATE_HOME 369Like 370.Ev XDG_CONFIG_HOME , 371but used to store data not generally edited by the user, 372namely swap, backup, and ShaDa files. 373Defaults to 374.Pa ~/.local/state . 375.Ic ":help xdg" 376.It Ev XDG_DATA_HOME 377Like 378.Ev XDG_CONFIG_HOME , 379but used to store data not generally edited by the user, 380things like runtime files. 381Defaults to 382.Pa ~/.local/share . 383.Ic ":help xdg" 384.It Ev VIMINIT 385Ex commands to be executed at startup. 386.Ic ":help VIMINIT" 387.It Ev SHELL 388Used to initialize the \(aqshell\(aq option, which decides the default shell 389used by features like 390.Ic :terminal , 391.Ic :! , 392and 393.Ic system() . 394.El 395.Sh FILES 396.Bl -tag -width "~/.config/nvim/init.vim" 397.It Pa ~/.config/nvim/init.lua 398User-local 399.Nm 400Lua configuration file. 401.It Pa ~/.config/nvim 402User-local 403.Nm 404configuration directory. 405See also 406.Ev XDG_CONFIG_HOME . 407.It Pa $VIM/sysinit.vim 408System-global 409.Nm 410configuration file. 411.It Pa $VIM 412System-global 413.Nm 414runtime directory. 415.El 416.Sh AUTHORS 417Nvim was started by 418.An "Thiago de Arruda" . 419Most of Vim was written by 420.An -nosplit 421.An "Bram Moolenaar" . 422Vim is based on Stevie, worked on by 423.An "Tim Thompson" , 424.An "Tony Andrews" , 425and 426.An "G.R. (Fred) Walter" . 427.Ic ":help credits"