commands, primarily because Nvim UIs use
stdio for msgpack communication, but also for performance, reliability, and
consistency across platforms (see
https://vimhelp.org/gui_x11.txt.html#gui-pty).
See also #1496 https://github.com/neovim/neovim/issues/1496 and #8217
https://github.com/neovim/neovim/issues/8217#issuecomment-402152307.
PYTHON SUPPORT ISN'T WORKING ~
Run |:checkhealth| in Nvim for automatic diagnosis.
Other hints:
- The python `neovim` module was renamed to `pynvim` (long ago).
- If you're using pyenv or virtualenv for the `pynvim` module
https://pypi.org/project/pynvim/, you must set `g:python3_host_prog` to
the virtualenv's interpreter path.
- Read |provider-python|.
- Be sure you have the latest version of the `pynvim` Python module: >bash
python -m pip install setuptools
python -m pip install --upgrade pynvim
python3 -m pip install --upgrade pynvim
<
- Try with `nvim -u NORC` to make sure your config (|init.vim|) isn't causing a
problem. If you get `E117: Unknown function`, that means there's a runtime
issue: |faq-runtime|.
:CHECKHEALTH REPORTS E5009: INVALID $VIMRUNTIME ~
This means |$VIMRUNTIME| or 'runtimepath' is broken.
- |$VIMRUNTIME| must point to Nvim's runtime files, not Vim's.
- The |$VIMRUNTIME| directory contents should be readable by the current user.
- Verify that `:echo &runtimepath` contains the $VIMRUNTIME path.
NEOVIM CAN'T FIND ITS RUNTIME ~
This is the case if `:help nvim` shows `E149: Sorry, no help for nvim`.
Make sure that |$VIM| and |$VIMRUNTIME| point to Nvim's (as opposed to
Vim's) runtime by checking `:echo $VIM` and `:echo $VIMRUNTIME`. This should
give something like `/usr/share/nvim` resp. `/usr/share/nvim/runtime`.
Also make sure that you don't accidentally overwrite your runtimepath
(`:set runtimepath?`), which includes the above |$VIMRUNTIME| by default (see
'runtimepath').
NEOVIM IS SLOW ~
Use a fast terminal emulator:
- kitty https://github.com/kovidgoyal/kitty
- alacritty https://github.com/jwilm/alacritty
Use an optimized build:
`:checkhealth nvim` should report one of these "build types":
>
Build type: RelWithDebInfo
Build type: MinSizeRel
Build type: Release
<
If it reports `Build type: Debug` and you're building Nvim from source, see
https://github.com/neovim/neovim/blob/master/BUILD.md.
COLORS AREN'T DISPLAYED CORRECTLY ~
Ensure that |$TERM| is set correctly.
From a shell, run `TERM=xterm-256color nvim`. If colors are displayed
correctly, then export that value of `TERM` in your user profile (usually
`~/.profile`):
>bash
export TERM=xterm-256color
<
If you're using `tmux`, instead add this to your `tmux.conf`:
>bash
set -g default-terminal "tmux-256color"
<
For GNU `screen`, configure your `.screenrc`
<https://wiki.archlinux.org/index.php/GNU_Screen#Use_256_colors>:
>
term screen-256color
<
NOTE: Nvim ignores `t_Co` and other |t_xx| terminal codes.
NEOVIM CAN'T READ UTF-8 CHARACTERS ~
Run the following from the command line:
>bash
locale | grep -E '(LANG|LC_CTYPE|LC_ALL)=(.*\.)?(UTF|utf)-?8'
<
If there's no results, you might not be using a UTF-8 locale. See these issues:
- https://github.com/neovim/neovim/issues/1601
- https://github.com/neovim/neovim/issues/1858
- https://github.com/neovim/neovim/issues/2386
ESC IN TMUX OR GNU SCREEN IS DELAYED ~
This is a common problem
https://www.google.com/?q=tmux%20vim%20escape%20delay in `tmux` / `screen`
(see also https://github.com/tmux/tmux/issues/131#issuecomment-145853211). The
corresponding timeout needs to be tweaked to a low value (10-20ms).
`.tmux.conf`:
>
set -g escape-time 10
# Or for tmux >= 2.6
set -sg escape-time 10
<
`.screenrc`:
>
maptimeout 10
<
"WHY DOESN'T THIS HAPPEN IN VIM?"
It does happen (try `vim -N -u NONE`), but if you hit a key quickly after
ESC then Vim interprets the ESC as ESC instead of ALT (META). You won't
notice the delay unless you closely observe the cursor. The tradeoff is that
Vim