*vim_diff.txt* Nvim
NVIM REFERENCE MANUAL
Differences between Nvim and Vim *vim-differences*
Nvim differs from Vim in many ways, although editor and Vimscript (not
Vim9script) features are mostly identical. This document is a complete and
centralized reference of the differences.
Type |gO| to see the table of contents.
==============================================================================
Configuration *nvim-config*
User configuration and data files are found in standard |base-directories|
(see also |$NVIM_APPNAME|). Note in particular:
- Use `$XDG_CONFIG_HOME/nvim/init.vim` instead of `.vimrc` for your |config|.
- Use `$XDG_CONFIG_HOME/nvim` instead of `.vim` to store configuration files.
- Use `$XDG_STATE_HOME/nvim/shada/main.shada` instead of `.viminfo` for persistent
session information. |shada|
==============================================================================
Defaults *defaults* *nvim-defaults*
- Filetype detection is enabled by default. This can be disabled by adding
":filetype off" to |init.vim|.
- Syntax highlighting is enabled by default. This can be disabled by adding
":syntax off" to |init.vim|.
- Default color scheme has been updated. This can result in color schemes
looking differently due to them relying on how highlight groups are defined
by default. Add ":colorscheme vim" to |init.vim| or
":source $VIMRUNTIME/colors/vim.lua" to your color scheme file to restore
the old default links and colors. See |:highlight| for a list of highlight
groups colorschemes should set.
- 'autoindent' is enabled
- 'autoread' is enabled (works in all UIs, including terminal)
- 'background' defaults to "dark" (unless set automatically by the terminal/UI)
- 'backupdir' defaults to .,~/.local/state/nvim/backup// (|xdg|), auto-created
- 'belloff' defaults to "all"
- 'comments' includes "fb:•"
- 'commentstring' defaults to ""
- 'compatible' is always disabled
- 'complete' excludes "i"
- 'completeopt' defaults to "menu,popup"
- 'define' defaults to "". The C ftplugin sets it to "^\\s*#\\s*define"
- 'diffopt' defaults to "internal,filler,closeoff,inline:simple,linematch:40"
- 'directory' defaults to ~/.local/state/nvim/swap// (|xdg|), auto-created
- 'display' defaults to "lastline"
- 'encoding' is UTF-8 (cf. 'fileencoding' for file-content encoding)
- 'fillchars' defaults (in effect) to "vert:│,fold:·,foldsep:│"
- 'formatoptions' defaults to "tcqj"
- 'grepprg' uses the -H and -I flags for regular grep,
and defaults to using ripgrep if available
- 'hidden' is enabled
- 'history' defaults to 10000 (the maximum)
- 'hlsearch' is enabled
- 'include' defaults to "". The C ftplugin sets it to "^\\s*#\\s*include"
- 'incsearch' is enabled
- 'isfname' does not include ":" (on Windows). Drive letters are handled
correctly without it. (Use |gF| for filepaths suffixed with ":line:col").
- 'joinspaces' is disabled
- 'jumpoptions' defaults to "clean"
- 'langnoremap' is enabled
- 'langremap' is disabled
- 'laststatus' defaults to 2 (statusline is always shown)
- 'listchars' defaults to "tab:> ,trail:-,nbsp:+"
- 'mouse' defaults to "nvi", see |default-mouse| for details
- 'mousemodel' defaults to "popup_setpos"
- 'nrformats' defaults to "bin,hex"
- 'path' defaults to ".,,". The C ftplugin adds "/usr/include" if it exists.
- 'ruler' is enabled
- 'sessionoptions' includes "unix,slash", excludes "options"
- 'shortmess' includes "CF", excludes "S"
- 'showcmd' is enabled
- 'sidescroll' defaults to 1
- 'smarttab' is enabled
- 'spellfile' defaults to `stdpath("data").."/site/spell/"`
- 'startofline' is disabled
- 'switchbuf' defaults to "uselast"
- 'tabpagemax' defaults to 50
- 'tags' defaults to "./tags;,tags"
- 'termguicolors' is enabled by default if Nvim can detect support from the
host terminal
- 'ttimeout' is enabled