vimoutliner/vimoutliner — pull request #12 by mcepl (2012-06-03 15:01:29+00:00)
Title: Votl

(reposted old pull request)
We have in `ftdetect/vo_base.vim` (roughly) this line

au! BufRead,BufNewFile *.otl setfiletype vo_base

Which means that we are registering as a filetype "vo_base" (in the similar manner as "make" is a filetype for Makefiles or "python" is the filetype of Python scripts).

Unfortunately, it isn't exactly what we meant (I suppose) vis-a-vis ftplugins. Documentation for ftplugin directory says (in 'ftplugin-name'):

> You can add a filetype plugin by dropping it in the right directory. The name of this directory is in the same directory mentioned above for global plugins, but the last part is "ftplugin". Suppose you have found a plugin for the "stuff" filetype, and you are on Unix. Then you can move this file to the ftplugin directory:
>
> mv thefile ~/.vim/ftplugin/stuff.vim
>
> If that file already exists you already have a plugin for "stuff". You might want to check if the existing plugin doesn't conflict with the one you are adding. If it's OK, you can give the new one another name:
>
> mv thefile ~/.vim/ftplugin/stuff_too.vim
>
> The underscore is used to separate the name of the filetype from the rest, which can be anything. If you use "otherstuff.vim" it wouldn't work, it would be loaded for the "otherstuff" filetype.

So, in order for VimOutliner ftplugins work properly and not conflict with other ones, they would need to be stored in files like

ftplugin/vo_base_checkbox.vim

which seems to me rather confusing. Is this really what we mean? I see files like `vo_smart_paste.vim`, `vo_sort_lists.vim`, and `vo_hoist.vim`.

If `vo_base` is really what we mean (and we plan to have some sub-filetypes later; seems weird) than we should rename those plugins to `vo_base_hoist.vim` etc. If on the other hand, this is just a bug, we should rename our filetype in `ftdetect/vo_base.vim` to `ftdetect/vo.vim` (or rather `votl`, two-letter abbreviations are doomed to conflict with something else sooner or later), and rename the file `ftdetect/votl.vim`.