nathanaelkane/vim-indent-guides — Issue #26: Enable/disable this plugin per-buffer (or per-window, or per-filetype)
Author: denilsonsa
Created: 2011-10-15 03:43:44+00:00
State: open

I'd like to have this plugin automatically enabled for any of my source-code files. However, I don't want it enabled for files that are not indentation-based. Currently, it is impossible.

I've tried adding this to my `~/.vimrc`:

au FileType python IndentGuidesEnable

I open a Python file and this plugin is automatically enabled, as it should! Great! Then I type `:help indent_guides`, and the help file gets indent-highlighted. No, it's not good. So I've added this:

au FileType * IndentGuidesDisable

And now opening a help file disables the highlighting, but after going back to the Python source, it gets disabled there as well. Damn, this state is global, while it should be local to each buffer!

Once this issue is fixed, issue #20 will be fixed as well.