-
Notifications
You must be signed in to change notification settings - Fork 82
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
Prepopulate blacklist variable #132
Comments
The variable is predefined, but plugins aren't yet loaded while your vimrc is being read. Setting an auto command to append to the list after startup should work: autocmd VimEnter * let g:better_whitespace_filetypes_blacklist += ['taskedit'] |
Ah, that makes sense, thanks! But unfortunately, this doesn't seem to work :/ |
Hm, looks like that's due to the plugin setting everything up on I suppose a workaround would be to just disable it for that file type (with a check to prevent any errors if you ever don't load the plugin): autocmd FileType taskedit if exists(":DisableWhitespace") | execute ":DisableWhitespace" | endif @Cimbali, any ideas on a better way to handle this? |
Yes, this works for now, thank you :) |
I’m afraid I don’t have a better solution right now. I can see 2 only options:
|
Actually the |
I wanted to leave the original blacklist untouched and simply append a type (btw, even though it is a custom one from taskwarrior, you could add that in natively, because you should never highlight or strip white-space in that file - it is prepopulated with lots of trailing white-spaces and will be trimmed automatically on save):
But I got the error that the variable was undefined - how about predefining that variable so that we can extend it?
My concern here is that if you update the blacklist, I would have to manually update mine. Also DRY.
The text was updated successfully, but these errors were encountered: