I'll take a tangent and answer the question that will arise when you start sharing more than a single set of syntax files (and attempt ot make the question more "on-topic" in the process :) ).
There is any vim guideline to how to share?
You could say that with Vim 8 there is (although it can be debatable whether it is or it isn't a guideline). In
:help packages (or
:help package-create) the Vim manual describes a method to disengage files in the directories in
.vim between different packages. Therefore the first thing you should do before sharing the files is to place them inside such a package. Instead of:
You should really have something of the lines:
So the directory
ChatScript becomes your package and can be distributed in any way you want. Some examples:
git clone from github
- By zipping it together (zip, tar, whatever) and unzipping at the desirable location
- Symlinks to other user's public folders
- Constructing a VimBall (but I'd recommend against it since it requires some extra knowledge to install in the right place in Vim 8).
Really, you can distribute it whichever way you find more convenient, and you do not need to distribute it in only a single way either. On the other hand the first option (
git clone) is quite popular among Vim users.
The directory names
ChatScript in the above are completely up to you. But the names of the other directories are important, and so is the number of subdirectories. The final objective of Vim packages is to allow for several groups of packages. For example
opt directory there (it is for optionally loaded packages), read the
:h packages or the relevant question here on vi.SE
Before Vim 8
The packages system is not present in Vim 7 and earlier, but it was not born from nothing. Several plugins offered a very similar system of packaging a distibution of Vim files (syntax, autoloads, etc) into a single directory and align several such directories together.
We have a more-or-less complete list of these plugins, with their descriptions, advantages and disadvantages.
From those I always used pathogen. Which I dumped in my
~/.vim/autoload/pathogen.vim using the default
~/.vim/bundle for packages. The difference from the Vim 8 packages above is that it does not have groups of packages, everything goes into
~/.vim/bundle. So, the directory structure above would be (actually was):
Then, to distribute them, it is the same story. Use any method(s) you like and tell the user to dump into a subdirectory of
bundle. Vundle does the same, just that by default it loads from gihub automatically. Other plugins can do even more (e.g. check for updates).