Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable/disable this plugin per-buffer (or per-window, or per-filetype) #26

Closed
denilsonsa opened this issue Oct 15, 2011 · 8 comments
Closed

Comments

@denilsonsa
Copy link

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.

@nathanaelkane
Copy link
Collaborator

Good suggestion, indent guides showing up in help files annoys me too :)

@johnantoni
Copy link

any news on this, would love to see it fixed

@jgallen23
Copy link

+1

@johnantoni
Copy link

till this get's fixed i've got it switched off by default

"indent guides
let g:indent_guides_enable_on_vim_startup=0 "enable on startup
set ts=2 sw=2 et
let g:indent_guides_start_level=2
let g:indent_guides_guide_size=1

then i can toggle it with leader+ig

@nathanaelkane
Copy link
Collaborator

Sorry guys, haven't had much time lately. I'll definitely get onto this as soon as time allows. In the meantime, I'll happily accept a pull request if someones willing.

@cespare
Copy link

cespare commented Feb 19, 2013

+1, this is the main missing feature from indent-guides.

nathanaelkane added a commit that referenced this issue Mar 6, 2013
For specifying a list of filetypes to disable the plugin for.

Closes #20 and #26.
@nathanaelkane
Copy link
Collaborator

The new g:indent_guides_exclude_filetypes option solves this with an exclude list, which should be the most common use-case. In future I also plan to implement a similar solution for whitelisted filetypes.

@Nemoden
Copy link

Nemoden commented Apr 23, 2020

@nathanaelkane Any progress on this? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants