Nvim
Nvim :help
pages, generated
from source
using the tree-sitter-vimdoc parser.
Nvim is based on Vim by Bram Moolenaar. Nvim is emphatically a fork of Vim,
not a clone: compatibility with Vim (especially editor and Vimscript features,
except
Vim9script) is maintained where possible. See
vim-differences for
the complete reference.
To learn how to use Vim in 30 minutes, try the tutorial:
:Tutor<Enter>
1. To start the transition, create your
init.vim (user config) file:
:exe 'edit '.stdpath('config').'/init.vim'
:write ++p
2. Add these contents to the file:
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
source ~/.vimrc
3. Restart Nvim, your existing Vim config will be loaded.
Your Vim configuration might not be entirely Nvim-compatible (see
vim-differences). For example the
'ttymouse' option was removed from Nvim,
because mouse support is always enabled if possible. If you use the same
vimrc for Vim and Nvim you could guard
'ttymouse' in your configuration
like so:
if !has('nvim')
set ttymouse=xterm2
endif
And for Nvim-specific configuration, you can do this:
if has('nvim')
tnoremap <Esc> <C-\><C-n>
endif
For a more granular approach use
exists():
if exists(':tnoremap')
tnoremap <Esc> <C-\><C-n>
endif
Now you should be able to explore Nvim more comfortably. Check
nvim-features
for more information.
portable-config
Because Nvim follows the XDG
base-directories standard, configuration on
Windows is stored in ~/AppData instead of ~/.config. But you can still share
the same Nvim configuration on all of your machines, by creating
~/AppData/Local/nvim/init.vim containing just this line:
source ~/.config/nvim/init.vim
If you are just trying out Nvim for a few minutes, and want to see the
extremes of what it can do, try one of these popular "extension packs" or
"distributions" (Note: Nvim is not affiliated with these projects, and does
not support them):
However, in general, we recommend (eventually) taking time to learn Nvim from
its stock configuration, and incrementally setting options and adding plugins
to your
config as you find an explicit need to do so.