vim-better-whitespace
vim-better-whitespace copied to clipboard
Strip whitespace on save with highlighting disabled
I tried:
let g:better_whitespace_enabled=1
let g:strip_whitelines_at_eof=1
let g:strip_whitespace_on_save=1
and
let g:better_whitespace_enabled=1
let g:better_whitespace_filetypes_blacklist=['diff', 'gitcommit', 'unite', 'qf', 'help', 'markdown']
let g:strip_whitelines_at_eof=1
let g:strip_whitespace_on_save=1
and with both configurations I had the confirmation prompt in markdown files.
Is there something I'm doing wrong?
This is the setting controlling the confirmation prompts, is that the one you’re looking for?
`g:strip_whitespace_confirm` (defaults to 1)
Set to 0 to deactivate asking for confirmation before whitespace is
stripped when you save the file.
If not please try to be more specific in what you’re trying to achieve and what is happening instead.
I'm sorry I wasn't clear enough. This is't about the confirmation prompt.
My intended use case is to have the trim-on-save functionality but without the highlighting.
So, I attempted this:
let g:better_whitespace_enabled=0
let g:strip_whitelines_at_eof=1
let g:strip_whitespace_confirm=0
let g:strip_whitespace_on_save=1
But it still removes trailing whitespace from a markdown file, i.e a blacklisted file type.
So, I tried using let g:better_whitespace_enabled=1
and now the blacklist works properly.
It seems that the better_whitespace_enabled
controls the blacklist access, is that intended?
I'm not sure stripping on save without enabling betterwhitespace is currently supported.