mode. This works
just like executing a command from a vimrc in the current directory.
If Vim startup is slow ~
*slow-start*
If Vim takes a long time to start up, use the |--startuptime| argument to find
out what happens.
If you have 'shada' enabled, the loading of the ShaDa file may take a
while. You can find out if this is the problem by disabling ShaDa for a
moment (use the Vim argument "-i NONE", |-i|). Try reducing the number of
lines stored in a register with ":set shada='20,<50,s10". |shada-file|.
Troubleshooting broken configurations ~
*bisect*
The extreme flexibility of editors like Vim and Emacs means that any plugin or
setting can affect the entire editor in ways that are not initially obvious.
To find the cause of a problem in your config, you must "bisect" it:
1. Remove or disable half of your |config|.
2. Restart Nvim.
3. If the problem still occurs, goto 1.
4. If the problem is gone, restore half of the removed lines.
5. Continue narrowing your config in this way, until you find the setting or
plugin causing the issue.
Intro message ~
*:intro*
When Vim starts without a file name, an introductory message is displayed. It
is removed as soon as the display is redrawn. To see the message again, use
the ":intro" command. To avoid the intro message on startup, add the "I" flag
to 'shortmess'.
==============================================================================
$VIM and $VIMRUNTIME
*$VIM*
The environment variable "$VIM" is used to locate various user files for Nvim,
such as the user |config|. This depends on the system, see
|startup|.
Nvim will try to get the value for $VIM in this order:
1. Environment variable $VIM, if it is set.
2. Path derived from the 'helpfile' option, unless it contains some
environment variable too (default is "$VIMRUNTIME/doc/help.txt"). File
name ("help.txt", etc.) is removed. Trailing directory names are removed,
in this order: "doc", "runtime".
3. Path derived from the location of the `nvim` executable.
4. Compile-time defined installation directory (see output of ":version").
After doing this once, Nvim sets the $VIM environment variable.
*$VIMRUNTIME*
The environment variable "$VIMRUNTIME" is used to locate various support
files, such as the documentation and syntax-highlighting files. For example,
the main help file is normally "$VIMRUNTIME/doc/help.txt".
Nvim will try to get the value for $VIMRUNTIME in this order:
1. Environment variable $VIMRUNTIME, if it is set.
2. Directory path "$VIM/vim{version}", if it exists, where {version} is the
Vim version number without '-' or '.'. For example: "$VIM/vim82".
3. Directory path "$VIM/runtime", if it exists.
4. Value of $VIM environment variable. This is for backwards compatibility
with older Vim versions.
5. If "../share/nvim/runtime" exists relative to |v:progpath|, it is used.
6. Path derived from the 'helpfile' option (if it doesn't contain '$') with
"doc/help.txt" removed from the end.
After doing this once, Nvim sets the $VIMRUNTIME environment variable.
In case you need the value of $VIMRUNTIME in a shell (e.g., for a script that
greps in the help files) you might be able to use this: >
VIMRUNTIME="$(nvim --clean --headless --cmd 'echo $VIMRUNTIME|q')"
==============================================================================
Suspending *suspend*
*CTRL-Z* *v_CTRL-Z*
CTRL-Z Suspend Nvim, like ":stop".
Works in Normal and in Visual mode. In Insert and
Command-line mode, the CTRL-Z is inserted as a normal
character. In Visual mode Nvim goes back to Normal
mode.
:sus[pend][!] or *:sus* *:suspend* *:st* *:stop*
:st[op][!] Suspend Nvim using OS "job control"; it will continue
if you make it the foreground job again. Triggers
|VimSuspend| before suspending and |VimResume| when
resumed.
If "!" is not given and 'autowrite' is set, every
buffer with changes and a file name is written out.
If "!"