mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 11:15:14 -07:00
d29c243bef
Fixes #7374.
73 lines
2.2 KiB
Plaintext
73 lines
2.2 KiB
Plaintext
*nvim.txt* Nvim
|
|
|
|
|
|
NVIM REFERENCE MANUAL
|
|
|
|
|
|
Nvim *nvim* *nvim-intro*
|
|
|
|
Nvim is based on Vim by Bram Moolenaar.
|
|
|
|
If you are new to Vim see |help.txt|, or type ":Tutor".
|
|
If you already use Vim see |nvim-from-vim| for a quickstart.
|
|
|
|
Nvim is emphatically a fork of Vim, not a clone: compatibility with Vim is
|
|
maintained where possible. See |vim_diff.txt| for the complete reference of
|
|
differences from Vim.
|
|
|
|
Type |gO| to see the table of contents.
|
|
|
|
==============================================================================
|
|
Transitioning from Vim *nvim-from-vim*
|
|
|
|
To start the transition, create init.vim in the correct directory for your
|
|
platform.
|
|
|
|
For Linux, macOS and other Unixes, create the file at ~/.config/nvim/init.vim.
|
|
|
|
For Windows, create the file at %LOCALAPPDATA%\nvim\init.vim. `%LOCALAPPDATA%`
|
|
usually expands to `C:\Users\<username>\AppData\Local`.
|
|
|
|
Note: If your system sets `$XDG_CONFIG_HOME`, use that instead of `~/.config`
|
|
or `%LOCALAPPDATA%` in the paths above. Nvim follows the XDG |base-directories|
|
|
convention.
|
|
|
|
Next, add these contents to the file:
|
|
>
|
|
set runtimepath^=~/.vim runtimepath+=~/.vim/after
|
|
let &packpath = &runtimepath
|
|
source ~/.vimrc
|
|
<
|
|
See |provider-python| and |provider-clipboard| for additional software you
|
|
might need to use some features.
|
|
|
|
Your Vim configuration might not be entirely compatible with Nvim. For a
|
|
full list of differences between Vim and Nvim see |vim-differences|.
|
|
|
|
The |'ttymouse'| option, for example, was removed from Nvim (mouse support
|
|
should work without it). If you use the same |vimrc| for Vim and Nvim,
|
|
consider guarding |'ttymouse'| in your configuration like so:
|
|
>
|
|
if !has('nvim')
|
|
set ttymouse=xterm2
|
|
endif
|
|
<
|
|
Conversely, if you have Nvim specific configuration items, you could 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.
|
|
|
|
==============================================================================
|
|
vim:tw=78:ts=8:noet:ft=help:norl:
|