NVIM(1)
π NVIM(1) β the manual page, but make it a group chat
okay bestie, you're looking at the General Commands Manual, section 1, and honestly? this one ate. it's nvim, and we're about to go through literally every single flag together. no skipping. grab a strawberry π and let's go.
β¨ NAME β¨
nvim β edit text. that's it. that's the whole assignment. iconic behaviour, no notes. π
πΈ SYNOPSIS πΈ
here's how you summon her:
nvim [options] [file ...]
nvim [options] -
nvim [options] -t tag
nvim [options] -q [errorfile]
π¦ DESCRIPTION π¦
so nvim is a text editor based on Vim. you start it up, you throw some options and/or files at it, and she just goes:
nvim [options] [file ...]
commands inside nvim start with a colon (:), like a little summoning circle. type :help subject and you get help on that specific subject. use <Tab> and CTRL-D to complete subjects (that's :help cmdline-completion if you wanna read up, iykyk).
the quickref help section is a condensed reference of editor features, and it's lowkey everything:
:help quickref
if you're new to Vim/Nvim, start with the 30-minute tutorial:
:Tutor
and after installing/updating Nvim, it's genuinely a good idea to run the self-check:
:checkhealth
now the positional stuff:
file ...β file(s) to edit. opens one buffer per file. to switch between buffers, use the:nextand:previouscommands. it's giving tab management but make it vintage. π-β reads text from standard input until EOF, then opens a buffer with that text. user input is read from standard error, which should be a terminal. so don't pipe your feelings in wrong, bestie. π
π OPTIONS π
okay this is the part everyone skips and you will NOT skip it. 40-ish options, we're doing all of them. periodt. π
-t tagβ finds tag in the tags file, the associated file becomes the current file and the associated command is executed. cursor is positioned at the tag location in the file.:help tag-commandsβ¨-q [errorfile]β QuickFix mode. displays the first error in errorfile. if errorfile is omitted, the value of the'errorfile'option is used (defaults toerrors.err). further errors can be jumped to with the:cnextcommand.:help quickfix--β end of options. remaining arguments are treated as literal file names, including filenames starting with hyphen (-). so your weird little-file.txtis safe now π«Ά-eβ Ex mode, reading stdin as Ex commands.:help Ex-mode-Eβ Ex mode, reading stdin as text.:help Ex-mode-esβ Silent (non-interactive) Ex mode, reading stdin as Ex commands. useful for scripting because it does NOT start a UI, unlike-e.:help silent-mode-Esβ Silent (non-interactive) Ex mode, reading stdin as text. useful for scripting because it does NOT start a UI, unlike-E.:help silent-mode-dβ Diff mode. show the difference between two to eight files, similar tosdiff(1).:help diff-Rβ Read-only mode. sets the'readonly'option. implies-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 relevant Ex command, such as:w!.:help 'readonly'-mβ resets the'write'option, to disable file modifications. writing to a file is disabled, but buffers can still be modified.-Mβ resets the'write'and'modifiable'options, to disable file and buffer modifications. full lockdown, she's not letting you touch anything π-bβ Binary mode.:help edit-binary-Aβ Arabic mode. sets the'arabic'option.-Hβ Hebrew mode. sets the'hkmap'and'rightleft'options.-V[N][file]β Verbose mode. prints debug messages.Nis the'verbose'level, defaults to10. if file is specified, append messages to file instead of printing them.:help 'verbose'-Dβ Vimscript debug mode. started when executing the first command from a script.:help debug-mode-nβ disable the use of swap files. sets the'updatecount'option to0. can be useful for editing files on a slow medium. π-r [file]β Recovery mode. if file is omitted then list swap files with recovery information. otherwise the swap file file is used to recover a crashed session. the swap file has the same name as the file it's associated with, but with.swpappended.:help recovery-L [file]β alias for-r. twins fr fr.-u vimrcβ use vimrc instead of the default~/.config/nvim/init.vim. if vimrc isNORC, do not load any initialization files (except plugins). if vimrc isNONE, loading plugins is also skipped.:help initialization-i shadaβ use shada instead of the default~/.local/state/nvim/shada/main.shada. if shada isNONE, do not read or write a ShaDa file.:help shada--nopluginβ skip loading plugins (by setting the'noloadplugins'option). implied by-u NONE.--cleanβ start Nvim with "factory defaults" (only builtin plugins, no user config/plugins, no shada).:help --cleanβ this is the "fresh out the box, no baggage" vibe check π§-o[N]β openNwindows stacked horizontally. ifNis omitted, open one window for each file. ifNis less than the number of file arguments, allocate windows for the firstNfiles and hide the rest.-O[N]β like-o, but tile windows vertically. β¬οΈβ¬οΈ-p[N]β like-o, but for tab pages.+[linenum]β for the first file, position the cursor on line linenum. if linenum is omitted, position the cursor on the last line of the file.+5and-c 5on the command-line are equivalent to:5inside nvim.+/[pattern]β for the first file, position the cursor on the first occurrence of pattern. if pattern is omitted, the most recent search pattern is used (if any).+/fooand-c /fooon the command-line are equivalent to/fooand:/fooinside nvim.:help search-pattern+command,-c commandβ execute command after reading the first file. up to 10 instances allowed."+foo"and-c "foo"are equivalent.--cmd commandβ like-c, but execute command before processing any vimrc. up to 10 instances of these can be used independently from instances of-c.-l script [args]β execute Lua script with optional [args] after processing any preceding Nvim startup arguments. all [args] are treated as script arguments and are passed literally to Lua, that is,-lstops processing of Nvim arguments.:help -l-S [session]β execute session after the first file argument has been read. if session filename ends with.luait is executed as Lua instead of Vimscript. equivalent to-c "source session". session cannot start with a hyphen (-). if session is omitted thenSession.vimis used, if found.:help session-file-s scriptinβ read normal mode commands from scriptin. the same can be done with the command:source! scriptin. if the end of the file is reached before nvim exits, further characters are read from the keyboard.-w scriptoutβ append all typed characters to scriptout. can be used for creating a script to be used with-sor:source!.-W scriptoutβ like-w, but truncate scriptout. she's ruthless, she clears the whole thing π--startuptime fileβ during startup, append timing messages to file. can be used to diagnose slow startup times. (hi, that's you, with 400 plugins, we see you π)--api-infoβ dump API metadata serialized to msgpack and exit.--embedβ use standard input and standard output as a msgpack-rpc channel.:help --embed--headlessβ do not start a UI. when supplied with--embedthis implies that the embedding application does not intend to (immediately) start a UI. also useful for "scraping" messages in a pipe.:help --headless--listen addressβ start RPC server on this pipe or TCP socket.-h,--helpβ print usage information and exit.-v,--versionβ print version information and exit.
π ENVIRONMENT π
the vibes your environment is setting. all of them matter:
NVIM_APPNAMEβ the name of sub-directories used within each XDG user directory. defaults tonvim.:help $NVIM_APPNAMENVIM_LOG_FILEβ low-level log file, usually found at~/.local/state/nvim/nvim.log.:help $NVIM_LOG_FILEVIMβ used to locate user files, such asinit.vim. system-dependent.:help $VIMVIMRUNTIMEβ used to locate runtime files (documentation, syntax highlighting, etc.).XDG_CONFIG_HOMEβ path to the user-local configuration directory, see "FILES". defaults to~/.config.:help xdgXDG_STATE_HOMEβ likeXDG_CONFIG_HOME, but used to store data not generally edited by the user, namely swap, backup, and ShaDa files. defaults to~/.local/state.:help xdgXDG_DATA_HOMEβ likeXDG_CONFIG_HOME, but used to store data not generally edited by the user, things like runtime files. defaults to~/.local/share.:help xdgVIMINITβ Ex commands to be executed at startup.:help VIMINITSHELLβ used to initialize the'shell'option, which decides the default shell used by features like:terminal,:!, andsystem().
π FILES π
where she keeps her stuff:
~/.config/nvim/init.luaβ user-local nvim Lua configuration file.~/.config/nvimβ user-local nvim configuration directory. see alsoXDG_CONFIG_HOME.$VIM/sysinit.vimβ system-global nvim configuration file.$VIMβ system-global nvim runtime directory.
π AUTHORS π
giving credit where credit is due, always:
Nvim was started by Thiago de Arruda. most of Vim was written by Bram Moolenaar. Vim is based on Stevie, worked on by Tim Thompson, Tony Andrews, and G.R. (Fred) Walter. :help credits π«Ά
and that's the whole page, bestie. this edition shipped on the Debian manual set, dated December 17, 2017. go edit some text, you absolute icon πβ¨π¦
π¦ where this page comes from
- alpine 3.24: neovim-doc 0.12.2-r0 Β· Apache-2.0 AND Vim
- arch rolling: neovim 0.12.6-1 Β· Apache-2.0 AND LicenseRef-vim
- fedora 44: neovim 0.12.5-1.fc44
- fedora 44: neovim 0.12.6-1.fc44 Β· Apache-2.0 AND Vim AND MIT
- nixos 26.05: neovim-unwrapped 0.12.4
- nixpkgs unstable: neovim-unwrapped 0.12.6
- ubuntu stonking: neovim-runtime 0.12.4-1 Β· Apache
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms