1

I am using this plugin which only ships with 'after' directory, containing 'plugin' and 'syntax' directories.

Here, it looks like the 'after' directory is added to run time path as well.

If I manually move the 'plugin' and 'syntax' directories to the bundles/indentLine root the plugin works, the commands are recognized.

Any suggestions on what's going wrong? How do I debug? How do I add print statements in there?

EDIT: I am going to clarify this a little more.

I have a directory layout ~/.vim/bundles. All of my plugins that are from gitrepos are here, so you are looking at something like -

Output:

~/.vim/bundle
|-- nerdtree
|   |-- syntax
|   `-- plugin
|-- indentLine
|   `-- after
|       `-- syntax
|       `-- plugin
`-- vim-surround
    |-- syntax
    `-- plugin

scriptnames includes nerdtree and vim-surround. However, indentLine doesn't show up in scriptnames. If I move the "syntax" and "plugin" directories from "indentLine\after" into the "indentLine" directory, then indentLine shows up in :scriptnames as well.

Basically, the :indentLines\after directory is not looked into for plugins.

Hari Sundararajan
  • 608
  • 2
  • 8
  • 18

1 Answers1

0

I think I found the answer in Vim docs. When running :help runtime a list of directories comes up that are searched for vim scripts. The after directory is not one of them. A full list can be found here.

So when Pathogen adds your bundle directories to runtimepath, it doesn't actually add the after directories.

So what can we do? Well, you can manually add your after script to the runtimepath. So you can create a .vim/bundle/indentLine/plugin/setup.vim script with the following contents:

set runtimepath.="," . expand("<sfile>:h:p") . "/../after/"

That way your after directory is added to the end of the runtimepath and actually processed

SalmonKiller
  • 2,183
  • 4
  • 27
  • 56