==============================================================================
*05.6* Adding a help file *add-local-help*
If you are lucky, the plugin you installed also comes with a help file. We
will explain how to install the help file, so that you can easily find help
for your new plugin.
Let us suppose a plugin ("my-plugin"), which comes with a help file in a
non-standard place (it usually resides in a sub-folder called `doc/`).
First, create a "doc" directory in one of the directories in 'runtimepath': >
:!mkdir -p ~/.local/share/nvim/site/doc
Now, copy the help file to the "doc" directory: >
:!cp my-plugin/my-plugin-doc.txt ~/.local/share/nvim/site/doc
Here comes the trick, which allows you to jump to the subjects in the new help
file. Generate the local tags file with the |:helptags| command: >
:helptags ~/.local/share/nvim/site/doc
You can see an entry for the local help file when you do: >
:help local-additions
The title lines from the local help files are automagically added to this
section. There you can see which local help files have been added and jump to
them through the tag.
For writing a local help file, see |write-local-help|.
==============================================================================
*05.7* The option window
If you are looking for an option that does what you want, you can search in
the help files here: |options|. Another way is by using this command: >
:options
This opens a new window, with a list of options with a one-line explanation.
The options are grouped by subject. Move the cursor to a subject and press
<Enter> to jump there. Press <Enter> again to jump back. Or use CTRL-O.
You can change the value of an option. For example, move to the "displaying
text" subject. Then move the cursor down to this line:
set wrap nowrap ~
When you hit <Enter>, the line will change to:
set nowrap wrap ~
The option has now been switched off.
Just above this line is a short description of the 'wrap' option. Move the
cursor one line up to place it in this line. Now hit <Enter> and you jump to
the full help on the 'wrap' option.
For options that take a number or string argument you can edit the value.
Then press <Enter> to apply the new value. For example, move the cursor a few
lines up to this line:
set so=0 ~
Position the cursor on the zero with "$". Change it into a five with "r5".
Then press <Enter> to apply the new value. When you now move the cursor
around you will notice that the text starts scrolling before you reach the
border. This is what the 'scrolloff' option does, it specifies an offset
from the window border where scrolling starts.
==============================================================================
*05.8* Often used options
There are an awful lot of options. Most of them you will hardly ever use.
Some of the more useful ones will be mentioned here. Don't forget you can
find more help on these options with the ":help" command, with single quotes
before and after the option name. For example: >
:help 'wrap'
In case you have messed up an option value, you can set it back to the
default by putting an ampersand (&) after the option name. Example: >
:set iskeyword&
NOT WRAPPING LINES
Vim normally wraps