Skip to content

StripWhitespace still works in blacklisted file #114

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

Closed
harriott opened this issue Sep 20, 2019 · 3 comments
Closed

StripWhitespace still works in blacklisted file #114

harriott opened this issue Sep 20, 2019 · 3 comments
Labels
waiting for merge a fix is proposed and needs to be reviewed

Comments

@harriott
Copy link

I can open a markdown file in which the whitespaces aren't highlighted, and :StripWhitespace, and they're all gone, without any visible sign that they've been removed. A little risky...

The fix would be to also disable the StripWhitespace function for blacklisted files.

@Cimbali
Copy link
Collaborator

Cimbali commented Sep 21, 2019

I mean, the StripWhitespace command strips whitespace, why is that so weird? I suggest if you don't want to remove whitespace to not use that command...

It's a normal use case to remove whitespace in a file where you don't want to display it, be it manually or with autocommands, so I don't think we should disable the command on blacklisted files.

@harriott
Copy link
Author

That's a good point, but you should change your README accordingly. As it is, you have written, "To disable this plugin for specific file types...", but the plugin is not disabled by the blacklist, just the highlighting of whitespaces. Your README needs to state that.

When I've some time, I'll look again, see if I can add the full disabling, as I'd prefer, in a fork.

A minor point of readability: just below the contested statement, you've "If you do not want any of these filetypes unignored" which I suggest you change to "If you prefer to also keep these default filetypes ignored" - to avoid the double negative.

Cimbali added a commit that referenced this issue Sep 28, 2019
Disabling the plugin ≠ disabling the functionality. Fixes #114
@Cimbali Cimbali mentioned this issue Sep 28, 2019
@Cimbali Cimbali added bug waiting for merge a fix is proposed and needs to be reviewed and removed bug labels Oct 21, 2019
Cimbali added a commit to Cimbali/vim-better-whitespace that referenced this issue Oct 23, 2019
Disabling the plugin ≠ disabling the functionality. Fixes ntpeters#114
@ntpeters
Copy link
Owner

Resolved in #121

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for merge a fix is proposed and needs to be reviewed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants